From 0baf55e85b45607eeeb0ad0b14ca7d78cf3528de Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 14:23:46 +0000 Subject: [PATCH 01/27] chore(docs): use rst suffix Most editors use the file name suffix to pick up file types, so let's use the standard suffix here. --- doc/conf.py | 2 +- doc/{examples.txt => examples.rst} | 0 ..._to_contribute.txt => how_to_contribute.rst} | 17 ++++++++--------- ...dings.txt => implementation_of_bindings.rst} | 0 doc/{index.txt => index.rst} | 4 ++-- doc/{install.txt => install.rst} | 0 doc/{introduction.txt => introduction.rst} | 0 ...ting_june_2012.txt => meeting_june_2012.rst} | 0 doc/{modules.txt => modules.rst} | 0 doc/{neuroml.nml.txt => neuroml.nml.rst} | 0 doc/{neuroml.txt => neuroml.rst} | 0 doc/{neuroml.test.txt => neuroml.test.rst} | 0 ...sections.txt => nodes_segments_sections.rst} | 0 ...on_arraymorph.txt => note_on_arraymorph.rst} | 0 doc/{tools.txt => tools.rst} | 0 15 files changed, 11 insertions(+), 12 deletions(-) rename doc/{examples.txt => examples.rst} (100%) rename doc/{how_to_contribute.txt => how_to_contribute.rst} (91%) rename doc/{implementation_of_bindings.txt => implementation_of_bindings.rst} (100%) rename doc/{index.txt => index.rst} (89%) rename doc/{install.txt => install.rst} (100%) rename doc/{introduction.txt => introduction.rst} (100%) rename doc/{meeting_june_2012.txt => meeting_june_2012.rst} (100%) rename doc/{modules.txt => modules.rst} (100%) rename doc/{neuroml.nml.txt => neuroml.nml.rst} (100%) rename doc/{neuroml.txt => neuroml.rst} (100%) rename doc/{neuroml.test.txt => neuroml.test.rst} (100%) rename doc/{nodes_segments_sections.txt => nodes_segments_sections.rst} (100%) rename doc/{note_on_arraymorph.txt => note_on_arraymorph.rst} (100%) rename doc/{tools.txt => tools.rst} (100%) diff --git a/doc/conf.py b/doc/conf.py index c43cabf1..4f11d747 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -34,7 +34,7 @@ templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.txt' +source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' diff --git a/doc/examples.txt b/doc/examples.rst similarity index 100% rename from doc/examples.txt rename to doc/examples.rst diff --git a/doc/how_to_contribute.txt b/doc/how_to_contribute.rst similarity index 91% rename from doc/how_to_contribute.txt rename to doc/how_to_contribute.rst index c16c8b7c..70e64597 100644 --- a/doc/how_to_contribute.txt +++ b/doc/how_to_contribute.rst @@ -138,16 +138,15 @@ started. Don’t be scare to open one. Release process --------------- libNeuroML is part of the official NeuroML release cycle. As of -1/09/13 we are still ironing out the proecure. When a new libNueroML +1/09/13 we are still ironing out the procedure. When a new libNueroML release is ready the following needs to happen: - - Update version number in setup.py - - update version number in doc/conf.py - - update release number in doc/conf.py (same as version number) - - update changelog in README.md - - merge development branch with master (This should happen via pull - request - do not do the merge yourself even if you are an owner - of the repository. - - push latest release to PyPi + +- Update version number in setup.py +- update version number in doc/conf.py +- update release number in doc/conf.py (same as version number) +- update changelog in README.md +- merge development branch with master (This should happen via pull request - do not do the merge yourself even if you are an owner of the repository. +- push latest release to PyPi Miscellaneous ------------- diff --git a/doc/implementation_of_bindings.txt b/doc/implementation_of_bindings.rst similarity index 100% rename from doc/implementation_of_bindings.txt rename to doc/implementation_of_bindings.rst diff --git a/doc/index.txt b/doc/index.rst similarity index 89% rename from doc/index.txt rename to doc/index.rst index 923ae6ba..f111e29e 100644 --- a/doc/index.txt +++ b/doc/index.rst @@ -1,6 +1,6 @@ -======================== +========================== libNeuroML: documentation -======================== +========================== .. toctree:: :maxdepth: 2 diff --git a/doc/install.txt b/doc/install.rst similarity index 100% rename from doc/install.txt rename to doc/install.rst diff --git a/doc/introduction.txt b/doc/introduction.rst similarity index 100% rename from doc/introduction.txt rename to doc/introduction.rst diff --git a/doc/meeting_june_2012.txt b/doc/meeting_june_2012.rst similarity index 100% rename from doc/meeting_june_2012.txt rename to doc/meeting_june_2012.rst diff --git a/doc/modules.txt b/doc/modules.rst similarity index 100% rename from doc/modules.txt rename to doc/modules.rst diff --git a/doc/neuroml.nml.txt b/doc/neuroml.nml.rst similarity index 100% rename from doc/neuroml.nml.txt rename to doc/neuroml.nml.rst diff --git a/doc/neuroml.txt b/doc/neuroml.rst similarity index 100% rename from doc/neuroml.txt rename to doc/neuroml.rst diff --git a/doc/neuroml.test.txt b/doc/neuroml.test.rst similarity index 100% rename from doc/neuroml.test.txt rename to doc/neuroml.test.rst diff --git a/doc/nodes_segments_sections.txt b/doc/nodes_segments_sections.rst similarity index 100% rename from doc/nodes_segments_sections.txt rename to doc/nodes_segments_sections.rst diff --git a/doc/note_on_arraymorph.txt b/doc/note_on_arraymorph.rst similarity index 100% rename from doc/note_on_arraymorph.txt rename to doc/note_on_arraymorph.rst diff --git a/doc/tools.txt b/doc/tools.rst similarity index 100% rename from doc/tools.txt rename to doc/tools.rst From 6117956587627ff76499f2c7923c399937e09019 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 14:25:20 +0000 Subject: [PATCH 02/27] chore(docs): move logo to _static folder --- doc/{ => _static}/neuroml_logo.png | Bin doc/conf.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename doc/{ => _static}/neuroml_logo.png (100%) diff --git a/doc/neuroml_logo.png b/doc/_static/neuroml_logo.png similarity index 100% rename from doc/neuroml_logo.png rename to doc/_static/neuroml_logo.png diff --git a/doc/conf.py b/doc/conf.py index 4f11d747..ee7c062e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -44,7 +44,7 @@ # General information about the project. project = u'libNeuroML' -copyright = u'2017, libNeuroML authors and contributors' +copyright = u'2021, libNeuroML authors and contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -115,7 +115,7 @@ # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'neuroml_logo.png' +html_logo = '_static/neuroml_logo.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 From abef0458dc0e2428aa9ffb817c3aa9d033feb393 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 14:46:51 +0000 Subject: [PATCH 03/27] fix(docs): correct page reference --- doc/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install.rst b/doc/install.rst index 0c332972..3f5f34d6 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -97,7 +97,7 @@ Some sample scripts are included in `neuroml/examples`, e.g. : cd neuroml/examples python build_network.py -The standard examples can also be found `here `_ +The standard examples can also be found :doc:`examples`. Unit tests ---------- From fad3c2fa9ba35c7ffd1118563f7e74fcb3977355 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:03:28 +0000 Subject: [PATCH 04/27] chore(docs): reorganise docs Remove some incomplete docs, add others to TOC, fix some issues --- doc/{neuroml.rst => api.rst} | 25 +++++++++---------------- doc/index.rst | 21 ++++++++++++++++----- doc/modules.rst | 7 ------- doc/neuroml.test.rst | 11 ----------- doc/note_on_arraymorph.rst | 9 --------- 5 files changed, 25 insertions(+), 48 deletions(-) rename doc/{neuroml.rst => api.rst} (75%) delete mode 100644 doc/modules.rst delete mode 100644 doc/neuroml.test.rst delete mode 100644 doc/note_on_arraymorph.rst diff --git a/doc/neuroml.rst b/doc/api.rst similarity index 75% rename from doc/neuroml.rst rename to doc/api.rst index 5baf1d17..78670c48 100644 --- a/doc/neuroml.rst +++ b/doc/api.rst @@ -1,13 +1,14 @@ -neuroml Package -=============== +API documentation +================= + +Core classes +-------------- + +.. toctree:: + + neuroml.nml -:mod:`neuroml` Package ----------------------- -.. automodule:: neuroml.__init__ - :members: - :undoc-members: - :show-inheritance: :mod:`loaders` Module --------------------- @@ -40,11 +41,3 @@ neuroml Package :members: :undoc-members: :show-inheritance: - -Subpackages ------------ - -.. toctree:: - - neuroml.nml - diff --git a/doc/index.rst b/doc/index.rst index f111e29e..1c21db83 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -7,9 +7,11 @@ libNeuroML: documentation introduction install + api examples tools + ======================= Developer documentation ======================= @@ -20,13 +22,22 @@ Developer documentation how_to_contribute implementation_of_bindings -.. Source documentation - ================== +Events and meetings +==================== + +.. toctree:: + :maxdepth: 1 + + meeting_june_2012 + +Miscellaneous +============== + +.. toctree:: + :maxdepth: 1 - .. toctree:: - :maxdepth: 3 + nodes_segments_sections -modules Indices and tables ================== diff --git a/doc/modules.rst b/doc/modules.rst deleted file mode 100644 index a7bf4efa..00000000 --- a/doc/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -neuroml -======= - -.. toctree:: - :maxdepth: 4 - - neuroml diff --git a/doc/neuroml.test.rst b/doc/neuroml.test.rst deleted file mode 100644 index a8f06585..00000000 --- a/doc/neuroml.test.rst +++ /dev/null @@ -1,11 +0,0 @@ -test Package -============ - -:mod:`test_segment` Module --------------------------- - -.. automodule:: neuroml.test.test_segment - :members: - :undoc-members: - :show-inheritance: - diff --git a/doc/note_on_arraymorph.rst b/doc/note_on_arraymorph.rst deleted file mode 100644 index a9f02f9c..00000000 --- a/doc/note_on_arraymorph.rst +++ /dev/null @@ -1,9 +0,0 @@ -Appendix I: Arraymorph -====================== - -Why arraymorph is needed ------------------------- - -How arraymorph works --------------------- - From 1d8a6af13c047d09b75579f6c7baebd6085a9fc4 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:16:19 +0000 Subject: [PATCH 05/27] enh(docs): include API docs in main file --- doc/api.rst | 13 +++++++++---- doc/neuroml.nml.rst | 18 ------------------ 2 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 doc/neuroml.nml.rst diff --git a/doc/api.rst b/doc/api.rst index 78670c48..90f083c2 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -1,13 +1,18 @@ API documentation ================= -Core classes --------------- +:mod:`nml` Module (NeuroML Core classes) +----------------------------------------- -.. toctree:: +Note: This module is included in the top level of the `neuroml` package, so you can use these classes by importing neuroml: - neuroml.nml +:: + from neuroml import AdExIaFCell + +.. automodule:: neuroml.nml.nml + :members: + :show-inheritance: :mod:`loaders` Module diff --git a/doc/neuroml.nml.rst b/doc/neuroml.nml.rst deleted file mode 100644 index 81235127..00000000 --- a/doc/neuroml.nml.rst +++ /dev/null @@ -1,18 +0,0 @@ -NeuroML core classes -==================== - - - -:mod:`nml` Module ------------------------------ - -Note: This module is included in the top level of the `neuroml` package, so you can use these classes by importing neuroml: - -:: - - from neuroml import AdExIaFCell - -.. automodule:: neuroml.nml.nml - :members: - :show-inheritance: - From 8da0160e49cb476a466e1be5c76dfb275990b675 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:17:37 +0000 Subject: [PATCH 06/27] enh(docs): remove tools page We'll refer to docs.neuroml.org for this --- doc/index.rst | 1 - doc/tools.rst | 92 --------------------------------------------------- 2 files changed, 93 deletions(-) delete mode 100644 doc/tools.rst diff --git a/doc/index.rst b/doc/index.rst index 1c21db83..64f68c94 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -9,7 +9,6 @@ libNeuroML: documentation install api examples - tools ======================= diff --git a/doc/tools.rst b/doc/tools.rst deleted file mode 100644 index 056aef26..00000000 --- a/doc/tools.rst +++ /dev/null @@ -1,92 +0,0 @@ -Useful tools -============ - -Below is a list of tools which are built in or use Python and which would benefit from a standard library to access, -modify and save detailed neuronal morphologies. Developers from most of these initiatives are involved with the -libNeuroML project. - -Neuronvisio ------------ - -Neuronvisio is a Graphical User Interface for NEURON simulator environment with 3D capabilities. - -http://neuronvisio.org (GitHub: https://github.com/mattions/neuronvisio) - -PyNN ----- - -PyNN is a is a simulator-independent language for building neuronal network models. - -http://neuralensemble.org/trac/PyNN - -Morphforge ----------- - -A Python library for simulating small networks of multicompartmental neurons - -https://github.com/mikehulluk/morphforge - -CATMAID -------- - -We reconstruct neuronal circuits (morphology in 3D, synaptic connectivity) as skeletons, surfaces, volumes in CATMAID. -We want to be able to export the data into an object model (data format), complement it with ion channel distribution of -several types & synaptic mechanisms, and simulate the membrane voltage time series and do virtual current injection etc. -on standard simulators. All of this with a easy-to-use, intuitive Python API in a few lines of code. - -http://www.catmaid.org - -NEURON ------- - -A widely used simulation platform for biophysically detailed neurons and networks which has recently added a Python interface. - -http://www.neuron.yale.edu/neuron - -For more information on Python & NEURON, see Andrew Davison's guide here: http://www.davison.webfactional.com/notes/installation-neuron-python/ - -MOOSE & Moogli --------------- - -MOOSE is the Multiscale Object-Oriented Simulation Environment. It is the base and numerical core for large, detailed simulations including Computational Neuroscience and Systems Biology. - -http://moose.sourceforge.net - -**PyMOOSE** - - -The latest version of MOOSE with a Python interface can be installed as follows: - -:: - - svn co http://moose.svn.sourceforge.net/svnroot/moose/moose/branches/dh_branch moose - cd moose - make pymoose - sudo cp -r python/moose /usr/lib/python2.7/dist-packages - -replacing `/usr/lib/python2.7/dist-packages` with the appropriate location for your Python packages. More details can be found `here `_. - -An example of the HH squid mode can be run with: - -:: - - cd Demos/squid/ - python squid_demo.py - -**Moogli** - -Moogli (a sister project of MOOSE) is a simulator independent OpenGL based visualization tool for neural simulations. -Moogli can visualize morphology of single/multiple neurons or network of neurons, and can also visualize activity in these cells. - -http://moose.ncbs.res.in/moogli/ - - -neuroConstruct --------------- - -neuroConstruct generates native simulator code for NEURON, MOOSE and other simulators. It would be a great benefit to be -able to generate pure NeuroML descriptions of the model components and run (nearly) identical Python code on these -simulators to load the NeuroML and execute the simulations. This scenario is implemented already for a limited number of -model types by generating PyNN based scripts which can run on NEURON, Brian and NEST. - -http://www.neuroConstruct.org From 0d7c125031f9e7b6d60f6df417c05b1831ab1bbc Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:23:55 +0000 Subject: [PATCH 07/27] enh(docs): reorganise index page --- doc/index.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 64f68c94..c5ec5557 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,7 +1,14 @@ -========================== libNeuroML: documentation ========================== +Welcome to the libNeuroML documentation. +Here you will find information on installing, using, and contributing to libNeuroML. +For more information on NeuroML standard, other tools in the NeuroML eco-system, the NeuroML community and how to get in touch with us, please see the documentation at https://docs.neuroml.org. + + +User documentation +************************ + .. toctree:: :maxdepth: 2 @@ -11,9 +18,8 @@ libNeuroML: documentation examples -======================= Developer documentation -======================= +************************ .. toctree:: :maxdepth: 2 @@ -22,7 +28,7 @@ Developer documentation implementation_of_bindings Events and meetings -==================== +************************ .. toctree:: :maxdepth: 1 @@ -30,7 +36,7 @@ Events and meetings meeting_june_2012 Miscellaneous -============== +************************ .. toctree:: :maxdepth: 1 @@ -39,11 +45,9 @@ Miscellaneous Indices and tables -================== +************************ * :ref:`genindex` * :ref:`modindex` * :ref:`search` - - From 895a841b082c95c9c3fc6f23ab0aa6bfef427920 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:29:13 +0000 Subject: [PATCH 08/27] enh(docs): fix version information In neuroml/__init__.py, "__version__" is mentioned twice: in the second line to generate "__version_info__". So, the value from the later line, ".", was being picked up in conf.py. --- doc/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index ee7c062e..2fd9b349 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -51,9 +51,12 @@ # built documents. # # The short X.Y version. -for l in open('../neuroml/__init__.py'): - if '__version__' in l: - version = l.split("'")[1] +version = "" +for aline in open('../neuroml/__init__.py'): + # space here is important since __version__ is used in generation of + # version_info also + if '__version__ =' in aline: + version = aline.split("'")[1] # The full version, including alpha/beta/rc tags. release = version From 5ef5ca4fd0f6b8c10c7cdfeb694f1af0fec29812 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:35:18 +0000 Subject: [PATCH 09/27] chore(docs): fix flake warnings --- doc/conf.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 2fd9b349..9aaf6f25 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,7 +11,8 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys +import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -177,7 +178,6 @@ # -- Options for LaTeX output -------------------------------------------------- -latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', @@ -186,13 +186,13 @@ # Additional stuff for the LaTeX preamble. #'preamble': '', -} +latex_elements = {} # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'libNeuroML.tex', u'libNeuroML Documentation', - u'libNeuroML authors and contributors', 'manual'), + ('index', 'libNeuroML.tex', 'libNeuroML Documentation', + 'libNeuroML authors and contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -221,8 +221,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'libneuroml', u'libNeuroML Documentation', - [u'libNeuroML authors and contributors'], 1) + ('index', 'libneuroml', 'libNeuroML Documentation', + ['libNeuroML authors and contributors'], 1) ] # If true, show URL addresses after external links. @@ -235,9 +235,9 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'libNeuroML', u'libNeuroML Documentation', - u'libNeuroML authors and contributors', 'libNeuroML', 'One line description of project.', - 'Miscellaneous'), + ('index', 'libNeuroML', 'libNeuroML Documentation', + 'libNeuroML authors and contributors', 'libNeuroML', 'This package provides libNeuroML for working with neuronal models specified in NeuroML 2.', + 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. From 1127b394f1b98cf5b5d836d877f99f42388fd8ff Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:37:37 +0000 Subject: [PATCH 10/27] chore(docs): remove reference to missing document --- doc/meeting_june_2012.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/meeting_june_2012.rst b/doc/meeting_june_2012.rst index a5d204c2..b00aacc3 100644 --- a/doc/meeting_june_2012.rst +++ b/doc/meeting_june_2012.rst @@ -18,10 +18,6 @@ Minutes Agreeing on terminology (segments, etc.) & scope ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -An introduction to the background to the project and the projected scope is here: - -:doc:`scope_of_project` - A discussion on the definitions of the key terms Node, Segment and Section is here, and was the basis for discussions on these definitions at the meeting: @@ -193,4 +189,4 @@ to interact with simulators is currently termed "Pyramidal", but this will event http://neuralensemble.org/trac/PyNN http://www.neuroml.org/NeuroML2CoreTypes/PyNN.html -http://www.neuroml.org/pynn.php \ No newline at end of file +http://www.neuroml.org/pynn.php From 331168ffe07fffcd2b424ca83a4f0f3a376e8e00 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:52:00 +0000 Subject: [PATCH 11/27] enh(docs): use sphinx-bibtex extension to refer to paper(s) --- doc/bibliography.rst | 5 +++++ doc/conf.py | 5 ++++- doc/index.rst | 4 ++-- doc/introduction.rst | 18 +++++++----------- doc/refs.bib | 23 +++++++++++++++++++++++ 5 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 doc/bibliography.rst create mode 100644 doc/refs.bib diff --git a/doc/bibliography.rst b/doc/bibliography.rst new file mode 100644 index 00000000..2e03d015 --- /dev/null +++ b/doc/bibliography.rst @@ -0,0 +1,5 @@ +References +========== + +.. bibliography:: + :all: diff --git a/doc/conf.py b/doc/conf.py index 9aaf6f25..2cfe2ac0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,7 +29,10 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', + 'sphinxcontrib.bibtex'] + +bibtex_bibfiles = ['refs.bib'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/index.rst b/doc/index.rst index c5ec5557..2086e01a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -16,6 +16,7 @@ User documentation install api examples + bibliography Developer documentation @@ -45,9 +46,8 @@ Miscellaneous Indices and tables -************************ +******************* * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/doc/introduction.rst b/doc/introduction.rst index ebd1363e..8d078075 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -1,19 +1,15 @@ Introduction ============ -This package provides Python libNeuroML, for working with neuronal models specified in `NeuroML 2 `_. +This package provides Python libNeuroML, for working with neuronal models specified in `NeuroML 2 `_. -NOTE: libNeuroML targets `NeuroML v2.0`_ (described in -`Cannon et al, 2014 `_) not NeuroML v1.8.1 -(`Gleeson et al. 2010 `_). +.. warning:: **libNeuroML targets NeuroML v2.0** -For a detailed description of libNeuroML see: + libNeuroML targets `NeuroML v2.0`_, which is described in `Cannon et al, 2014 `_). + NeuroML v1.8.1 (`Gleeson et al. 2010 `_) is now deprecated and not supported by libNeuroML. -| Michael Vella, Robert C. Cannon, Sharon Crook, Andrew P. Davison, Gautham Ganapathy, Hugh P. C. Robinson, R. Angus Silver and Padraig Gleeson -| **libNeuroML and PyLEMS: using Python to combine procedural and declarative modeling approaches in computational neuroscience** -| `Frontiers in Neuroinformatics 2014 `_, doi: 10.3389/fninf.2014.00038 - -**PLEASE CITE THE PAPER ABOVE IF YOU USE libNeuroML!** +For a detailed description of libNeuroML see :cite:t:`Vella2014`. +*Please cite the paper if you use libNeuroML.* NeuroML ------- @@ -41,7 +37,7 @@ Other serialisations have been developed (HDF5, JSON, SWC). See -.. _NeuroML v2.0: http://www.neuroml.org/neuromlv2 +.. _NeuroML v2.0: http://docs.neuroml.org .. _LEMS: http://lems.github.io/LEMS/ .. _NeuroHDF: http://neurohdf.readthedocs.org/en/latest/ diff --git a/doc/refs.bib b/doc/refs.bib new file mode 100644 index 00000000..0eba5e03 --- /dev/null +++ b/doc/refs.bib @@ -0,0 +1,23 @@ +@Article{Vella2014, + author = {Vella, Michael and Cannon, Robert C. and Crook, Sharon and Davison, Andrew P. and Ganapathy, Gautham and Robinson, Hugh P. C. and Silver, R. Angus and Gleeson, Padraig}, + title = {libNeuroML and PyLEMS: using Python to combine procedural and declarative modeling approaches in computational neuroscience.}, + doi = {10.3389/fninf.2014.00038}, + issn = {1662-5196}, + pages = {38}, + volume = {8}, + abstract = {NeuroML is an XML-based model description language, which provides a powerful common data format for defining and exchanging models of neurons and neuronal networks. In the latest version of NeuroML, the structure and behavior of ion channel, synapse, cell, and network model descriptions are based on underlying definitions provided in LEMS, a domain-independent language for expressing hierarchical mathematical models of physical entities. While declarative approaches for describing models have led to greater exchange of model elements among software tools in computational neuroscience, a frequent criticism of XML-based languages is that they are difficult to work with directly. Here we describe two Application Programming Interfaces (APIs) written in Python (http://www.python.org), which simplify the process of developing and modifying models expressed in NeuroML and LEMS. The libNeuroML API provides a Python object model with a direct mapping to all NeuroML concepts defined by the NeuroML Schema, which facilitates reading and writing the XML equivalents. In addition, it offers a memory-efficient, array-based internal representation, which is useful for handling large-scale connectomics data. The libNeuroML API also includes support for performing common operations that are required when working with NeuroML documents. Access to the LEMS data model is provided by the PyLEMS API, which provides a Python implementation of the LEMS language, including the ability to simulate most models expressed in LEMS. Together, libNeuroML and PyLEMS provide a comprehensive solution for interacting with NeuroML models in a Python environment.}, + country = {Switzerland}, + issn-linking = {1662-5196}, + journal = {Frontiers in neuroinformatics}, + keywords = {API; LEMS; NeuroML; Python; SWC; model specification; modeling; standardization}, + nlm-id = {101477957}, + owner = {NLM}, + pmc = {PMC4005938}, + pmid = {24795618}, + pubmodel = {Electronic-eCollection}, + pubstatus = {epublish}, + revised = {2018-11-13}, + timestamp = {2019-02-20}, + year = {2014}, +} + From df4dafcf3f6d2465b74d1d67cb12a5a27c2230ea Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 15:55:44 +0000 Subject: [PATCH 12/27] enh(docs): update introduction --- doc/introduction.rst | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/doc/introduction.rst b/doc/introduction.rst index 8d078075..303a592f 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -15,29 +15,19 @@ NeuroML ------- NeuroML provides an object model for describing neuronal morphologies, ion channels, synapses and 3D network structure. - -Any dynamical components (channels, synapses, abstract cell models) in `NeuroML v2.0`_ will have a definition "behind the scenes" in `LEMS`_. -However, all NeuroML files specify is that "element segment will contain element distal with attributes x, y, z, -diameter..." or "element izhikevichCell will have attributes a, b, c...". - -For more on NeuroML 2 and LEMS see `here `_. +For more information on NeuroML 2 and LEMS please see the `NeuroML documentation `_. Serialisations -------------- -The XML serialisation will be the "natural" serialisation and will follow closely the NeuroML -object model. The format of the XML will be specified by the XML Schema definition (XSD file). Note: -LEMS definitions of NeuroML ComponentTypes (defining what izhikevichCell does with a, b, c...) -and this XSD file (only saying the izhikevichCell element requires a, b, c...) are currently manually kept in line. - -Other serialisations have been developed (HDF5, JSON, SWC). See -`Vella et al. 2014 `_ for more details. - +The XML serialisation will be the "natural" serialisation and will follow closely the NeuroML object model. +The format of the XML will be specified by the XML Schema definition (XSD file). +Other serialisations have been developed (HDF5, JSON, SWC). +Please see :cite:t:`Vella2014` for more details. .. _NeuroML v2.0: http://docs.neuroml.org .. _LEMS: http://lems.github.io/LEMS/ .. _NeuroHDF: http://neurohdf.readthedocs.org/en/latest/ - From a40c08d8d74b04ef96d6132fbf5cc37e55c002a0 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 16:17:44 +0000 Subject: [PATCH 13/27] enh(docs): update installation instructions --- doc/install.rst | 83 ++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index 3f5f34d6..3a1b2085 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -1,86 +1,60 @@ Installation ============ +Using Pip +---------- -Requirements ----------------------------------------- - - -For the default XML serialization (saving NeuroML to XML files), only *lxml* is required: - -:: - - sudo pip install lxml - -Alternatively, on Linux you can use: - -:: - - sudo apt-get install python-lxml - -To use the other serializations (e.g. HDF5, JSON, see `Vella et al. 2014 `_) -the following will also be required: - -:: - - sudo apt-get install libhdf5-serial-dev - sudo pip install numpy - sudo pip install numexpr - sudo pip install jsonpickle - sudo pip install pymongo - sudo pip install simplejson - sudo pip install tables - -See `.travis.yml `_ for the latest requirements on libraries etc. - -Install libNeuroML via pip ----------------------------------------- +On most systems with a Python installation, libNeuroML can be installed using the default Python package manager, Pip: :: pip install libNeuroML -This is always the latest stable branch from GitHub, and installs the minimal requirements (``lxml``). +It is recommended to use a `virtual environment `_ when installing Python packages using `pip` to prevent these from conflicting with other system libraries. +This will support the default XML serialization. To install all of requirements to include the other serialisations, use :: + # On Ubuntu based systems sudo apt-get install libhdf5-dev pip install libNeuroML[full] The ``apt`` line is required at time of writing because PyTables' wheels for python 3.7 depend on the system libhdf5. +On Fedora based systems +------------------------ - -Install using a local copy of libNeuroML source ------------------------------------------------ - -Install `git`_ and type: +On `Fedora `_ Linux systems, the `NeuroFedora `_ community provides libNeuroML in the `standard Fedora repos `_ and can be installed using the following commands: :: - git clone git://github.com/NeuralEnsemble/libNeuroML.git - cd libNeuroML + sudo dnf install python3-libNeuroML -More details about the git repository and making your own branch/fork are `here `_. +Install from source +-------------------- +You can clone the `GitHub repository `_ and also build libNeuroML from the sources. +For this, you will need `git`_: -.. _Git: http://rogerdudler.github.com/git-guide/ +:: + git clone git://github.com/NeuralEnsemble/libNeuroML.git + cd libNeuroML -Use the standard install method for Python packages: +More details about the git repository and making your own branch/fork are `here `_. +To build and install libNeuroML, you can use the standard install method for Python packages (preferably in a virtual environment): :: - sudo python setup.py install + python setup.py install To use the **latest development version of libNeuroML**, switch to the development branch: - :: git checkout development @@ -94,21 +68,22 @@ Some sample scripts are included in `neuroml/examples`, e.g. : :: - cd neuroml/examples - python build_network.py + cd neuroml/examples + python build_network.py The standard examples can also be found :doc:`examples`. Unit tests ---------- -To run unit tests cd to the directory '/neuoroml/test' and use the python unittest module discover method: +To run unit tests cd to the directory `neuroml/test` and use the Python unittest module discover method: :: + cd neuroml/test/ python -m unittest discover -If everything worked your output should look something like this: +If all tests passed correctly, your output should look something like this: :: @@ -118,15 +93,19 @@ If everything worked your output should look something like this: OK -Alternatively install and use pytest: +You can also use PyTest to run tests. :: + pip install pytest pytest -v --strict -W all -To ignore some tests, like the mongodb test which requres a mongodb setup, run: +To ignore some tests, like the MongoDB test which requires a MongoDB setup, run: :: pytest -v -k "not mongodb" --strict -W all + + +.. _Git: https://git-scm.com From 441b7a131bf408160c62ca8923b79031dca1d258 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Thu, 25 Mar 2021 16:51:41 +0000 Subject: [PATCH 14/27] enh(docs): update contributing doc --- doc/how_to_contribute.rst | 127 +++++++++++--------------------------- 1 file changed, 36 insertions(+), 91 deletions(-) diff --git a/doc/how_to_contribute.rst b/doc/how_to_contribute.rst index 70e64597..a7b72d7c 100644 --- a/doc/how_to_contribute.rst +++ b/doc/how_to_contribute.rst @@ -1,30 +1,23 @@ How to contribute ================= -To contribute to libNeuroML you need a github account then you should -fork the repository at https://github.com/NeuralEnsemble/libNeuroML - -Note: Fork is not a bad thing on a Github workflow. Fork basically -means you have your own repository which is connected with upstream -(the main repository from which official releases will be made). You -can contribute back to upstream using `Pull Request`_ +libNeuroML development happens on GitHub, so you will need a GitHub account to contribute to the repository. +Contributions are made using the standard `Pull Request`_ workflow. Setting up ---------- -Have a quick view at the doc: http://help.github.com/fork-a-repo/ - -1. Fork the repo (done on github website). - Now you should have a libNeuroML under you username (mine for example sits - happily here: https://github.com/mattions/libNeuroML) +Please take a look at the GitHub documentation here: http://help.github.com/fork-a-repo/ -2. Clone your repo locally (This is done once!) +To begin, please fork the repo on the GitHub website. +You should now have a libNeuroML under you username. +Next, we clone our fork to get a local copy on our computer: :: git clone git@github.com:_username_/libNeuroML.git -3. Add upstream as remote branch which you follow +While not necessary, it is good practice to add the upstream repository as a remote that you will follow: :: @@ -32,114 +25,81 @@ Have a quick view at the doc: http://help.github.com/fork-a-repo/ git remote add upstream https://github.com/NeuralEnsemble/libNeuroML.git git fetch upstream + You can check which branch are you following doing: :: git branch -a -you should have something like: +You should have something like: :: - mattions@triton:libNeuroML(master*)$ git branch -a + git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/upstream/master -This means you are currently on branch master and there are two remotes -branches ``origin/master`` which is your origin master (the branch where -you master gets pushed automatically and ``upstream/master`` which is -the upstream master (the NeuroEnsemble one). Sync with upstream ------------------ -Before starting to do some work, I’ll suggest to get the latest -development going on the upstream repo +Before starting to do some work, please check to see that you have the latest copy of the sources in your local repository: :: git fetch upstream - git merge upstream/master - -If there are no conflict, you are all set, if there are some you can -solve them with - -:: - - git mergetool - -which will fire up your favourite merger to do a 3-ways merge. - -3-ways means you will have your *local* file on your left, the *remote* -file on your right, and the file in the middle is the conflicted one, -which you need to solve. - -A nice 3-ways merger makes this process very easy, and merging could be -fun. To see what you have currently installed just do ``git mergetool`` - -This is my response - -:: - - mattions@triton:libNeuroML(master*)$ git mergetool - merge tool candidates: meld opendiff kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse ecmerge p4merge araxis bc3 emerge vimdiff - No files need merging - -[Meld] (http://meldmerge.org/) is the first of the list and would be -automatically picked up by ``git mergetool``. Chose your favourite. - -Well done, now you are all set to do some cool work! + git checkout development + git merge upstream/development Working locally on a dedicated branch ------------------------------------- -Now you can work on your repo. The best way to do it is to create a -branch with a descriptive name which indicate what are you working on. +Now that we have a fork, we can start making our changes to the source code. +The best way to do it is to create a branch with a descriptive name to indicate what are you working on. +Generally, your will branch off from the upstream `development` branch, which will contain the latest code. -For example, just for the sake of this guide, I’m going to close `#2`_ +For example, just for the sake of this guide, I'm going to work on issue #2. :: + git checkout development git checkout -b fix-2 -Now, I’m working on a different branch from master which is fix-2 This -will come handy in a minute. + +We can work in this branch, and make as many commits as we need to: :: - hack hack hack + # hack hack hack git commit -am "some decent commit message here" -Now that I found how to fix this issue, I just want to push my branch -online and open a pull request. -1. Push the branch online +Once we have finished working, we can push the branch online to our fork: - :: +:: - git push origin fix-2 + git push origin fix-2 -2. Open the pull request -Here I want to open a pull-request to integrate ``fix-2`` into -``upstream/master`` +We can then open a pull-request to merge our ``fix-2`` branch into ``upstream/development``. +If your code is not ready to be included, you can update the code on your branch and any more commits you add there will be added to the Pull Request. +Members of the libNeuroML development team will then discuss your changes with you, perhaps suggest tweaks, and then merge it when ready. -To do that I click Pull-Request and automatically a new Issue `#3`_ is -created where it is possible to comment. +Continuous integration +----------------------- -If your code is not ready to be include, you can update the code on your -branch and automatically the Pull Request will sync to the latest -commit, so it is possible to change it after the Pull Request is -started. Don’t be scare to open one. +libNeuroML uses continuous integration (`Wikipedia `_). +Each commit to the master or development branches is tested, along with all commits to pull requests. +The latest status of the continuous integration tests can be seen `here on GitHub Actions `_. Release process --------------- -libNeuroML is part of the official NeuroML release cycle. As of -1/09/13 we are still ironing out the procedure. When a new libNueroML -release is ready the following needs to happen: + +libNeuroML is part of the official NeuroML release cycle. +When a new libNeuroML release is ready the following needs to happen: - Update version number in setup.py - update version number in doc/conf.py @@ -148,21 +108,6 @@ release is ready the following needs to happen: - merge development branch with master (This should happen via pull request - do not do the merge yourself even if you are an owner of the repository. - push latest release to PyPi -Miscellaneous -------------- - -- `Nice guide about git`_ - -- `Quick reference for git`_ - -- Remember to `tell git your name`_, so we know who contributes! - -- Always known in which branch you are using this `bash function`_ +More information on the NeuroML release process can be found on the `NeuroML documentation page `_. .. _Pull Request: http://help.github.com/send-pull-requests/ -.. _#2: https://github.com/NeuralEnsemble/libNeuroML/issues/2 -.. _#3: https://github.com/NeuralEnsemble/libNeuroML/issues/3 -.. _Nice guide about git: http://rogerdudler.github.com/git-guide/ -.. _tell git your name: http://help.github.com/set-your-user-name-email-and-github-token/ -.. _bash function: https://gist.github.com/2051095 -.. _Quick reference for git: http://gitref.org/ From 7a647195a4b5944f4a18dd2e9cce1539ae7c2218 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 09:59:32 +0000 Subject: [PATCH 15/27] enh(docs): split API docs to individual files --- doc/api.rst | 49 +++++++-------------------------------------- doc/arraymorph.rst | 10 +++++++++ doc/conf.py | 3 +++ doc/coreclasses.rst | 14 +++++++++++++ doc/loaders.rst | 9 +++++++++ doc/utils.rst | 7 +++++++ doc/writers.rst | 8 ++++++++ 7 files changed, 58 insertions(+), 42 deletions(-) create mode 100644 doc/arraymorph.rst create mode 100644 doc/coreclasses.rst create mode 100644 doc/loaders.rst create mode 100644 doc/utils.rst create mode 100644 doc/writers.rst diff --git a/doc/api.rst b/doc/api.rst index 90f083c2..54487358 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -1,48 +1,13 @@ API documentation ================= -:mod:`nml` Module (NeuroML Core classes) ------------------------------------------ +.. toctree:: + :maxdepth: 2 -Note: This module is included in the top level of the `neuroml` package, so you can use these classes by importing neuroml: + coreclasses + loaders + writers + utils + arraymorph -:: - from neuroml import AdExIaFCell - -.. automodule:: neuroml.nml.nml - :members: - :show-inheritance: - - -:mod:`loaders` Module ---------------------- - -.. automodule:: neuroml.loaders - :members: - :undoc-members: - :show-inheritance: - -:mod:`writers` Module ---------------------- - -.. automodule:: neuroml.writers - :members: - :undoc-members: - :show-inheritance: - -:mod:`utils` Module ---------------------- - -.. automodule:: neuroml.utils - :members: - :undoc-members: - :show-inheritance: - -:mod:`arraymorph` Module ------------------------- - -.. automodule:: neuroml.arraymorph - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/arraymorph.rst b/doc/arraymorph.rst new file mode 100644 index 00000000..243300eb --- /dev/null +++ b/doc/arraymorph.rst @@ -0,0 +1,10 @@ + +:mod:`arraymorph` Module +------------------------ + +.. automodule:: neuroml.arraymorph + :members: + :undoc-members: + :show-inheritance: + + diff --git a/doc/conf.py b/doc/conf.py index 2cfe2ac0..da0c6f79 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -34,6 +34,9 @@ bibtex_bibfiles = ['refs.bib'] +# Include TODOs in docs +todo_include_todos = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/coreclasses.rst b/doc/coreclasses.rst new file mode 100644 index 00000000..6abbdd86 --- /dev/null +++ b/doc/coreclasses.rst @@ -0,0 +1,14 @@ +:mod:`nml` Module (NeuroML Core classes) +----------------------------------------- + +Note: This module is included in the top level of the `neuroml` package, so you can use these classes by importing neuroml: + +:: + + from neuroml import AdExIaFCell + +.. automodule:: neuroml.nml.nml + :members: + + + diff --git a/doc/loaders.rst b/doc/loaders.rst new file mode 100644 index 00000000..e61a3dfd --- /dev/null +++ b/doc/loaders.rst @@ -0,0 +1,9 @@ +:mod:`loaders` Module +--------------------- + +.. automodule:: neuroml.loaders + :members: + :undoc-members: + :show-inheritance: + + diff --git a/doc/utils.rst b/doc/utils.rst new file mode 100644 index 00000000..596faa49 --- /dev/null +++ b/doc/utils.rst @@ -0,0 +1,7 @@ +:mod:`utils` Module +--------------------- + +.. automodule:: neuroml.utils + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/writers.rst b/doc/writers.rst new file mode 100644 index 00000000..723e1457 --- /dev/null +++ b/doc/writers.rst @@ -0,0 +1,8 @@ +:mod:`writers` Module +--------------------- + +.. automodule:: neuroml.writers + :members: + :undoc-members: + :show-inheritance: + From 2aedfd4b6d46153d0c316c58864c966e7eabe0f4 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 10:04:33 +0000 Subject: [PATCH 16/27] enh(nml.py): add docstrings to helper methods This will also ensure that they get picked up by sphinx for the docs --- neuroml/nml/helper_methods.py | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/neuroml/nml/helper_methods.py b/neuroml/nml/helper_methods.py index c39a0071..7c491caa 100644 --- a/neuroml/nml/helper_methods.py +++ b/neuroml/nml/helper_methods.py @@ -802,6 +802,13 @@ def __str__(self): # Get segment object by its id def get_segment(self, segment_id): + """Get segment object by its id + + :param segment_id: ID of segment + :return: segment + + :raises Exception: if the segment is not found in the cell + """ for segment in self.morphology.segments: if segment.id == segment_id: @@ -813,6 +820,16 @@ def get_segment(self, segment_id): # so the proximal point is on the parent (at a point set by fraction_along) def get_actual_proximal(self, segment_id): + """Get the proximal point of a segment. + + Get the proximal point of a segment, even the proximal field is None + and so the proximal point is on the parent (at a point set by + fraction_along). + + :param segment_id: ID of segment + :return: proximal point + """ + segment = self.get_segment(segment_id) if segment.proximal: return segment.proximal @@ -832,6 +849,11 @@ def get_actual_proximal(self, segment_id): return p def get_segment_length(self, segment_id): + """Get the length of the segment. + + :param segment_id: ID of segment + :return: length of segment + """ segment = self.get_segment(segment_id) if segment.proximal: @@ -844,6 +866,11 @@ def get_segment_length(self, segment_id): return length def get_segment_surface_area(self, segment_id): + """Get the surface area of the segment. + + :param segment_id: ID of the segment + :return: surface area of segment + """ segment = self.get_segment(segment_id) if segment.proximal: @@ -856,7 +883,11 @@ def get_segment_surface_area(self, segment_id): return temp_seg.surface_area def get_segment_volume(self, segment_id): + """Get volume of segment + :param segment_id: ID of the segment + :return: volume of the segment + """ segment = self.get_segment(segment_id) if segment.proximal: return segment.volume @@ -868,6 +899,10 @@ def get_segment_volume(self, segment_id): return temp_seg.volume def get_segment_ids_vs_segments(self): + """Get a dictionary of segment IDs and the segments in the cell. + + :return: dictionary with segment ID as key, and segment as value + """ segments = {} for segment in self.morphology.segments: @@ -878,6 +913,18 @@ def get_segment_ids_vs_segments(self): def get_all_segments_in_group(self, segment_group, assume_all_means_all=True): + """Get all the segments in a segment group of the cell. + + :param segment_group: segment group to get all segments of + :param assume_all_means_all: return all segments if the segment group + wasn't explicitly defined + + :todo: check docstring + + :return: list of segments + + :raises Exception: if no segment group is found in the cell. + """ if isinstance(segment_group, str): for sg in self.morphology.segment_groups: @@ -912,6 +959,20 @@ def get_ordered_segments_in_groups(self, include_cumulative_lengths=False, include_path_lengths=False, path_length_metric="Path Length from root"): # Only option supported + """ + Get ordered list of segments in specified groups + + :param group_list: list of groups to get segments from + :param check_parentage: verify parentage + :param include_commulative_lengths: also include cummulative lengths + :param include_path_lengths: also include path lengths + :param path_length_metric: + + :return: dictionary of segments with additional information depending + on what parameters were used: + + :raises: Exception if check_parentage is True and parentage cannot be verified + """ unord_segs = {} other_segs = {} @@ -1022,6 +1083,7 @@ def get_ordered_segments_in_groups(self, def summary(self): + """Print cell summary.""" print("*******************************************************") print("* Cell: "+str(self.id)) print("* Notes: "+str(self.notes)) @@ -1436,12 +1498,14 @@ def exportHdf5(self, h5file, h5Group): source='''\ def _get_cell_id(self,ref): + """Get cell ID""" if '[' in ref: return int(ref.split('[')[1].split(']')[0]) else: return int(ref.split('/')[2]) def _get_population(self,ref): + """Get population""" if '[' in ref: return ref.split('[')[0] else: @@ -1464,12 +1528,14 @@ def __str__(self): source='''\ def get_target_cell_id(self,): + """Get target cell ID""" if '[' in self.target: return int(self.target.split('[')[1].split(']')[0]) else: return int(self.target.split('/')[2]) def get_target_population(self,): + """Get target population.""" if '[' in self.target: return self.target.split('[')[0] else: From 1e9d6edd120b42659c6f01ea4c9e36baddca9eb9 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 10:05:39 +0000 Subject: [PATCH 17/27] chore(nml.py): regenerate nml.py --- neuroml/nml/README.md | 19 +- neuroml/nml/nml.py | 14482 +++++++++++++++++++++++++--------------- 2 files changed, 9198 insertions(+), 5303 deletions(-) diff --git a/neuroml/nml/README.md b/neuroml/nml/README.md index 7fb4b7b8..245c930c 100644 --- a/neuroml/nml/README.md +++ b/neuroml/nml/README.md @@ -16,4 +16,21 @@ You may have to add the current folder to your PYTHONPATH, i.e. export PYTHONPATH=$PYTHONPATH:. -Note from PG Feb 2021: retested & regenerated using Python 2.7 with generateDS.py v2.30.11- currently fails when generated with Python 3... + +### Changelog + +#### March 26, 2020 + +Author: @sanjayankur31 + +Generated using Python 3.9 for NeuroMLv2.1.xsd using generateDS.py 2.35.5 + + # Generated Fri Mar 26 09:44:40 2021 by generateDS.py version 2.35.5. + # Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] + # ~/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --silence --user-methods="helper_methods.py" NeuroML_v2.1.xsd + +#### February 2020 + +Author: @pgleeson + +Retested & regenerated using Python 2.7 with generateDS.py v2.30.11- currently fails when generated with Python 3. diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index b8281f42..99bdf47c 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -2,31 +2,32 @@ # -*- coding: utf-8 -*- # -# Generated Mon Feb 15 14:47:04 2021 by generateDS.py version 2.30.11. -# Python 2.7.15 |Anaconda, Inc.| (default, Oct 23 2018, 13:35:16) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] +# Generated Fri Mar 26 09:44:40 2021 by generateDS.py version 2.35.5. +# Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] # # Command line options: # ('-o', 'nml.py') -# ('-f', '') # ('--use-getter-setter', 'none') # ('--silence', '') -# ('--user-methods', 'helper_methods') +# ('--user-methods', 'helper_methods.py') # # Command line arguments: # NeuroML_v2.1.xsd # # Command line: -# /Users/padraig/anaconda/envs/py27/bin/generateDS.py -o "nml.py" -f --use-getter-setter="none" --silence --user-methods="helper_methods" NeuroML_v2.1.xsd +# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --silence --user-methods="helper_methods.py" NeuroML_v2.1.xsd # # Current working directory (os.getcwd()): # nml # +from six.moves import zip_longest +import os import sys import re as re_ import base64 import datetime as datetime_ -import warnings as warnings_ +import decimal as decimal_ try: from lxml import etree as etree_ except ImportError: @@ -34,8 +35,9 @@ Validate_simpletypes_ = True +SaveElementTreeNode = True if sys.version_info.major == 2: - BaseStrType_ = basestring # noqa: F821 + BaseStrType_ = basestring else: BaseStrType_ = str @@ -49,6 +51,11 @@ def parsexml_(infile, parser=None, **kwargs): except AttributeError: # fallback to xml.etree parser = etree_.XMLParser() + try: + if isinstance(infile, os.PathLike): + infile = os.path.join(infile) + except AttributeError: + pass doc = etree_.parse(infile, parser=parser, **kwargs) return doc @@ -73,7 +80,7 @@ def parsexmlstring_(instring, parser=None, **kwargs): # definitions. The export method for any class for which there is # a namespace prefix definition, will export that definition in the # XML representation of that element. See the export method of -# any generated element type class for a example of the use of this +# any generated element type class for an example of the use of this # table. # A sample table is: # @@ -84,11 +91,75 @@ def parsexmlstring_(instring, parser=None, **kwargs): # "ElementtypeB": "http://www.xxx.com/namespaceB", # } # +# Additionally, the generatedsnamespaces module can contain a python +# dictionary named GenerateDSNamespaceTypePrefixes that associates element +# types with the namespace prefixes that are to be added to the +# "xsi:type" attribute value. See the exportAttributes method of +# any generated element type and the generation of "xsi:type" for an +# example of the use of this table. +# An example table: +# +# # File: generatedsnamespaces.py +# +# GenerateDSNamespaceTypePrefixes = { +# "ElementtypeC": "aaa:", +# "ElementtypeD": "bbb:", +# } +# try: from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ except ImportError: GenerateDSNamespaceDefs_ = {} +try: + from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ +except ImportError: + GenerateDSNamespaceTypePrefixes_ = {} + +# +# You can replace the following class definition by defining an +# importable module named "generatedscollector" containing a class +# named "GdsCollector". See the default class definition below for +# clues about the possible content of that class. +# +try: + from generatedscollector import GdsCollector as GdsCollector_ +except ImportError: + + class GdsCollector_(object): + + def __init__(self, messages=None): + if messages is None: + self.messages = [] + else: + self.messages = messages + + def add_message(self, msg): + self.messages.append(msg) + + def get_messages(self): + return self.messages + + def clear_messages(self): + self.messages = [] + + def print_messages(self): + for msg in self.messages: + print("Warning: {}".format(msg)) + + def write_messages(self, outstream): + for msg in self.messages: + outstream.write("Warning: {}\n".format(msg)) + + +# +# The super-class for enum types +# + +try: + from enum import Enum +except ImportError: + Enum = object # # The root super-class for element type classes @@ -102,6 +173,7 @@ def parsexmlstring_(instring, parser=None, **kwargs): except ImportError as exp: class GeneratedsSuper(object): + __hash__ = object.__hash__ tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$') class _FixedOffsetTZ(datetime_.tzinfo): def __init__(self, offset, name): @@ -115,6 +187,8 @@ def dst(self, dt): return None def gds_format_string(self, input_data, input_name=''): return input_data + def gds_parse_string(self, input_data, node=None, input_name=''): + return input_data def gds_validate_string(self, input_data, node=None, input_name=''): if not input_data: return '' @@ -126,8 +200,18 @@ def gds_validate_base64(self, input_data, node=None, input_name=''): return input_data def gds_format_integer(self, input_data, input_name=''): return '%d' % input_data + def gds_parse_integer(self, input_data, node=None, input_name=''): + try: + ival = int(input_data) + except (TypeError, ValueError) as exp: + raise_parse_error(node, 'Requires integer value: %s' % exp) + return ival def gds_validate_integer(self, input_data, node=None, input_name=''): - return input_data + try: + value = int(input_data) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires integer value') + return value def gds_format_integer_list(self, input_data, input_name=''): return '%s' % ' '.join(input_data) def gds_validate_integer_list( @@ -137,12 +221,22 @@ def gds_validate_integer_list( try: int(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of integers') + raise_parse_error(node, 'Requires sequence of integer valuess') return values def gds_format_float(self, input_data, input_name=''): return ('%.15f' % input_data).rstrip('0') + def gds_parse_float(self, input_data, node=None, input_name=''): + try: + fval_ = float(input_data) + except (TypeError, ValueError) as exp: + raise_parse_error(node, 'Requires float or double value: %s' % exp) + return fval_ def gds_validate_float(self, input_data, node=None, input_name=''): - return input_data + try: + value = float(input_data) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires float value') + return value def gds_format_float_list(self, input_data, input_name=''): return '%s' % ' '.join(input_data) def gds_validate_float_list( @@ -152,12 +246,47 @@ def gds_validate_float_list( try: float(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of floats') + raise_parse_error(node, 'Requires sequence of float values') + return values + def gds_format_decimal(self, input_data, input_name=''): + return ('%0.10f' % input_data).rstrip('0') + def gds_parse_decimal(self, input_data, node=None, input_name=''): + try: + decimal_value = decimal_.Decimal(input_data) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires decimal value') + return decimal_value + def gds_validate_decimal(self, input_data, node=None, input_name=''): + try: + value = decimal_.Decimal(input_data) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires decimal value') + return value + def gds_format_decimal_list(self, input_data, input_name=''): + return '%s' % ' '.join(input_data) + def gds_validate_decimal_list( + self, input_data, node=None, input_name=''): + values = input_data.split() + for value in values: + try: + decimal_.Decimal(value) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires sequence of decimal values') return values def gds_format_double(self, input_data, input_name=''): return '%e' % input_data + def gds_parse_double(self, input_data, node=None, input_name=''): + try: + fval_ = float(input_data) + except (TypeError, ValueError) as exp: + raise_parse_error(node, 'Requires double or float value: %s' % exp) + return fval_ def gds_validate_double(self, input_data, node=None, input_name=''): - return input_data + try: + value = float(input_data) + except (TypeError, ValueError): + raise_parse_error(node, 'Requires double or float value') + return value def gds_format_double_list(self, input_data, input_name=''): return '%s' % ' '.join(input_data) def gds_validate_double_list( @@ -167,11 +296,25 @@ def gds_validate_double_list( try: float(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of doubles') + raise_parse_error( + node, 'Requires sequence of double or float values') return values def gds_format_boolean(self, input_data, input_name=''): return ('%s' % input_data).lower() + def gds_parse_boolean(self, input_data, node=None, input_name=''): + if input_data in ('true', '1'): + bval = True + elif input_data in ('false', '0'): + bval = False + else: + raise_parse_error(node, 'Requires boolean value') + return bval def gds_validate_boolean(self, input_data, node=None, input_name=''): + if input_data not in (True, 1, False, 0, ): + raise_parse_error( + node, + 'Requires boolean value ' + '(one of True, 1, False, 0)') return input_data def gds_format_boolean_list(self, input_data, input_name=''): return '%s' % ' '.join(input_data) @@ -179,11 +322,11 @@ def gds_validate_boolean_list( self, input_data, node=None, input_name=''): values = input_data.split() for value in values: - if value not in ('true', '1', 'false', '0', ): + if value not in (True, 1, False, 0, ): raise_parse_error( node, - 'Requires sequence of booleans ' - '("true", "1", "false", "0")') + 'Requires sequence of boolean values ' + '(one of True, 1, False, 0)') return values def gds_validate_datetime(self, input_data, node=None, input_name=''): return input_data @@ -368,6 +511,50 @@ def gds_parse_time(cls, input_data): dt = datetime_.datetime.strptime(input_data, '%H:%M:%S') dt = dt.replace(tzinfo=tz) return dt.time() + def gds_check_cardinality_( + self, value, input_name, + min_occurs=0, max_occurs=1, required=None): + if value is None: + length = 0 + elif isinstance(value, list): + length = len(value) + else: + length = 1 + if required is not None : + if required and length < 1: + self.gds_collector_.add_message( + "Required value {}{} is missing".format( + input_name, self.gds_get_node_lineno_())) + if length < min_occurs: + self.gds_collector_.add_message( + "Number of values for {}{} is below " + "the minimum allowed, " + "expected at least {}, found {}".format( + input_name, self.gds_get_node_lineno_(), + min_occurs, length)) + elif length > max_occurs: + self.gds_collector_.add_message( + "Number of values for {}{} is above " + "the maximum allowed, " + "expected at most {}, found {}".format( + input_name, self.gds_get_node_lineno_(), + max_occurs, length)) + def gds_validate_builtin_ST_( + self, validator, value, input_name, + min_occurs=None, max_occurs=None, required=None): + if value is not None: + try: + validator(value, input_name=input_name) + except GDSParseError as parse_error: + self.gds_collector_.add_message(str(parse_error)) + def gds_validate_defined_ST_( + self, validator, value, input_name, + min_occurs=None, max_occurs=None, required=None): + if value is not None: + try: + validator(value) + except GDSParseError as parse_error: + self.gds_collector_.add_message(str(parse_error)) def gds_str_lower(self, instring): return instring.lower() def get_path_(self, node): @@ -397,7 +584,10 @@ def get_class_obj_(self, node, default_class=None): class_obj1 = class_obj2 return class_obj1 def gds_build_any(self, node, type_name=None): - return None + # provide default value in case option --disable-xml is used. + content = "" + content = etree_.tostring(node, encoding="unicode") + return content @classmethod def gds_reverse_node_mapping(cls, mapping): return dict(((v, k) for k, v in mapping.items())) @@ -415,17 +605,40 @@ def gds_encode(instring): def convert_unicode(instring): if isinstance(instring, str): result = quote_xml(instring) - elif sys.version_info.major == 2 and isinstance(instring, unicode): # noqa: F821 + elif sys.version_info.major == 2 and isinstance(instring, unicode): result = quote_xml(instring).encode('utf8') else: result = GeneratedsSuper.gds_encode(str(instring)) return result def __eq__(self, other): + def excl_select_objs_(obj): + return (obj[0] != 'parent_object_' and + obj[0] != 'gds_collector_') if type(self) != type(other): return False - return self.__dict__ == other.__dict__ + return all(x == y for x, y in zip_longest( + filter(excl_select_objs_, self.__dict__.items()), + filter(excl_select_objs_, other.__dict__.items()))) def __ne__(self, other): return not self.__eq__(other) + # Django ETL transform hooks. + def gds_djo_etl_transform(self): + pass + def gds_djo_etl_transform_db_obj(self, dbobj): + pass + # SQLAlchemy ETL transform hooks. + def gds_sqa_etl_transform(self): + return 0, None + def gds_sqa_etl_transform_db_obj(self, dbobj): + pass + def gds_get_node_lineno_(self): + if (hasattr(self, "gds_elementtree_node_") and + self.gds_elementtree_node_ is not None): + return ' near line {}'.format( + self.gds_elementtree_node_.sourceline) + else: + return "" + def getSubclassFromModule_(module, class_): '''Get the subclass of a class from a specific module.''' @@ -456,6 +669,10 @@ def getSubclassFromModule_(module, class_): # ExternalEncoding = '' +# Set this to false in order to deactivate during export, the use of +# name space prefixes captured from the input document. +UseCapturedNS_ = True +CapturedNsmap_ = {} Tag_pattern_ = re_.compile(r'({.*})?(.*)') String_cleanup_pat_ = re_.compile(r"[\n\r\s]+") Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)') @@ -557,12 +774,17 @@ def find_attr_value_(attr_name, node): return value +def encode_str_2_3(instr): + return instr + + class GDSParseError(Exception): pass def raise_parse_error(node, msg): - msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, ) + if node is not None: + msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, ) raise GDSParseError(msg) @@ -725,25 +947,27 @@ def _cast(typ, value): # -class BlockTypes(object): +class BlockTypes(Enum): VOLTAGE_CONC_DEP_BLOCK_MECHANISM='voltageConcDepBlockMechanism' -class Metric(object): +class Metric(Enum): + """Allowed metrics for InhomogeneousParam""" PATH_LENGTHFROMROOT='Path Length from root' -class PlasticityTypes(object): +class PlasticityTypes(Enum): TSODYKS_MARKRAM_DEP_MECHANISM='tsodyksMarkramDepMechanism' TSODYKS_MARKRAM_DEP_FAC_MECHANISM='tsodyksMarkramDepFacMechanism' -class ZeroOrOne(object): +class ZeroOrOne(Enum): + """Value which is either 0 or 1""" _0='0' _1='1' -class allowedSpaces(object): +class allowedSpaces(Enum): EUCLIDEAN__1_D='Euclidean_1D' EUCLIDEAN__2_D='Euclidean_2D' EUCLIDEAN__3_D='Euclidean_3D' @@ -752,12 +976,12 @@ class allowedSpaces(object): GRID__3_D='Grid_3D' -class channelTypes(object): +class channelTypes(Enum): ION_CHANNEL_PASSIVE='ionChannelPassive' ION_CHANNEL_HH='ionChannelHH' -class gateTypes(object): +class gateTypes(Enum): GATE_H_HRATES='gateHHrates' GATE_H_HRATES_TAU='gateHHratesTau' GATE_H_HTAU_INF='gateHHtauInf' @@ -768,29 +992,35 @@ class gateTypes(object): GATE_FRACTIONAL='gateFractional' -class networkTypes(object): +class networkTypes(Enum): NETWORK='network' NETWORK_WITH_TEMPERATURE='networkWithTemperature' -class populationTypes(object): +class populationTypes(Enum): POPULATION='population' POPULATION_LIST='populationList' class Property(GeneratedsSuper): """Generic property with a tag and value""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tag', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('tag', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, tag=None, value=None, **kwargs_): + def __init__(self, tag=None, value=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.tag = _cast(None, tag) + self.tag_nsprefix_ = None self.value = _cast(None, value) + self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -819,6 +1049,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -838,12 +1070,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Property', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tag', node) @@ -854,21 +1090,25 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Property class Annotation(GeneratedsSuper): """Placeholder for MIRIAM related metadata, among others.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = None - def __init__(self, anytypeobjs_=None, **kwargs_): + def __init__(self, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -891,7 +1131,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Annotation', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Annotation', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Annotation') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -901,6 +1141,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -914,80 +1156,97 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Annotation'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Annotation', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Annotation', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'Annotation') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'Annotation') + self.add_anytypeobjs_(content_) # end class Annotation class ComponentType(GeneratedsSuper): """Contains an extension to NeuroML by creating custom LEMS ComponentType.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('extends', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('Property', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'LEMS_Property', u'name': u'Property', u'minOccurs': u'0'}, None), - MemberSpec_('Parameter', 'Parameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Parameter', u'name': u'Parameter', u'minOccurs': u'0'}, None), - MemberSpec_('Constant', 'Constant', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Constant', u'name': u'Constant', u'minOccurs': u'0'}, None), - MemberSpec_('Exposure', 'Exposure', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Exposure', u'name': u'Exposure', u'minOccurs': u'0'}, None), - MemberSpec_('Requirement', 'Requirement', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Requirement', u'name': u'Requirement', u'minOccurs': u'0'}, None), - MemberSpec_('InstanceRequirement', 'InstanceRequirement', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InstanceRequirement', u'name': u'InstanceRequirement', u'minOccurs': u'0'}, None), - MemberSpec_('Dynamics', 'Dynamics', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Dynamics', u'name': u'Dynamics', u'minOccurs': u'0'}, None), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('extends', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('Property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Property', 'type': 'LEMS_Property'}, None), + MemberSpec_('Parameter', 'Parameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Parameter', 'type': 'Parameter'}, None), + MemberSpec_('Constant', 'Constant', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Constant', 'type': 'Constant'}, None), + MemberSpec_('Exposure', 'Exposure', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Exposure', 'type': 'Exposure'}, None), + MemberSpec_('Requirement', 'Requirement', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Requirement', 'type': 'Requirement'}, None), + MemberSpec_('InstanceRequirement', 'InstanceRequirement', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'InstanceRequirement', 'type': 'InstanceRequirement'}, None), + MemberSpec_('Dynamics', 'Dynamics', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Dynamics', 'type': 'Dynamics'}, None), ] subclass = None superclass = None - def __init__(self, name=None, extends=None, description=None, Property=None, Parameter=None, Constant=None, Exposure=None, Requirement=None, InstanceRequirement=None, Dynamics=None, **kwargs_): + def __init__(self, name=None, extends=None, description=None, Property=None, Parameter=None, Constant=None, Exposure=None, Requirement=None, InstanceRequirement=None, Dynamics=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) + self.name_nsprefix_ = None self.extends = _cast(None, extends) + self.extends_nsprefix_ = None self.description = _cast(None, description) + self.description_nsprefix_ = None if Property is None: self.Property = [] else: self.Property = Property + self.Property_nsprefix_ = None if Parameter is None: self.Parameter = [] else: self.Parameter = Parameter + self.Parameter_nsprefix_ = None if Constant is None: self.Constant = [] else: self.Constant = Constant + self.Constant_nsprefix_ = None if Exposure is None: self.Exposure = [] else: self.Exposure = Exposure + self.Exposure_nsprefix_ = None if Requirement is None: self.Requirement = [] else: self.Requirement = Requirement + self.Requirement_nsprefix_ = None if InstanceRequirement is None: self.InstanceRequirement = [] else: self.InstanceRequirement = InstanceRequirement + self.InstanceRequirement_nsprefix_ = None if Dynamics is None: self.Dynamics = [] else: self.Dynamics = Dynamics + self.Dynamics_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1012,7 +1271,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ComponentType', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ComponentType', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ComponentType') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -1022,6 +1281,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1043,31 +1304,42 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.description is not None and 'description' not in already_processed: already_processed.add('description') outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ComponentType', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ComponentType', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for Property_ in self.Property: + namespaceprefix_ = self.Property_nsprefix_ + ':' if (UseCapturedNS_ and self.Property_nsprefix_) else '' Property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Property', pretty_print=pretty_print) for Parameter_ in self.Parameter: + namespaceprefix_ = self.Parameter_nsprefix_ + ':' if (UseCapturedNS_ and self.Parameter_nsprefix_) else '' Parameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Parameter', pretty_print=pretty_print) for Constant_ in self.Constant: + namespaceprefix_ = self.Constant_nsprefix_ + ':' if (UseCapturedNS_ and self.Constant_nsprefix_) else '' Constant_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Constant', pretty_print=pretty_print) for Exposure_ in self.Exposure: + namespaceprefix_ = self.Exposure_nsprefix_ + ':' if (UseCapturedNS_ and self.Exposure_nsprefix_) else '' Exposure_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Exposure', pretty_print=pretty_print) for Requirement_ in self.Requirement: + namespaceprefix_ = self.Requirement_nsprefix_ + ':' if (UseCapturedNS_ and self.Requirement_nsprefix_) else '' Requirement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Requirement', pretty_print=pretty_print) for InstanceRequirement_ in self.InstanceRequirement: + namespaceprefix_ = self.InstanceRequirement_nsprefix_ + ':' if (UseCapturedNS_ and self.InstanceRequirement_nsprefix_) else '' InstanceRequirement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='InstanceRequirement', pretty_print=pretty_print) for Dynamics_ in self.Dynamics: + namespaceprefix_ = self.Dynamics_nsprefix_ + ':' if (UseCapturedNS_ and self.Dynamics_nsprefix_) else '' Dynamics_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Dynamics', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1082,40 +1354,40 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'Property': obj_ = LEMS_Property.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Property.append(obj_) obj_.original_tagname_ = 'Property' elif nodeName_ == 'Parameter': obj_ = Parameter.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Parameter.append(obj_) obj_.original_tagname_ = 'Parameter' elif nodeName_ == 'Constant': obj_ = Constant.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Constant.append(obj_) obj_.original_tagname_ = 'Constant' elif nodeName_ == 'Exposure': obj_ = Exposure.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Exposure.append(obj_) obj_.original_tagname_ = 'Exposure' elif nodeName_ == 'Requirement': obj_ = Requirement.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Requirement.append(obj_) obj_.original_tagname_ = 'Requirement' elif nodeName_ == 'InstanceRequirement': obj_ = InstanceRequirement.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.InstanceRequirement.append(obj_) obj_.original_tagname_ = 'InstanceRequirement' elif nodeName_ == 'Dynamics': obj_ = Dynamics.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Dynamics.append(obj_) obj_.original_tagname_ = 'Dynamics' # end class ComponentType @@ -1123,21 +1395,29 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Constant(GeneratedsSuper): """LEMS ComponentType for Constant.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('value', 'Nml2Quantity', 0, 0, {'use': u'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('value', 'Nml2Quantity', 0, 0, {'use': 'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, value=None, description=None, **kwargs_): + def __init__(self, name=None, dimension=None, value=None, description=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) + self.name_nsprefix_ = None self.dimension = _cast(None, dimension) + self.dimension_nsprefix_ = None self.value = _cast(None, value) + self.value_nsprefix_ = None self.description = _cast(None, description) + self.description_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1151,11 +1431,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_patterns_, )) - validate_Nml2Quantity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_patterns_, )) + validate_Nml2Quantity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*)$']] def hasContent_(self): if ( @@ -1173,6 +1457,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1192,18 +1478,22 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' dimension=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.dimension), input_name='dimension')), )) if self.value is not None and 'value' not in already_processed: already_processed.add('value') - outfile.write(' value=%s' % (quote_attrib(self.value), )) + outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) if self.description is not None and 'description' not in already_processed: already_processed.add('description') outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Constant', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1223,26 +1513,33 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Constant class Exposure(GeneratedsSuper): """LEMS Exposure (ComponentType property)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) + self.name_nsprefix_ = None self.dimension = _cast(None, dimension) + self.dimension_nsprefix_ = None self.description = _cast(None, description) + self.description_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1271,6 +1568,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1293,12 +1592,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Exposure', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1313,25 +1616,32 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Exposure class NamedDimensionalType(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, extensiontype_=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) + self.name_nsprefix_ = None self.dimension = _cast(None, dimension) + self.dimension_nsprefix_ = None self.description = _cast(None, description) + self.description_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1361,6 +1671,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1384,15 +1696,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NamedDimensionalType', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1411,27 +1731,35 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class NamedDimensionalType class NamedDimensionalVariable(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('exposure', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('exposure', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, exposure=None, extensiontype_=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, exposure=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) + self.name_nsprefix_ = None self.dimension = _cast(None, dimension) + self.dimension_nsprefix_ = None self.description = _cast(None, description) + self.description_nsprefix_ = None self.exposure = _cast(None, exposure) + self.exposure_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1461,6 +1789,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1487,15 +1817,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NamedDimensionalVariable', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1518,19 +1856,23 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class NamedDimensionalVariable class Parameter(NamedDimensionalType): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(Parameter, self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1560,6 +1902,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1573,34 +1917,43 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Parameter'): super(Parameter, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Parameter') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Parameter', fromsubclass_=False, pretty_print=True): - super(Parameter, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Parameter, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Parameter, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Parameter, self).buildChildren(child_, node, nodeName_, True) pass # end class Parameter class LEMS_Property(NamedDimensionalType): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('default_value', 'xs:double', 0, 1, {'use': u'optional'}), + MemberSpec_('defaultValue', 'xs:double', 0, 1, {'use': 'optional'}), ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, default_value=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, defaultValue=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(LEMS_Property, self).__init__(name, dimension, description, **kwargs_) - self.default_value = _cast(float, default_value) + self.defaultValue = _cast(float, defaultValue) + self.defaultValue_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1629,6 +1982,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1641,42 +1996,48 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='LEMS_Property'): super(LEMS_Property, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='LEMS_Property') - if self.default_value is not None and 'default_value' not in already_processed: - already_processed.add('default_value') - outfile.write(' defaultValue="%s"' % self.gds_format_double(self.default_value, input_name='defaultValue')) + if self.defaultValue is not None and 'defaultValue' not in already_processed: + already_processed.add('defaultValue') + outfile.write(' defaultValue="%s"' % self.gds_format_double(self.defaultValue, input_name='defaultValue')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='LEMS_Property', fromsubclass_=False, pretty_print=True): - super(LEMS_Property, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(LEMS_Property, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('defaultValue', node) if value is not None and 'defaultValue' not in already_processed: already_processed.add('defaultValue') - try: - self.default_value = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (defaultValue): %s' % exp) + value = self.gds_parse_double(value, node, 'defaultValue') + self.defaultValue = value super(LEMS_Property, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(LEMS_Property, self).buildChildren(child_, node, nodeName_, True) pass # end class LEMS_Property class Requirement(NamedDimensionalType): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(Requirement, self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1706,6 +2067,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1719,35 +2082,45 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Requirement'): super(Requirement, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Requirement') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Requirement', fromsubclass_=False, pretty_print=True): - super(Requirement, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Requirement, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Requirement, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Requirement, self).buildChildren(child_, node, nodeName_, True) pass # end class Requirement class InstanceRequirement(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, name=None, type=None, **kwargs_): + def __init__(self, name=None, type_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.name = _cast(None, name) - self.type = _cast(None, type) + self.name_nsprefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1776,6 +2149,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1790,17 +2165,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.name is not None and 'name' not in already_processed: already_processed.add('name') outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), )) - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InstanceRequirement', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1810,41 +2189,49 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.type_ = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class InstanceRequirement class Dynamics(GeneratedsSuper): """LEMS ComponentType for Dynamics""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('StateVariable', 'StateVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'StateVariable', u'name': u'StateVariable', u'minOccurs': u'0'}, None), - MemberSpec_('DerivedVariable', 'DerivedVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DerivedVariable', u'name': u'DerivedVariable', u'minOccurs': u'0'}, None), - MemberSpec_('ConditionalDerivedVariable', 'ConditionalDerivedVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ConditionalDerivedVariable', u'name': u'ConditionalDerivedVariable', u'minOccurs': u'0'}, None), - MemberSpec_('TimeDerivative', 'TimeDerivative', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TimeDerivative', u'name': u'TimeDerivative', u'minOccurs': u'0'}, None), + MemberSpec_('StateVariable', 'StateVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'StateVariable', 'type': 'StateVariable'}, None), + MemberSpec_('DerivedVariable', 'DerivedVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'DerivedVariable', 'type': 'DerivedVariable'}, None), + MemberSpec_('ConditionalDerivedVariable', 'ConditionalDerivedVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ConditionalDerivedVariable', 'type': 'ConditionalDerivedVariable'}, None), + MemberSpec_('TimeDerivative', 'TimeDerivative', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'TimeDerivative', 'type': 'TimeDerivative'}, None), ] subclass = None superclass = None - def __init__(self, StateVariable=None, DerivedVariable=None, ConditionalDerivedVariable=None, TimeDerivative=None, **kwargs_): + def __init__(self, StateVariable=None, DerivedVariable=None, ConditionalDerivedVariable=None, TimeDerivative=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None if StateVariable is None: self.StateVariable = [] else: self.StateVariable = StateVariable + self.StateVariable_nsprefix_ = None if DerivedVariable is None: self.DerivedVariable = [] else: self.DerivedVariable = DerivedVariable + self.DerivedVariable_nsprefix_ = None if ConditionalDerivedVariable is None: self.ConditionalDerivedVariable = [] else: self.ConditionalDerivedVariable = ConditionalDerivedVariable + self.ConditionalDerivedVariable_nsprefix_ = None if TimeDerivative is None: self.TimeDerivative = [] else: self.TimeDerivative = TimeDerivative + self.TimeDerivative_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1866,7 +2253,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Dynamics', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Dynamics', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Dynamics') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -1876,6 +2263,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1889,47 +2278,55 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Dynamics'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Dynamics', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Dynamics', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for StateVariable_ in self.StateVariable: + namespaceprefix_ = self.StateVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.StateVariable_nsprefix_) else '' StateVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateVariable', pretty_print=pretty_print) for DerivedVariable_ in self.DerivedVariable: + namespaceprefix_ = self.DerivedVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.DerivedVariable_nsprefix_) else '' DerivedVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='DerivedVariable', pretty_print=pretty_print) for ConditionalDerivedVariable_ in self.ConditionalDerivedVariable: + namespaceprefix_ = self.ConditionalDerivedVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.ConditionalDerivedVariable_nsprefix_) else '' ConditionalDerivedVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ConditionalDerivedVariable', pretty_print=pretty_print) for TimeDerivative_ in self.TimeDerivative: + namespaceprefix_ = self.TimeDerivative_nsprefix_ + ':' if (UseCapturedNS_ and self.TimeDerivative_nsprefix_) else '' TimeDerivative_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='TimeDerivative', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'StateVariable': obj_ = StateVariable.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.StateVariable.append(obj_) obj_.original_tagname_ = 'StateVariable' elif nodeName_ == 'DerivedVariable': obj_ = DerivedVariable.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.DerivedVariable.append(obj_) obj_.original_tagname_ = 'DerivedVariable' elif nodeName_ == 'ConditionalDerivedVariable': obj_ = ConditionalDerivedVariable.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.ConditionalDerivedVariable.append(obj_) obj_.original_tagname_ = 'ConditionalDerivedVariable' elif nodeName_ == 'TimeDerivative': obj_ = TimeDerivative.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.TimeDerivative.append(obj_) obj_.original_tagname_ = 'TimeDerivative' # end class Dynamics @@ -1937,18 +2334,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class DerivedVariable(NamedDimensionalVariable): """LEMS ComponentType for DerivedVariable""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('value', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('select', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('value', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('select', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, value=None, select=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, exposure=None, value=None, select=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(DerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) self.value = _cast(None, value) + self.value_nsprefix_ = None self.select = _cast(None, select) + self.select_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1977,6 +2380,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1996,14 +2401,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('select') outfile.write(' select=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.select), input_name='select')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DerivedVariable', fromsubclass_=False, pretty_print=True): - super(DerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(DerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('value', node) @@ -2015,20 +2424,24 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('select') self.select = value super(DerivedVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(DerivedVariable, self).buildChildren(child_, node, nodeName_, True) pass # end class DerivedVariable class StateVariable(NamedDimensionalVariable): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, exposure=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(StateVariable, self).__init__(name, dimension, description, exposure, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -2058,6 +2471,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2071,18 +2486,22 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateVariable'): super(StateVariable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateVariable') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='StateVariable', fromsubclass_=False, pretty_print=True): - super(StateVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(StateVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(StateVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(StateVariable, self).buildChildren(child_, node, nodeName_, True) pass # end class StateVariable @@ -2090,19 +2509,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ConditionalDerivedVariable(NamedDimensionalVariable): """LEMS ComponentType for ConditionalDerivedVariable""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('Case', 'Case', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Case', u'name': u'Case', u'minOccurs': u'1'}, None), + MemberSpec_('Case', 'Case', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'Case', 'type': 'Case'}, None), ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, Case=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, exposure=None, Case=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None super(ConditionalDerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) if Case is None: self.Case = [] else: self.Case = Case + self.Case_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2122,7 +2546,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConditionalDerivedVariable', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ConditionalDerivedVariable', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ConditionalDerivedVariable') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -2132,6 +2556,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2145,27 +2571,32 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConditionalDerivedVariable'): super(ConditionalDerivedVariable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConditionalDerivedVariable') - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConditionalDerivedVariable', fromsubclass_=False, pretty_print=True): - super(ConditionalDerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ConditionalDerivedVariable', fromsubclass_=False, pretty_print=True): + super(ConditionalDerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for Case_ in self.Case: + namespaceprefix_ = self.Case_nsprefix_ + ':' if (UseCapturedNS_ and self.Case_nsprefix_) else '' Case_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Case', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ConditionalDerivedVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'Case': obj_ = Case.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.Case.append(obj_) obj_.original_tagname_ = 'Case' super(ConditionalDerivedVariable, self).buildChildren(child_, node, nodeName_, True) @@ -2173,17 +2604,23 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Case(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('condition', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('condition', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, condition=None, value=None, **kwargs_): + def __init__(self, condition=None, value=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.condition = _cast(None, condition) + self.condition_nsprefix_ = None self.value = _cast(None, value) + self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2212,6 +2649,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2231,12 +2670,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Case', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('condition', node) @@ -2247,23 +2690,29 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Case class TimeDerivative(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('variable', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('variable', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, variable=None, value=None, **kwargs_): + def __init__(self, variable=None, value=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.variable = _cast(None, variable) + self.variable_nsprefix_ = None self.value = _cast(None, value) + self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2292,6 +2741,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2311,12 +2762,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TimeDerivative', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('variable', node) @@ -2327,21 +2782,26 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class TimeDerivative class IncludeType(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('href', 'xs:anyURI', 0, 0, {'use': u'required'}), + MemberSpec_('href', 'xs:anyURI', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, href=None, **kwargs_): + def __init__(self, href=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.href = _cast(None, href) + self.href_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2370,6 +2830,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2386,35 +2848,45 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' href=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.href), input_name='href')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IncludeType', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('href', node) if value is not None and 'href' not in already_processed: already_processed.add('href') self.href = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class IncludeType class Q10ConductanceScaling(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 0, {'use': u'required'}), + MemberSpec_('q10Factor', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('experimentalTemp', 'Nml2Quantity_temperature', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, q10_factor=None, experimental_temp=None, **kwargs_): + def __init__(self, q10Factor=None, experimentalTemp=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.q10_factor = _cast(None, q10_factor) - self.experimental_temp = _cast(None, experimental_temp) + self.ns_prefix_ = None + self.q10Factor = _cast(None, q10Factor) + self.q10Factor_nsprefix_ = None + self.experimentalTemp = _cast(None, experimentalTemp) + self.experimentalTemp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2428,18 +2900,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] def hasContent_(self): if ( @@ -2457,6 +2937,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2468,53 +2950,65 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10ConductanceScaling'): - if self.q10_factor is not None and 'q10_factor' not in already_processed: - already_processed.add('q10_factor') - outfile.write(' q10Factor=%s' % (quote_attrib(self.q10_factor), )) - if self.experimental_temp is not None and 'experimental_temp' not in already_processed: - already_processed.add('experimental_temp') - outfile.write(' experimentalTemp=%s' % (quote_attrib(self.experimental_temp), )) + if self.q10Factor is not None and 'q10Factor' not in already_processed: + already_processed.add('q10Factor') + outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10Factor), input_name='q10Factor')), )) + if self.experimentalTemp is not None and 'experimentalTemp' not in already_processed: + already_processed.add('experimentalTemp') + outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimentalTemp), input_name='experimentalTemp')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10ConductanceScaling', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('q10Factor', node) if value is not None and 'q10Factor' not in already_processed: already_processed.add('q10Factor') - self.q10_factor = value - self.validate_Nml2Quantity_none(self.q10_factor) # validate type Nml2Quantity_none + self.q10Factor = value + self.validate_Nml2Quantity_none(self.q10Factor) # validate type Nml2Quantity_none value = find_attr_value_('experimentalTemp', node) if value is not None and 'experimentalTemp' not in already_processed: already_processed.add('experimentalTemp') - self.experimental_temp = value - self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.experimentalTemp = value + self.validate_Nml2Quantity_temperature(self.experimentalTemp) # validate type Nml2Quantity_temperature + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Q10ConductanceScaling class Q10Settings(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('fixed_q10', 'Nml2Quantity_none', 0, 1, {'use': u'optional'}), - MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 1, {'use': u'optional'}), - MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 1, {'use': u'optional'}), + MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('fixedQ10', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), + MemberSpec_('q10Factor', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), + MemberSpec_('experimentalTemp', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, fixed_q10=None, q10_factor=None, experimental_temp=None, **kwargs_): + def __init__(self, type_=None, fixedQ10=None, q10Factor=None, experimentalTemp=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) - self.fixed_q10 = _cast(None, fixed_q10) - self.q10_factor = _cast(None, q10_factor) - self.experimental_temp = _cast(None, experimental_temp) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None + self.fixedQ10 = _cast(None, fixedQ10) + self.fixedQ10_nsprefix_ = None + self.q10Factor = _cast(None, q10Factor) + self.q10Factor_nsprefix_ = None + self.experimentalTemp = _cast(None, experimentalTemp) + self.experimentalTemp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2528,25 +3022,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] def hasContent_(self): if ( @@ -2564,6 +3070,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2575,69 +3083,81 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10Settings'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) - if self.fixed_q10 is not None and 'fixed_q10' not in already_processed: - already_processed.add('fixed_q10') - outfile.write(' fixedQ10=%s' % (quote_attrib(self.fixed_q10), )) - if self.q10_factor is not None and 'q10_factor' not in already_processed: - already_processed.add('q10_factor') - outfile.write(' q10Factor=%s' % (quote_attrib(self.q10_factor), )) - if self.experimental_temp is not None and 'experimental_temp' not in already_processed: - already_processed.add('experimental_temp') - outfile.write(' experimentalTemp=%s' % (quote_attrib(self.experimental_temp), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.fixedQ10 is not None and 'fixedQ10' not in already_processed: + already_processed.add('fixedQ10') + outfile.write(' fixedQ10=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fixedQ10), input_name='fixedQ10')), )) + if self.q10Factor is not None and 'q10Factor' not in already_processed: + already_processed.add('q10Factor') + outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10Factor), input_name='q10Factor')), )) + if self.experimentalTemp is not None and 'experimentalTemp' not in already_processed: + already_processed.add('experimentalTemp') + outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimentalTemp), input_name='experimentalTemp')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10Settings', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_NmlId(self.type) # validate type NmlId + self.type_ = value + self.validate_NmlId(self.type_) # validate type NmlId value = find_attr_value_('fixedQ10', node) if value is not None and 'fixedQ10' not in already_processed: already_processed.add('fixedQ10') - self.fixed_q10 = value - self.validate_Nml2Quantity_none(self.fixed_q10) # validate type Nml2Quantity_none + self.fixedQ10 = value + self.validate_Nml2Quantity_none(self.fixedQ10) # validate type Nml2Quantity_none value = find_attr_value_('q10Factor', node) if value is not None and 'q10Factor' not in already_processed: already_processed.add('q10Factor') - self.q10_factor = value - self.validate_Nml2Quantity_none(self.q10_factor) # validate type Nml2Quantity_none + self.q10Factor = value + self.validate_Nml2Quantity_none(self.q10Factor) # validate type Nml2Quantity_none value = find_attr_value_('experimentalTemp', node) if value is not None and 'experimentalTemp' not in already_processed: already_processed.add('experimentalTemp') - self.experimental_temp = value - self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.experimentalTemp = value + self.validate_Nml2Quantity_temperature(self.experimentalTemp) # validate type Nml2Quantity_temperature + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Q10Settings class HHRate(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 1, {'use': u'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 1, {'use': 'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, **kwargs_): + def __init__(self, type_=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.rate = _cast(None, rate) + self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) + self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) + self.scale_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2651,25 +3171,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( @@ -2687,6 +3219,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2698,33 +3232,37 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHRate'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (quote_attrib(self.rate), )) + outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) + outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (quote_attrib(self.scale), )) + outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHRate', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_NmlId(self.type) # validate type NmlId + self.type_ = value + self.validate_NmlId(self.type_) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') @@ -2740,27 +3278,35 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('scale') self.scale = value self.validate_Nml2Quantity_voltage(self.scale) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class HHRate class HHVariable(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('rate', 'xs:float', 0, 1, {'use': u'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('rate', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, **kwargs_): + def __init__(self, type_=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.rate = _cast(float, rate) + self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) + self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) + self.scale_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2774,18 +3320,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( @@ -2803,6 +3357,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2814,40 +3370,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHVariable'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') outfile.write(' rate="%s"' % self.gds_format_float(self.rate, input_name='rate')) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) + outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (quote_attrib(self.scale), )) + outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHVariable', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_NmlId(self.type) # validate type NmlId + self.type_ = value + self.validate_NmlId(self.type_) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') - try: - self.rate = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (rate): %s' % exp) + value = self.gds_parse_float(value, node, 'rate') + self.rate = value value = find_attr_value_('midpoint', node) if value is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') @@ -2858,29 +3416,38 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('scale') self.scale = value self.validate_Nml2Quantity_voltage(self.scale) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class HHVariable class HHTime(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('rate', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), - MemberSpec_('tau', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), + MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('rate', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, tau=None, **kwargs_): + def __init__(self, type_=None, rate=None, midpoint=None, scale=None, tau=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.rate = _cast(None, rate) + self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) + self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) + self.scale_nsprefix_ = None self.tau = _cast(None, tau) + self.tau_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2894,25 +3461,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( @@ -2930,6 +3509,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2941,36 +3522,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHTime'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (quote_attrib(self.rate), )) + outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) + outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (quote_attrib(self.scale), )) + outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (quote_attrib(self.tau), )) + outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHTime', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_NmlId(self.type) # validate type NmlId + self.type_ = value + self.validate_NmlId(self.type_) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') @@ -2991,29 +3576,38 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('tau') self.tau = value self.validate_Nml2Quantity_time(self.tau) # validate type Nml2Quantity_time - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class HHTime class BlockMechanism(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'BlockTypes', 0, 0, {'use': u'required'}), - MemberSpec_('species', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('block_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), - MemberSpec_('scaling_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), - MemberSpec_('scaling_volt', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('type_', 'BlockTypes', 0, 0, {'use': 'required'}), + MemberSpec_('species', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('blockConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('scalingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('scalingVolt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, type=None, species=None, block_concentration=None, scaling_conc=None, scaling_volt=None, **kwargs_): + def __init__(self, type_=None, species=None, blockConcentration=None, scalingConc=None, scalingVolt=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.species = _cast(None, species) - self.block_concentration = _cast(None, block_concentration) - self.scaling_conc = _cast(None, scaling_conc) - self.scaling_volt = _cast(None, scaling_volt) + self.species_nsprefix_ = None + self.blockConcentration = _cast(None, blockConcentration) + self.blockConcentration_nsprefix_ = None + self.scalingConc = _cast(None, scalingConc) + self.scalingConc_nsprefix_ = None + self.scalingVolt = _cast(None, scalingVolt) + self.scalingVolt_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3027,37 +3621,50 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_BlockTypes(self, value): # Validate type BlockTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['voltageConcDepBlockMechanism'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on BlockTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on BlockTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( @@ -3075,6 +3682,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3086,36 +3695,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BlockMechanism'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (quote_attrib(self.species), )) - if self.block_concentration is not None and 'block_concentration' not in already_processed: - already_processed.add('block_concentration') - outfile.write(' blockConcentration=%s' % (quote_attrib(self.block_concentration), )) - if self.scaling_conc is not None and 'scaling_conc' not in already_processed: - already_processed.add('scaling_conc') - outfile.write(' scalingConc=%s' % (quote_attrib(self.scaling_conc), )) - if self.scaling_volt is not None and 'scaling_volt' not in already_processed: - already_processed.add('scaling_volt') - outfile.write(' scalingVolt=%s' % (quote_attrib(self.scaling_volt), )) + outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) + if self.blockConcentration is not None and 'blockConcentration' not in already_processed: + already_processed.add('blockConcentration') + outfile.write(' blockConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.blockConcentration), input_name='blockConcentration')), )) + if self.scalingConc is not None and 'scalingConc' not in already_processed: + already_processed.add('scalingConc') + outfile.write(' scalingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scalingConc), input_name='scalingConc')), )) + if self.scalingVolt is not None and 'scalingVolt' not in already_processed: + already_processed.add('scalingVolt') + outfile.write(' scalingVolt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scalingVolt), input_name='scalingVolt')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BlockMechanism', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_BlockTypes(self.type) # validate type BlockTypes + self.type_ = value + self.validate_BlockTypes(self.type_) # validate type BlockTypes value = find_attr_value_('species', node) if value is not None and 'species' not in already_processed: already_processed.add('species') @@ -3124,39 +3737,47 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('blockConcentration', node) if value is not None and 'blockConcentration' not in already_processed: already_processed.add('blockConcentration') - self.block_concentration = value - self.validate_Nml2Quantity_concentration(self.block_concentration) # validate type Nml2Quantity_concentration + self.blockConcentration = value + self.validate_Nml2Quantity_concentration(self.blockConcentration) # validate type Nml2Quantity_concentration value = find_attr_value_('scalingConc', node) if value is not None and 'scalingConc' not in already_processed: already_processed.add('scalingConc') - self.scaling_conc = value - self.validate_Nml2Quantity_concentration(self.scaling_conc) # validate type Nml2Quantity_concentration + self.scalingConc = value + self.validate_Nml2Quantity_concentration(self.scalingConc) # validate type Nml2Quantity_concentration value = find_attr_value_('scalingVolt', node) if value is not None and 'scalingVolt' not in already_processed: already_processed.add('scalingVolt') - self.scaling_volt = value - self.validate_Nml2Quantity_voltage(self.scaling_volt) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.scalingVolt = value + self.validate_Nml2Quantity_voltage(self.scalingVolt) # validate type Nml2Quantity_voltage + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class BlockMechanism class PlasticityMechanism(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'PlasticityTypes', 0, 0, {'use': u'required'}), - MemberSpec_('init_release_prob', 'ZeroToOne', 0, 0, {'use': u'required'}), - MemberSpec_('tau_rec', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('tau_fac', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), + MemberSpec_('type_', 'PlasticityTypes', 0, 0, {'use': 'required'}), + MemberSpec_('initReleaseProb', 'ZeroToOne', 0, 0, {'use': 'required'}), + MemberSpec_('tauRec', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tauFac', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, init_release_prob=None, tau_rec=None, tau_fac=None, **kwargs_): + def __init__(self, type_=None, initReleaseProb=None, tauRec=None, tauFac=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.type = _cast(None, type) - self.init_release_prob = _cast(float, init_release_prob) - self.tau_rec = _cast(None, tau_rec) - self.tau_fac = _cast(None, tau_fac) + self.ns_prefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None + self.initReleaseProb = _cast(float, initReleaseProb) + self.initReleaseProb_nsprefix_ = None + self.tauRec = _cast(None, tauRec) + self.tauRec_nsprefix_ = None + self.tauFac = _cast(None, tauFac) + self.tauFac_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3170,30 +3791,43 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_PlasticityTypes(self, value): # Validate type PlasticityTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['tsodyksMarkramDepMechanism', 'tsodyksMarkramDepFacMechanism'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on PlasticityTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on PlasticityTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value < 0: - warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False if value > 1: - warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( @@ -3211,6 +3845,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3222,68 +3858,76 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PlasticityMechanism'): - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) - if self.init_release_prob is not None and 'init_release_prob' not in already_processed: - already_processed.add('init_release_prob') - outfile.write(' initReleaseProb=%s' % (quote_attrib(self.init_release_prob), )) - if self.tau_rec is not None and 'tau_rec' not in already_processed: - already_processed.add('tau_rec') - outfile.write(' tauRec=%s' % (quote_attrib(self.tau_rec), )) - if self.tau_fac is not None and 'tau_fac' not in already_processed: - already_processed.add('tau_fac') - outfile.write(' tauFac=%s' % (quote_attrib(self.tau_fac), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.initReleaseProb is not None and 'initReleaseProb' not in already_processed: + already_processed.add('initReleaseProb') + outfile.write(' initReleaseProb="%s"' % self.gds_format_float(self.initReleaseProb, input_name='initReleaseProb')) + if self.tauRec is not None and 'tauRec' not in already_processed: + already_processed.add('tauRec') + outfile.write(' tauRec=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRec), input_name='tauRec')), )) + if self.tauFac is not None and 'tauFac' not in already_processed: + already_processed.add('tauFac') + outfile.write(' tauFac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauFac), input_name='tauFac')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PlasticityMechanism', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_PlasticityTypes(self.type) # validate type PlasticityTypes + self.type_ = value + self.validate_PlasticityTypes(self.type_) # validate type PlasticityTypes value = find_attr_value_('initReleaseProb', node) if value is not None and 'initReleaseProb' not in already_processed: already_processed.add('initReleaseProb') - try: - self.init_release_prob = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (initReleaseProb): %s' % exp) - self.validate_ZeroToOne(self.init_release_prob) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'initReleaseProb') + self.initReleaseProb = value + self.validate_ZeroToOne(self.initReleaseProb) # validate type ZeroToOne value = find_attr_value_('tauRec', node) if value is not None and 'tauRec' not in already_processed: already_processed.add('tauRec') - self.tau_rec = value - self.validate_Nml2Quantity_time(self.tau_rec) # validate type Nml2Quantity_time + self.tauRec = value + self.validate_Nml2Quantity_time(self.tauRec) # validate type Nml2Quantity_time value = find_attr_value_('tauFac', node) if value is not None and 'tauFac' not in already_processed: already_processed.add('tauFac') - self.tau_fac = value - self.validate_Nml2Quantity_time(self.tau_fac) # validate type Nml2Quantity_time - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.tauFac = value + self.validate_Nml2Quantity_time(self.tauFac) # validate type Nml2Quantity_time + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class PlasticityMechanism class SegmentParent(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), - MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': u'optional'}), + MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('fractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, segments=None, fraction_along='1', **kwargs_): + def __init__(self, segment=None, fractionAlong='1', gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.segments = _cast(int, segments) - self.fraction_along = _cast(float, fraction_along) + self.ns_prefix_ = None + self.segment = _cast(int, segment) + self.segment_nsprefix_ = None + self.fractionAlong = _cast(float, fractionAlong) + self.fractionAlong_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3297,15 +3941,27 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value < 0: - warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False if value > 1: - warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False def hasContent_(self): if ( @@ -3323,6 +3979,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3334,62 +3992,69 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentParent'): - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) - if self.fraction_along != 1 and 'fraction_along' not in already_processed: - already_processed.add('fraction_along') - outfile.write(' fractionAlong=%s' % (quote_attrib(self.fraction_along), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) + if self.fractionAlong != 1 and 'fractionAlong' not in already_processed: + already_processed.add('fractionAlong') + outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fractionAlong, input_name='fractionAlong')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentParent', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - try: - self.segments = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segments < 0: + self.segment = self.gds_parse_integer(value, node, 'segment') + if self.segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') - try: - self.fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (fractionAlong): %s' % exp) - self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + value = self.gds_parse_float(value, node, 'fractionAlong') + self.fractionAlong = value + self.validate_ZeroToOne(self.fractionAlong) # validate type ZeroToOne + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SegmentParent class Point3DWithDiam(GeneratedsSuper): """A 3D point with diameter.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x', 'xs:double', 0, 0, {'use': u'required'}), - MemberSpec_('y', 'xs:double', 0, 0, {'use': u'required'}), - MemberSpec_('z', 'xs:double', 0, 0, {'use': u'required'}), - MemberSpec_('diameter', 'DoubleGreaterThanZero', 0, 0, {'use': u'required'}), + MemberSpec_('x', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('y', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('z', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('diameter', 'DoubleGreaterThanZero', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, x=None, y=None, z=None, diameter=None, **kwargs_): + def __init__(self, x=None, y=None, z=None, diameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.x = _cast(float, x) + self.x_nsprefix_ = None self.y = _cast(float, y) + self.y_nsprefix_ = None self.z = _cast(float, z) + self.z_nsprefix_ = None self.diameter = _cast(float, diameter) + self.diameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3403,9 +4068,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_DoubleGreaterThanZero(self, value): # Validate type DoubleGreaterThanZero, a restriction on xs:double. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value <= 0: - warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on DoubleGreaterThanZero' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minExclusive restriction on DoubleGreaterThanZero' % {"value": value, "lineno": lineno} ) + result = False def hasContent_(self): if ( @@ -3423,6 +4094,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3445,47 +4118,43 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' z="%s"' % self.gds_format_double(self.z, input_name='z')) if self.diameter is not None and 'diameter' not in already_processed: already_processed.add('diameter') - outfile.write(' diameter=%s' % (quote_attrib(self.diameter), )) + outfile.write(' diameter="%s"' % self.gds_format_double(self.diameter, input_name='diameter')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Point3DWithDiam', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('x', node) if value is not None and 'x' not in already_processed: already_processed.add('x') - try: - self.x = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (x): %s' % exp) + value = self.gds_parse_double(value, node, 'x') + self.x = value value = find_attr_value_('y', node) if value is not None and 'y' not in already_processed: already_processed.add('y') - try: - self.y = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (y): %s' % exp) + value = self.gds_parse_double(value, node, 'y') + self.y = value value = find_attr_value_('z', node) if value is not None and 'z' not in already_processed: already_processed.add('z') - try: - self.z = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (z): %s' % exp) + value = self.gds_parse_double(value, node, 'z') + self.z = value value = find_attr_value_('diameter', node) if value is not None and 'diameter' not in already_processed: already_processed.add('diameter') - try: - self.diameter = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (diameter): %s' % exp) + value = self.gds_parse_double(value, node, 'diameter') + self.diameter = value self.validate_DoubleGreaterThanZero(self.diameter) # validate type DoubleGreaterThanZero - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass def __str__(self): @@ -3512,15 +4181,20 @@ def distance_to(self, other_3d_point): class ProximalDetails(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('translation_start', 'xs:double', 0, 0, {'use': u'required'}), + MemberSpec_('translationStart', 'xs:double', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, translation_start=None, **kwargs_): + def __init__(self, translationStart=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.translation_start = _cast(float, translation_start) + self.ns_prefix_ = None + self.translationStart = _cast(float, translationStart) + self.translationStart_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3549,6 +4223,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3560,41 +4236,48 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ProximalDetails'): - if self.translation_start is not None and 'translation_start' not in already_processed: - already_processed.add('translation_start') - outfile.write(' translationStart="%s"' % self.gds_format_double(self.translation_start, input_name='translationStart')) + if self.translationStart is not None and 'translationStart' not in already_processed: + already_processed.add('translationStart') + outfile.write(' translationStart="%s"' % self.gds_format_double(self.translationStart, input_name='translationStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ProximalDetails', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('translationStart', node) if value is not None and 'translationStart' not in already_processed: already_processed.add('translationStart') - try: - self.translation_start = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (translationStart): %s' % exp) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + value = self.gds_parse_double(value, node, 'translationStart') + self.translationStart = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class ProximalDetails class DistalDetails(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('normalization_end', 'xs:double', 0, 0, {'use': u'required'}), + MemberSpec_('normalizationEnd', 'xs:double', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, normalization_end=None, **kwargs_): + def __init__(self, normalizationEnd=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.normalization_end = _cast(float, normalization_end) + self.ns_prefix_ = None + self.normalizationEnd = _cast(float, normalizationEnd) + self.normalizationEnd_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3623,6 +4306,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3634,41 +4319,48 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DistalDetails'): - if self.normalization_end is not None and 'normalization_end' not in already_processed: - already_processed.add('normalization_end') - outfile.write(' normalizationEnd="%s"' % self.gds_format_double(self.normalization_end, input_name='normalizationEnd')) + if self.normalizationEnd is not None and 'normalizationEnd' not in already_processed: + already_processed.add('normalizationEnd') + outfile.write(' normalizationEnd="%s"' % self.gds_format_double(self.normalizationEnd, input_name='normalizationEnd')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DistalDetails', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('normalizationEnd', node) if value is not None and 'normalizationEnd' not in already_processed: already_processed.add('normalizationEnd') - try: - self.normalization_end = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (normalizationEnd): %s' % exp) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + value = self.gds_parse_double(value, node, 'normalizationEnd') + self.normalizationEnd = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class DistalDetails class Member(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segments=None, **kwargs_): + def __init__(self, segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.segments = _cast(int, segments) + self.ns_prefix_ = None + self.segment = _cast(int, segment) + self.segment_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3682,7 +4374,11 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( @@ -3701,6 +4397,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3712,44 +4410,50 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Member'): - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Member', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - try: - self.segments = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segments < 0: + self.segment = self.gds_parse_integer(value, node, 'segment') + if self.segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Member class Include(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment_groups', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segment_groups=None, **kwargs_): + def __init__(self, segmentGroup=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.segment_groups = _cast(None, segment_groups) + self.ns_prefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3763,11 +4467,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( @@ -3785,6 +4493,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3796,41 +4506,51 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Include'): - if self.segment_groups is not None and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) + if self.segmentGroup is not None and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Include', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Include class Path(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'from', u'minOccurs': u'0'}, None), - MemberSpec_('to', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'to', u'minOccurs': u'0'}, None), + MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'from', 'type': 'SegmentEndPoint'}, None), + MemberSpec_('to', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'to', 'type': 'SegmentEndPoint'}, None), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, **kwargs_): + def __init__(self, from_=None, to=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.from_ = from_ + self.from__nsprefix_ = None self.to = to + self.to_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3850,7 +4570,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Path', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Path', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Path') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -3860,6 +4580,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3873,50 +4595,62 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Path'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Path', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Path', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.from_ is not None: + namespaceprefix_ = self.from__nsprefix_ + ':' if (UseCapturedNS_ and self.from__nsprefix_) else '' self.from_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='from', pretty_print=pretty_print) if self.to is not None: + namespaceprefix_ = self.to_nsprefix_ + ':' if (UseCapturedNS_ and self.to_nsprefix_) else '' self.to.export(outfile, level, namespaceprefix_, namespacedef_='', name_='to', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'from': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.from_ = obj_ obj_.original_tagname_ = 'from' elif nodeName_ == 'to': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.to = obj_ obj_.original_tagname_ = 'to' # end class Path class SubTree(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'from', u'minOccurs': u'0'}, 3), - MemberSpec_('to', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'to', u'minOccurs': u'0'}, 3), + MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'from', 'type': 'SegmentEndPoint'}, 3), + MemberSpec_('to', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'to', 'type': 'SegmentEndPoint'}, 3), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, **kwargs_): + def __init__(self, from_=None, to=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.from_ = from_ + self.from__nsprefix_ = None self.to = to + self.to_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3936,7 +4670,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SubTree', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='SubTree', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('SubTree') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -3946,6 +4680,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3959,48 +4695,59 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SubTree'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SubTree', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='SubTree', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.from_ is not None: + namespaceprefix_ = self.from__nsprefix_ + ':' if (UseCapturedNS_ and self.from__nsprefix_) else '' self.from_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='from', pretty_print=pretty_print) if self.to is not None: + namespaceprefix_ = self.to_nsprefix_ + ':' if (UseCapturedNS_ and self.to_nsprefix_) else '' self.to.export(outfile, level, namespaceprefix_, namespacedef_='', name_='to', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'from': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.from_ = obj_ obj_.original_tagname_ = 'from' elif nodeName_ == 'to': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.to = obj_ obj_.original_tagname_ = 'to' # end class SubTree class SegmentEndPoint(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segments=None, **kwargs_): + def __init__(self, segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.segments = _cast(int, segments) + self.ns_prefix_ = None + self.segment = _cast(int, segment) + self.segment_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4014,7 +4761,11 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( @@ -4033,6 +4784,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4044,102 +4797,119 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentEndPoint'): - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentEndPoint', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - try: - self.segments = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segments < 0: + self.segment = self.gds_parse_integer(value, node, 'segment') + if self.segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SegmentEndPoint class MembraneProperties(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channel_populations', 'ChannelPopulation', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelPopulation', u'name': u'channelPopulation', u'minOccurs': u'0'}, None), - MemberSpec_('channel_densities', 'ChannelDensity', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensity', u'name': u'channelDensity', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_v_shifts', 'ChannelDensityVShift', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityVShift', u'name': u'channelDensityVShift', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_nernsts', 'ChannelDensityNernst', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNernst', u'name': u'channelDensityNernst', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_ghks', 'ChannelDensityGHK', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityGHK', u'name': u'channelDensityGHK', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_ghk2s', 'ChannelDensityGHK2', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityGHK2', u'name': u'channelDensityGHK2', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_non_uniforms', 'ChannelDensityNonUniform', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniform', u'name': u'channelDensityNonUniform', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_non_uniform_nernsts', 'ChannelDensityNonUniformNernst', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniformNernst', u'name': u'channelDensityNonUniformNernst', u'minOccurs': u'0'}, None), - MemberSpec_('channel_density_non_uniform_ghks', 'ChannelDensityNonUniformGHK', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniformGHK', u'name': u'channelDensityNonUniformGHK', u'minOccurs': u'0'}, None), - MemberSpec_('spike_threshes', 'SpikeThresh', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeThresh', u'name': u'spikeThresh', u'minOccurs': u'0'}, None), - MemberSpec_('specific_capacitances', 'SpecificCapacitance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpecificCapacitance', u'name': u'specificCapacitance', u'minOccurs': u'0'}, None), - MemberSpec_('init_memb_potentials', 'InitMembPotential', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InitMembPotential', u'name': u'initMembPotential', u'minOccurs': u'0'}, None), + MemberSpec_('channelPopulation', 'ChannelPopulation', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelPopulation', 'type': 'ChannelPopulation'}, None), + MemberSpec_('channelDensity', 'ChannelDensity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensity', 'type': 'ChannelDensity'}, None), + MemberSpec_('channelDensityVShift', 'ChannelDensityVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityVShift', 'type': 'ChannelDensityVShift'}, None), + MemberSpec_('channelDensityNernst', 'ChannelDensityNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernst', 'type': 'ChannelDensityNernst'}, None), + MemberSpec_('channelDensityGHK', 'ChannelDensityGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK', 'type': 'ChannelDensityGHK'}, None), + MemberSpec_('channelDensityGHK2', 'ChannelDensityGHK2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK2', 'type': 'ChannelDensityGHK2'}, None), + MemberSpec_('channelDensityNonUniform', 'ChannelDensityNonUniform', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniform', 'type': 'ChannelDensityNonUniform'}, None), + MemberSpec_('channelDensityNonUniformNernst', 'ChannelDensityNonUniformNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformNernst', 'type': 'ChannelDensityNonUniformNernst'}, None), + MemberSpec_('channelDensityNonUniformGHK', 'ChannelDensityNonUniformGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformGHK', 'type': 'ChannelDensityNonUniformGHK'}, None), + MemberSpec_('spikeThresh', 'SpikeThresh', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeThresh', 'type': 'SpikeThresh'}, None), + MemberSpec_('specificCapacitance', 'SpecificCapacitance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'specificCapacitance', 'type': 'SpecificCapacitance'}, None), + MemberSpec_('initMembPotential', 'InitMembPotential', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'initMembPotential', 'type': 'InitMembPotential'}, None), ] subclass = None superclass = None - def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, extensiontype_=None, **kwargs_): + def __init__(self, channelPopulation=None, channelDensity=None, channelDensityVShift=None, channelDensityNernst=None, channelDensityGHK=None, channelDensityGHK2=None, channelDensityNonUniform=None, channelDensityNonUniformNernst=None, channelDensityNonUniformGHK=None, spikeThresh=None, specificCapacitance=None, initMembPotential=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - if channel_populations is None: - self.channel_populations = [] - else: - self.channel_populations = channel_populations - if channel_densities is None: - self.channel_densities = [] - else: - self.channel_densities = channel_densities - if channel_density_v_shifts is None: - self.channel_density_v_shifts = [] - else: - self.channel_density_v_shifts = channel_density_v_shifts - if channel_density_nernsts is None: - self.channel_density_nernsts = [] - else: - self.channel_density_nernsts = channel_density_nernsts - if channel_density_ghks is None: - self.channel_density_ghks = [] - else: - self.channel_density_ghks = channel_density_ghks - if channel_density_ghk2s is None: - self.channel_density_ghk2s = [] - else: - self.channel_density_ghk2s = channel_density_ghk2s - if channel_density_non_uniforms is None: - self.channel_density_non_uniforms = [] - else: - self.channel_density_non_uniforms = channel_density_non_uniforms - if channel_density_non_uniform_nernsts is None: - self.channel_density_non_uniform_nernsts = [] - else: - self.channel_density_non_uniform_nernsts = channel_density_non_uniform_nernsts - if channel_density_non_uniform_ghks is None: - self.channel_density_non_uniform_ghks = [] - else: - self.channel_density_non_uniform_ghks = channel_density_non_uniform_ghks - if spike_threshes is None: - self.spike_threshes = [] - else: - self.spike_threshes = spike_threshes - if specific_capacitances is None: - self.specific_capacitances = [] - else: - self.specific_capacitances = specific_capacitances - if init_memb_potentials is None: - self.init_memb_potentials = [] - else: - self.init_memb_potentials = init_memb_potentials + self.ns_prefix_ = None + if channelPopulation is None: + self.channelPopulation = [] + else: + self.channelPopulation = channelPopulation + self.channelPopulation_nsprefix_ = None + if channelDensity is None: + self.channelDensity = [] + else: + self.channelDensity = channelDensity + self.channelDensity_nsprefix_ = None + if channelDensityVShift is None: + self.channelDensityVShift = [] + else: + self.channelDensityVShift = channelDensityVShift + self.channelDensityVShift_nsprefix_ = None + if channelDensityNernst is None: + self.channelDensityNernst = [] + else: + self.channelDensityNernst = channelDensityNernst + self.channelDensityNernst_nsprefix_ = None + if channelDensityGHK is None: + self.channelDensityGHK = [] + else: + self.channelDensityGHK = channelDensityGHK + self.channelDensityGHK_nsprefix_ = None + if channelDensityGHK2 is None: + self.channelDensityGHK2 = [] + else: + self.channelDensityGHK2 = channelDensityGHK2 + self.channelDensityGHK2_nsprefix_ = None + if channelDensityNonUniform is None: + self.channelDensityNonUniform = [] + else: + self.channelDensityNonUniform = channelDensityNonUniform + self.channelDensityNonUniform_nsprefix_ = None + if channelDensityNonUniformNernst is None: + self.channelDensityNonUniformNernst = [] + else: + self.channelDensityNonUniformNernst = channelDensityNonUniformNernst + self.channelDensityNonUniformNernst_nsprefix_ = None + if channelDensityNonUniformGHK is None: + self.channelDensityNonUniformGHK = [] + else: + self.channelDensityNonUniformGHK = channelDensityNonUniformGHK + self.channelDensityNonUniformGHK_nsprefix_ = None + if spikeThresh is None: + self.spikeThresh = [] + else: + self.spikeThresh = spikeThresh + self.spikeThresh_nsprefix_ = None + if specificCapacitance is None: + self.specificCapacitance = [] + else: + self.specificCapacitance = specificCapacitance + self.specificCapacitance_nsprefix_ = None + if initMembPotential is None: + self.initMembPotential = [] + else: + self.initMembPotential = initMembPotential + self.initMembPotential_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -4154,23 +4924,23 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.channel_populations or - self.channel_densities or - self.channel_density_v_shifts or - self.channel_density_nernsts or - self.channel_density_ghks or - self.channel_density_ghk2s or - self.channel_density_non_uniforms or - self.channel_density_non_uniform_nernsts or - self.channel_density_non_uniform_ghks or - self.spike_threshes or - self.specific_capacitances or - self.init_memb_potentials + self.channelPopulation or + self.channelDensity or + self.channelDensityVShift or + self.channelDensityNernst or + self.channelDensityGHK or + self.channelDensityGHK2 or + self.channelDensityNonUniform or + self.channelDensityNonUniformNernst or + self.channelDensityNonUniformGHK or + self.spikeThresh or + self.specificCapacitance or + self.initMembPotential ): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('MembraneProperties') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -4180,6 +4950,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4195,129 +4967,154 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' - for channelPopulation_ in self.channel_populations: + for channelPopulation_ in self.channelPopulation: + namespaceprefix_ = self.channelPopulation_nsprefix_ + ':' if (UseCapturedNS_ and self.channelPopulation_nsprefix_) else '' channelPopulation_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelPopulation', pretty_print=pretty_print) - for channelDensity_ in self.channel_densities: + for channelDensity_ in self.channelDensity: + namespaceprefix_ = self.channelDensity_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensity_nsprefix_) else '' channelDensity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensity', pretty_print=pretty_print) - for channelDensityVShift_ in self.channel_density_v_shifts: + for channelDensityVShift_ in self.channelDensityVShift: + namespaceprefix_ = self.channelDensityVShift_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityVShift_nsprefix_) else '' channelDensityVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityVShift', pretty_print=pretty_print) - for channelDensityNernst_ in self.channel_density_nernsts: + for channelDensityNernst_ in self.channelDensityNernst: + namespaceprefix_ = self.channelDensityNernst_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNernst_nsprefix_) else '' channelDensityNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernst', pretty_print=pretty_print) - for channelDensityGHK_ in self.channel_density_ghks: + for channelDensityGHK_ in self.channelDensityGHK: + namespaceprefix_ = self.channelDensityGHK_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityGHK_nsprefix_) else '' channelDensityGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK', pretty_print=pretty_print) - for channelDensityGHK2_ in self.channel_density_ghk2s: + for channelDensityGHK2_ in self.channelDensityGHK2: + namespaceprefix_ = self.channelDensityGHK2_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityGHK2_nsprefix_) else '' channelDensityGHK2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK2', pretty_print=pretty_print) - for channelDensityNonUniform_ in self.channel_density_non_uniforms: + for channelDensityNonUniform_ in self.channelDensityNonUniform: + namespaceprefix_ = self.channelDensityNonUniform_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniform_nsprefix_) else '' channelDensityNonUniform_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniform', pretty_print=pretty_print) - for channelDensityNonUniformNernst_ in self.channel_density_non_uniform_nernsts: + for channelDensityNonUniformNernst_ in self.channelDensityNonUniformNernst: + namespaceprefix_ = self.channelDensityNonUniformNernst_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniformNernst_nsprefix_) else '' channelDensityNonUniformNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformNernst', pretty_print=pretty_print) - for channelDensityNonUniformGHK_ in self.channel_density_non_uniform_ghks: + for channelDensityNonUniformGHK_ in self.channelDensityNonUniformGHK: + namespaceprefix_ = self.channelDensityNonUniformGHK_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniformGHK_nsprefix_) else '' channelDensityNonUniformGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformGHK', pretty_print=pretty_print) - for spikeThresh_ in self.spike_threshes: + for spikeThresh_ in self.spikeThresh: + namespaceprefix_ = self.spikeThresh_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeThresh_nsprefix_) else '' spikeThresh_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeThresh', pretty_print=pretty_print) - for specificCapacitance_ in self.specific_capacitances: + for specificCapacitance_ in self.specificCapacitance: + namespaceprefix_ = self.specificCapacitance_nsprefix_ + ':' if (UseCapturedNS_ and self.specificCapacitance_nsprefix_) else '' specificCapacitance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='specificCapacitance', pretty_print=pretty_print) - for initMembPotential_ in self.init_memb_potentials: + for initMembPotential_ in self.initMembPotential: + namespaceprefix_ = self.initMembPotential_nsprefix_ + ':' if (UseCapturedNS_ and self.initMembPotential_nsprefix_) else '' initMembPotential_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='initMembPotential', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'channelPopulation': obj_ = ChannelPopulation.factory(parent_object_=self) - obj_.build(child_) - self.channel_populations.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelPopulation.append(obj_) obj_.original_tagname_ = 'channelPopulation' elif nodeName_ == 'channelDensity': class_obj_ = self.get_class_obj_(child_, ChannelDensity) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.channel_densities.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensity.append(obj_) obj_.original_tagname_ = 'channelDensity' elif nodeName_ == 'channelDensityVShift': obj_ = ChannelDensityVShift.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_v_shifts.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityVShift.append(obj_) obj_.original_tagname_ = 'channelDensityVShift' elif nodeName_ == 'channelDensityNernst': class_obj_ = self.get_class_obj_(child_, ChannelDensityNernst) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_nernsts.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityNernst.append(obj_) obj_.original_tagname_ = 'channelDensityNernst' elif nodeName_ == 'channelDensityGHK': obj_ = ChannelDensityGHK.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_ghks.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityGHK.append(obj_) obj_.original_tagname_ = 'channelDensityGHK' elif nodeName_ == 'channelDensityGHK2': obj_ = ChannelDensityGHK2.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_ghk2s.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityGHK2.append(obj_) obj_.original_tagname_ = 'channelDensityGHK2' elif nodeName_ == 'channelDensityNonUniform': obj_ = ChannelDensityNonUniform.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_non_uniforms.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityNonUniform.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniform' elif nodeName_ == 'channelDensityNonUniformNernst': obj_ = ChannelDensityNonUniformNernst.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_non_uniform_nernsts.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityNonUniformNernst.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformNernst' elif nodeName_ == 'channelDensityNonUniformGHK': obj_ = ChannelDensityNonUniformGHK.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_non_uniform_ghks.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityNonUniformGHK.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformGHK' elif nodeName_ == 'spikeThresh': obj_ = SpikeThresh.factory(parent_object_=self) - obj_.build(child_) - self.spike_threshes.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeThresh.append(obj_) obj_.original_tagname_ = 'spikeThresh' elif nodeName_ == 'specificCapacitance': obj_ = SpecificCapacitance.factory(parent_object_=self) - obj_.build(child_) - self.specific_capacitances.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.specificCapacitance.append(obj_) obj_.original_tagname_ = 'specificCapacitance' elif nodeName_ == 'initMembPotential': obj_ = InitMembPotential.factory(parent_object_=self) - obj_.build(child_) - self.init_memb_potentials.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.initMembPotential.append(obj_) obj_.original_tagname_ = 'initMembPotential' # end class MembraneProperties class MembraneProperties2CaPools(MembraneProperties): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channel_density_nernst_ca2s', 'ChannelDensityNernstCa2', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNernstCa2', u'name': u'channelDensityNernstCa2', u'minOccurs': u'0'}, None), + MemberSpec_('channelDensityNernstCa2', 'ChannelDensityNernstCa2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernstCa2', 'type': 'ChannelDensityNernstCa2'}, None), ] subclass = None superclass = MembraneProperties - def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, channel_density_nernst_ca2s=None, **kwargs_): + def __init__(self, channelPopulation=None, channelDensity=None, channelDensityVShift=None, channelDensityNernst=None, channelDensityGHK=None, channelDensityGHK2=None, channelDensityNonUniform=None, channelDensityNonUniformNernst=None, channelDensityNonUniformGHK=None, spikeThresh=None, specificCapacitance=None, initMembPotential=None, channelDensityNernstCa2=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(MembraneProperties2CaPools, self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) - if channel_density_nernst_ca2s is None: - self.channel_density_nernst_ca2s = [] + self.ns_prefix_ = None + super(MembraneProperties2CaPools, self).__init__(channelPopulation, channelDensity, channelDensityVShift, channelDensityNernst, channelDensityGHK, channelDensityGHK2, channelDensityNonUniform, channelDensityNonUniformNernst, channelDensityNonUniformGHK, spikeThresh, specificCapacitance, initMembPotential, **kwargs_) + if channelDensityNernstCa2 is None: + self.channelDensityNernstCa2 = [] else: - self.channel_density_nernst_ca2s = channel_density_nernst_ca2s + self.channelDensityNernstCa2 = channelDensityNernstCa2 + self.channelDensityNernstCa2_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4331,13 +5128,13 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.channel_density_nernst_ca2s or + self.channelDensityNernstCa2 or super(MembraneProperties2CaPools, self).hasContent_() ): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties2CaPools', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties2CaPools', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('MembraneProperties2CaPools') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -4347,6 +5144,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4360,47 +5159,59 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MembraneProperties2CaPools'): super(MembraneProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MembraneProperties2CaPools') - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(MembraneProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties2CaPools', fromsubclass_=False, pretty_print=True): + super(MembraneProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for channelDensityNernstCa2_ in self.channel_density_nernst_ca2s: + for channelDensityNernstCa2_ in self.channelDensityNernstCa2: + namespaceprefix_ = self.channelDensityNernstCa2_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNernstCa2_nsprefix_) else '' channelDensityNernstCa2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernstCa2', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(MembraneProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'channelDensityNernstCa2': obj_ = ChannelDensityNernstCa2.factory(parent_object_=self) - obj_.build(child_) - self.channel_density_nernst_ca2s.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.channelDensityNernstCa2.append(obj_) obj_.original_tagname_ = 'channelDensityNernstCa2' super(MembraneProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class MembraneProperties2CaPools class ValueAcrossSegOrSegGroup(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('value', 'Nml2Quantity', 0, 1, {'use': u'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('value', 'Nml2Quantity', 0, 1, {'use': 'optional'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, value=None, segment_groups='all', segments=None, extensiontype_=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.value = _cast(None, value) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(None, segments) + self.value_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(None, segment) + self.segment_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -4415,18 +5226,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_patterns_, )) - validate_Nml2Quantity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_patterns_, )) + validate_Nml2Quantity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*)$']] def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( @@ -4444,6 +5263,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4457,25 +5278,33 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ValueAcrossSegOrSegGroup'): if self.value is not None and 'value' not in already_processed: already_processed.add('value') - outfile.write(' value=%s' % (quote_attrib(self.value), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ValueAcrossSegOrSegGroup', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('value', node) @@ -4486,36 +5315,43 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = value - self.validate_NmlId(self.segments) # validate type NmlId + self.segment = value + self.validate_NmlId(self.segment) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class ValueAcrossSegOrSegGroup class VariableParameter(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('parameter', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('segment_groups', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('inhomogeneous_value', 'InhomogeneousValue', 0, 1, {u'type': u'InhomogeneousValue', u'name': u'inhomogeneousValue', u'minOccurs': u'0'}, None), + MemberSpec_('parameter', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('segmentGroup', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('inhomogeneousValue', 'InhomogeneousValue', 0, 1, {'minOccurs': '0', 'name': 'inhomogeneousValue', 'type': 'InhomogeneousValue'}, None), ] subclass = None superclass = None - def __init__(self, parameter=None, segment_groups=None, inhomogeneous_value=None, **kwargs_): + def __init__(self, parameter=None, segmentGroup=None, inhomogeneousValue=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.parameter = _cast(None, parameter) - self.segment_groups = _cast(None, segment_groups) - self.inhomogeneous_value = inhomogeneous_value + self.parameter_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.inhomogeneousValue = inhomogeneousValue + self.inhomogeneousValue_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4529,12 +5365,12 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.inhomogeneous_value is not None + self.inhomogeneousValue is not None ): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VariableParameter', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='VariableParameter', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('VariableParameter') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -4544,6 +5380,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4559,22 +5397,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.parameter is not None and 'parameter' not in already_processed: already_processed.add('parameter') outfile.write(' parameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.parameter), input_name='parameter')), )) - if self.segment_groups is not None and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VariableParameter', fromsubclass_=False, pretty_print=True): + if self.segmentGroup is not None and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='VariableParameter', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' - if self.inhomogeneous_value is not None: - self.inhomogeneous_value.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousValue', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.inhomogeneousValue is not None: + namespaceprefix_ = self.inhomogeneousValue_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneousValue_nsprefix_) else '' + self.inhomogeneousValue.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousValue', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('parameter', node) @@ -4584,28 +5427,34 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.segmentGroup = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'inhomogeneousValue': obj_ = InhomogeneousValue.factory(parent_object_=self) - obj_.build(child_) - self.inhomogeneous_value = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.inhomogeneousValue = obj_ obj_.original_tagname_ = 'inhomogeneousValue' # end class VariableParameter class InhomogeneousValue(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('inhomogeneous_parameters', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('inhomogeneousParameter', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, inhomogeneous_parameters=None, value=None, **kwargs_): + def __init__(self, inhomogeneousParameter=None, value=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.inhomogeneous_parameters = _cast(None, inhomogeneous_parameters) + self.ns_prefix_ = None + self.inhomogeneousParameter = _cast(None, inhomogeneousParameter) + self.inhomogeneousParameter_nsprefix_ = None self.value = _cast(None, value) + self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4634,6 +5483,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4645,57 +5496,70 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InhomogeneousValue'): - if self.inhomogeneous_parameters is not None and 'inhomogeneous_parameters' not in already_processed: - already_processed.add('inhomogeneous_parameters') - outfile.write(' inhomogeneousParameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inhomogeneous_parameters), input_name='inhomogeneousParameter')), )) + if self.inhomogeneousParameter is not None and 'inhomogeneousParameter' not in already_processed: + already_processed.add('inhomogeneousParameter') + outfile.write(' inhomogeneousParameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inhomogeneousParameter), input_name='inhomogeneousParameter')), )) if self.value is not None and 'value' not in already_processed: already_processed.add('value') outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InhomogeneousValue', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('inhomogeneousParameter', node) if value is not None and 'inhomogeneousParameter' not in already_processed: already_processed.add('inhomogeneousParameter') - self.inhomogeneous_parameters = value + self.inhomogeneousParameter = value value = find_attr_value_('value', node) if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class InhomogeneousValue class Species(ValueAcrossSegOrSegGroup): - """Specifying the ion here again is redundant, the ion name should be - the same as id. Kept for now until LEMS implementation can - select by id. TODO: remove.""" + """Specifying the ion here again is redundant, the ion name should be the + same as id. Kept for now + until LEMS implementation can select by id. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('id', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('concentration_model', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('ion', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('initial_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), - MemberSpec_('initial_ext_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('id', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('concentrationModel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('initialConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('initialExtConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, id=None, concentration_model=None, ion=None, initial_concentration=None, initial_ext_concentration=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, id=None, concentrationModel=None, ion=None, initialConcentration=None, initialExtConcentration=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Species, self).__init__(value, segment_groups, segments, **kwargs_) + self.ns_prefix_ = None + super(Species, self).__init__(value, segmentGroup, segment, **kwargs_) self.id = _cast(None, id) - self.concentration_model = _cast(None, concentration_model) + self.id_nsprefix_ = None + self.concentrationModel = _cast(None, concentrationModel) + self.concentrationModel_nsprefix_ = None self.ion = _cast(None, ion) - self.initial_concentration = _cast(None, initial_concentration) - self.initial_ext_concentration = _cast(None, initial_ext_concentration) + self.ion_nsprefix_ = None + self.initialConcentration = _cast(None, initialConcentration) + self.initialConcentration_nsprefix_ = None + self.initialExtConcentration = _cast(None, initialExtConcentration) + self.initialExtConcentration_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4709,18 +5573,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] def hasContent_(self): if ( super(Species, self).hasContent_() @@ -4738,6 +5610,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4752,28 +5626,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Species, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Species') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (quote_attrib(self.id), )) - if self.concentration_model is not None and 'concentration_model' not in already_processed: - already_processed.add('concentration_model') - outfile.write(' concentrationModel=%s' % (quote_attrib(self.concentration_model), )) + outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), )) + if self.concentrationModel is not None and 'concentrationModel' not in already_processed: + already_processed.add('concentrationModel') + outfile.write(' concentrationModel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.concentrationModel), input_name='concentrationModel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) - if self.initial_concentration is not None and 'initial_concentration' not in already_processed: - already_processed.add('initial_concentration') - outfile.write(' initialConcentration=%s' % (quote_attrib(self.initial_concentration), )) - if self.initial_ext_concentration is not None and 'initial_ext_concentration' not in already_processed: - already_processed.add('initial_ext_concentration') - outfile.write(' initialExtConcentration=%s' % (quote_attrib(self.initial_ext_concentration), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + if self.initialConcentration is not None and 'initialConcentration' not in already_processed: + already_processed.add('initialConcentration') + outfile.write(' initialConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initialConcentration), input_name='initialConcentration')), )) + if self.initialExtConcentration is not None and 'initialExtConcentration' not in already_processed: + already_processed.add('initialExtConcentration') + outfile.write(' initialExtConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initialExtConcentration), input_name='initialExtConcentration')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Species', fromsubclass_=False, pretty_print=True): - super(Species, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Species, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) @@ -4784,8 +5662,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('concentrationModel', node) if value is not None and 'concentrationModel' not in already_processed: already_processed.add('concentrationModel') - self.concentration_model = value - self.validate_NmlId(self.concentration_model) # validate type NmlId + self.concentrationModel = value + self.validate_NmlId(self.concentrationModel) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -4794,38 +5672,44 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('initialConcentration', node) if value is not None and 'initialConcentration' not in already_processed: already_processed.add('initialConcentration') - self.initial_concentration = value - self.validate_Nml2Quantity_concentration(self.initial_concentration) # validate type Nml2Quantity_concentration + self.initialConcentration = value + self.validate_Nml2Quantity_concentration(self.initialConcentration) # validate type Nml2Quantity_concentration value = find_attr_value_('initialExtConcentration', node) if value is not None and 'initialExtConcentration' not in already_processed: already_processed.add('initialExtConcentration') - self.initial_ext_concentration = value - self.validate_Nml2Quantity_concentration(self.initial_ext_concentration) # validate type Nml2Quantity_concentration + self.initialExtConcentration = value + self.validate_Nml2Quantity_concentration(self.initialExtConcentration) # validate type Nml2Quantity_concentration super(Species, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Species, self).buildChildren(child_, node, nodeName_, True) pass # end class Species class IntracellularProperties(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), - MemberSpec_('resistivities', 'Resistivity', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Resistivity', u'name': u'resistivity', u'minOccurs': u'0'}, None), + MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), + MemberSpec_('resistivity', 'Resistivity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'resistivity', 'type': 'Resistivity'}, None), ] subclass = None superclass = None - def __init__(self, species=None, resistivities=None, extensiontype_=None, **kwargs_): + def __init__(self, species=None, resistivity=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None if species is None: self.species = [] else: self.species = species - if resistivities is None: - self.resistivities = [] + self.species_nsprefix_ = None + if resistivity is None: + self.resistivity = [] else: - self.resistivities = resistivities + self.resistivity = resistivity + self.resistivity_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -4841,12 +5725,12 @@ def factory(*args_, **kwargs_): def hasContent_(self): if ( self.species or - self.resistivities + self.resistivity ): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='IntracellularProperties', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('IntracellularProperties') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -4856,6 +5740,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4871,52 +5757,66 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='IntracellularProperties', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: + namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - for resistivity_ in self.resistivities: + for resistivity_ in self.resistivity: + namespaceprefix_ = self.resistivity_nsprefix_ + ':' if (UseCapturedNS_ and self.resistivity_nsprefix_) else '' resistivity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='resistivity', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.species.append(obj_) obj_.original_tagname_ = 'species' elif nodeName_ == 'resistivity': obj_ = Resistivity.factory(parent_object_=self) - obj_.build(child_) - self.resistivities.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.resistivity.append(obj_) obj_.original_tagname_ = 'resistivity' # end class IntracellularProperties class IntracellularProperties2CaPools(IntracellularProperties): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = IntracellularProperties - def __init__(self, species=None, resistivities=None, **kwargs_): + def __init__(self, species=None, resistivity=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IntracellularProperties2CaPools, self).__init__(species, resistivities, **kwargs_) + self.ns_prefix_ = None + super(IntracellularProperties2CaPools, self).__init__(species, resistivity, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4945,6 +5845,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4959,35 +5861,44 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IntracellularProperties2CaPools'): super(IntracellularProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IntracellularProperties2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(IntracellularProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IntracellularProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IntracellularProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IntracellularProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) pass # end class IntracellularProperties2CaPools class ExtracellularPropertiesLocal(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), + MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), ] subclass = None superclass = None - def __init__(self, species=None, **kwargs_): + def __init__(self, species=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None if species is None: self.species = [] else: self.species = species + self.species_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5006,7 +5917,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularPropertiesLocal', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ExtracellularPropertiesLocal', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ExtracellularPropertiesLocal') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5016,6 +5927,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5029,51 +5942,66 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExtracellularPropertiesLocal'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularPropertiesLocal', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ExtracellularPropertiesLocal', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: + namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.species.append(obj_) obj_.original_tagname_ = 'species' # end class ExtracellularPropertiesLocal class SpaceStructure(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x_spacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('y_spacing', 'xs:float', 0, 1, {'use': u'optional'}), - MemberSpec_('z_spacing', 'xs:float', 0, 1, {'use': u'optional'}), - MemberSpec_('x_start', 'xs:float', 0, 1, {'use': u'optional'}), - MemberSpec_('y_start', 'xs:float', 0, 1, {'use': u'optional'}), - MemberSpec_('z_start', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('xSpacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('ySpacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('zSpacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('xStart', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('yStart', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('zStart', 'xs:float', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, x_spacing=None, y_spacing=None, z_spacing=None, x_start=0, y_start=0, z_start=0, **kwargs_): + def __init__(self, xSpacing=None, ySpacing=None, zSpacing=None, xStart=0, yStart=0, zStart=0, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.x_spacing = _cast(float, x_spacing) - self.y_spacing = _cast(float, y_spacing) - self.z_spacing = _cast(float, z_spacing) - self.x_start = _cast(float, x_start) - self.y_start = _cast(float, y_start) - self.z_start = _cast(float, z_start) + self.ns_prefix_ = None + self.xSpacing = _cast(float, xSpacing) + self.xSpacing_nsprefix_ = None + self.ySpacing = _cast(float, ySpacing) + self.ySpacing_nsprefix_ = None + self.zSpacing = _cast(float, zSpacing) + self.zSpacing_nsprefix_ = None + self.xStart = _cast(float, xStart) + self.xStart_nsprefix_ = None + self.yStart = _cast(float, yStart) + self.yStart_nsprefix_ = None + self.zStart = _cast(float, zStart) + self.zStart_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5102,6 +6030,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5113,97 +6043,97 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpaceStructure'): - if self.x_spacing is not None and 'x_spacing' not in already_processed: - already_processed.add('x_spacing') - outfile.write(' xSpacing="%s"' % self.gds_format_float(self.x_spacing, input_name='xSpacing')) - if self.y_spacing is not None and 'y_spacing' not in already_processed: - already_processed.add('y_spacing') - outfile.write(' ySpacing="%s"' % self.gds_format_float(self.y_spacing, input_name='ySpacing')) - if self.z_spacing is not None and 'z_spacing' not in already_processed: - already_processed.add('z_spacing') - outfile.write(' zSpacing="%s"' % self.gds_format_float(self.z_spacing, input_name='zSpacing')) - if self.x_start != 0 and 'x_start' not in already_processed: - already_processed.add('x_start') - outfile.write(' xStart="%s"' % self.gds_format_float(self.x_start, input_name='xStart')) - if self.y_start != 0 and 'y_start' not in already_processed: - already_processed.add('y_start') - outfile.write(' yStart="%s"' % self.gds_format_float(self.y_start, input_name='yStart')) - if self.z_start != 0 and 'z_start' not in already_processed: - already_processed.add('z_start') - outfile.write(' zStart="%s"' % self.gds_format_float(self.z_start, input_name='zStart')) + if self.xSpacing is not None and 'xSpacing' not in already_processed: + already_processed.add('xSpacing') + outfile.write(' xSpacing="%s"' % self.gds_format_float(self.xSpacing, input_name='xSpacing')) + if self.ySpacing is not None and 'ySpacing' not in already_processed: + already_processed.add('ySpacing') + outfile.write(' ySpacing="%s"' % self.gds_format_float(self.ySpacing, input_name='ySpacing')) + if self.zSpacing is not None and 'zSpacing' not in already_processed: + already_processed.add('zSpacing') + outfile.write(' zSpacing="%s"' % self.gds_format_float(self.zSpacing, input_name='zSpacing')) + if self.xStart != 0 and 'xStart' not in already_processed: + already_processed.add('xStart') + outfile.write(' xStart="%s"' % self.gds_format_float(self.xStart, input_name='xStart')) + if self.yStart != 0 and 'yStart' not in already_processed: + already_processed.add('yStart') + outfile.write(' yStart="%s"' % self.gds_format_float(self.yStart, input_name='yStart')) + if self.zStart != 0 and 'zStart' not in already_processed: + already_processed.add('zStart') + outfile.write(' zStart="%s"' % self.gds_format_float(self.zStart, input_name='zStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpaceStructure', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xSpacing', node) if value is not None and 'xSpacing' not in already_processed: already_processed.add('xSpacing') - try: - self.x_spacing = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (xSpacing): %s' % exp) + value = self.gds_parse_float(value, node, 'xSpacing') + self.xSpacing = value value = find_attr_value_('ySpacing', node) if value is not None and 'ySpacing' not in already_processed: already_processed.add('ySpacing') - try: - self.y_spacing = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (ySpacing): %s' % exp) + value = self.gds_parse_float(value, node, 'ySpacing') + self.ySpacing = value value = find_attr_value_('zSpacing', node) if value is not None and 'zSpacing' not in already_processed: already_processed.add('zSpacing') - try: - self.z_spacing = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (zSpacing): %s' % exp) + value = self.gds_parse_float(value, node, 'zSpacing') + self.zSpacing = value value = find_attr_value_('xStart', node) if value is not None and 'xStart' not in already_processed: already_processed.add('xStart') - try: - self.x_start = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (xStart): %s' % exp) + value = self.gds_parse_float(value, node, 'xStart') + self.xStart = value value = find_attr_value_('yStart', node) if value is not None and 'yStart' not in already_processed: already_processed.add('yStart') - try: - self.y_start = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (yStart): %s' % exp) + value = self.gds_parse_float(value, node, 'yStart') + self.yStart = value value = find_attr_value_('zStart', node) if value is not None and 'zStart' not in already_processed: already_processed.add('zStart') - try: - self.z_start = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (zStart): %s' % exp) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + value = self.gds_parse_float(value, node, 'zStart') + self.zStart = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SpaceStructure class Layout(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spaces', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('random', 'RandomLayout', 0, 0, {u'type': u'RandomLayout', u'name': u'random'}, 5), - MemberSpec_('grid', 'GridLayout', 0, 0, {u'type': u'GridLayout', u'name': u'grid'}, 5), - MemberSpec_('unstructured', 'UnstructuredLayout', 0, 0, {u'type': u'UnstructuredLayout', u'name': u'unstructured'}, 5), + MemberSpec_('space', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('random', 'RandomLayout', 0, 0, {'name': 'random', 'type': 'RandomLayout'}, 5), + MemberSpec_('grid', 'GridLayout', 0, 0, {'name': 'grid', 'type': 'GridLayout'}, 5), + MemberSpec_('unstructured', 'UnstructuredLayout', 0, 0, {'name': 'unstructured', 'type': 'UnstructuredLayout'}, 5), ] subclass = None superclass = None - def __init__(self, spaces=None, random=None, grid=None, unstructured=None, **kwargs_): + def __init__(self, space=None, random=None, grid=None, unstructured=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.spaces = _cast(None, spaces) + self.ns_prefix_ = None + self.space = _cast(None, space) + self.space_nsprefix_ = None self.random = random + self.random_nsprefix_ = None self.grid = grid + self.grid_nsprefix_ = None self.unstructured = unstructured + self.unstructured_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5217,11 +6147,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.random is not None or @@ -5231,7 +6165,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Layout', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Layout', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Layout') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5241,6 +6175,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5253,62 +6189,74 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Layout'): - if self.spaces is not None and 'spaces' not in already_processed: - already_processed.add('spaces') - outfile.write(' space=%s' % (quote_attrib(self.spaces), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Layout', fromsubclass_=False, pretty_print=True): + if self.space is not None and 'space' not in already_processed: + already_processed.add('space') + outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.space), input_name='space')), )) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Layout', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.random is not None: + namespaceprefix_ = self.random_nsprefix_ + ':' if (UseCapturedNS_ and self.random_nsprefix_) else '' self.random.export(outfile, level, namespaceprefix_, namespacedef_='', name_='random', pretty_print=pretty_print) if self.grid is not None: + namespaceprefix_ = self.grid_nsprefix_ + ':' if (UseCapturedNS_ and self.grid_nsprefix_) else '' self.grid.export(outfile, level, namespaceprefix_, namespacedef_='', name_='grid', pretty_print=pretty_print) if self.unstructured is not None: + namespaceprefix_ = self.unstructured_nsprefix_ + ':' if (UseCapturedNS_ and self.unstructured_nsprefix_) else '' self.unstructured.export(outfile, level, namespaceprefix_, namespacedef_='', name_='unstructured', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) if value is not None and 'space' not in already_processed: already_processed.add('space') - self.spaces = value - self.validate_NmlId(self.spaces) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.space = value + self.validate_NmlId(self.space) # validate type NmlId + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'random': obj_ = RandomLayout.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.random = obj_ obj_.original_tagname_ = 'random' elif nodeName_ == 'grid': obj_ = GridLayout.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.grid = obj_ obj_.original_tagname_ = 'grid' elif nodeName_ == 'unstructured': obj_ = UnstructuredLayout.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.unstructured = obj_ obj_.original_tagname_ = 'unstructured' # end class Layout class UnstructuredLayout(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('number', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, number=None, **kwargs_): + def __init__(self, number=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.number = _cast(int, number) + self.number_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5337,6 +6285,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='U eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5353,40 +6303,47 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='UnstructuredLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - try: - self.number = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.number = self.gds_parse_integer(value, node, 'number') if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class UnstructuredLayout class RandomLayout(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('number', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('regions', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('region', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, number=None, regions=None, **kwargs_): + def __init__(self, number=None, region=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.number = _cast(int, number) - self.regions = _cast(None, regions) + self.number_nsprefix_ = None + self.region = _cast(None, region) + self.region_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5400,11 +6357,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( @@ -5422,6 +6383,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5436,52 +6399,60 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.number is not None and 'number' not in already_processed: already_processed.add('number') outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) - if self.regions is not None and 'regions' not in already_processed: - already_processed.add('regions') - outfile.write(' region=%s' % (quote_attrib(self.regions), )) + if self.region is not None and 'region' not in already_processed: + already_processed.add('region') + outfile.write(' region=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.region), input_name='region')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RandomLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - try: - self.number = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.number = self.gds_parse_integer(value, node, 'number') if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('region', node) if value is not None and 'region' not in already_processed: already_processed.add('region') - self.regions = value - self.validate_NmlId(self.regions) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + self.region = value + self.validate_NmlId(self.region) # validate type NmlId + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class RandomLayout class GridLayout(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('y_size', 'xs:nonNegativeInteger', 0, 1, {'use': u'optional'}), - MemberSpec_('z_size', 'xs:nonNegativeInteger', 0, 1, {'use': u'optional'}), + MemberSpec_('xSize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('ySize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('zSize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, x_size=None, y_size=None, z_size=None, **kwargs_): + def __init__(self, xSize=None, ySize=None, zSize=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.x_size = _cast(int, x_size) - self.y_size = _cast(int, y_size) - self.z_size = _cast(int, z_size) + self.ns_prefix_ = None + self.xSize = _cast(int, xSize) + self.xSize_nsprefix_ = None + self.ySize = _cast(int, ySize) + self.ySize_nsprefix_ = None + self.zSize = _cast(int, zSize) + self.zSize_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5510,6 +6481,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5521,75 +6494,79 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='GridLayout'): - if self.x_size is not None and 'x_size' not in already_processed: - already_processed.add('x_size') - outfile.write(' xSize="%s"' % self.gds_format_integer(self.x_size, input_name='xSize')) - if self.y_size is not None and 'y_size' not in already_processed: - already_processed.add('y_size') - outfile.write(' ySize="%s"' % self.gds_format_integer(self.y_size, input_name='ySize')) - if self.z_size is not None and 'z_size' not in already_processed: - already_processed.add('z_size') - outfile.write(' zSize="%s"' % self.gds_format_integer(self.z_size, input_name='zSize')) + if self.xSize is not None and 'xSize' not in already_processed: + already_processed.add('xSize') + outfile.write(' xSize="%s"' % self.gds_format_integer(self.xSize, input_name='xSize')) + if self.ySize is not None and 'ySize' not in already_processed: + already_processed.add('ySize') + outfile.write(' ySize="%s"' % self.gds_format_integer(self.ySize, input_name='ySize')) + if self.zSize is not None and 'zSize' not in already_processed: + already_processed.add('zSize') + outfile.write(' zSize="%s"' % self.gds_format_integer(self.zSize, input_name='zSize')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GridLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xSize', node) if value is not None and 'xSize' not in already_processed: already_processed.add('xSize') - try: - self.x_size = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.x_size < 0: + self.xSize = self.gds_parse_integer(value, node, 'xSize') + if self.xSize < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('ySize', node) if value is not None and 'ySize' not in already_processed: already_processed.add('ySize') - try: - self.y_size = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.y_size < 0: + self.ySize = self.gds_parse_integer(value, node, 'ySize') + if self.ySize < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('zSize', node) if value is not None and 'zSize' not in already_processed: already_processed.add('zSize') - try: - self.z_size = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.z_size < 0: + self.zSize = self.gds_parse_integer(value, node, 'zSize') + if self.zSize < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class GridLayout class Instance(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('id', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('i', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('j', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('k', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('location', 'Location', 0, 0, {u'type': u'Location', u'name': u'location'}, None), + MemberSpec_('location', 'Location', 0, 0, {'name': 'location', 'type': 'Location'}, None), ] subclass = None superclass = None - def __init__(self, id=None, i=None, j=None, k=None, location=None, **kwargs_): + def __init__(self, id=None, i=None, j=None, k=None, location=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.id = _cast(int, id) + self.id_nsprefix_ = None self.i = _cast(int, i) + self.i_nsprefix_ = None self.j = _cast(int, j) + self.j_nsprefix_ = None self.k = _cast(int, k) + self.k_nsprefix_ = None self.location = location + self.location_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5608,7 +6585,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Instance', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Instance', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Instance') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5618,6 +6595,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5642,61 +6621,54 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.k is not None and 'k' not in already_processed: already_processed.add('k') outfile.write(' k="%s"' % self.gds_format_integer(self.k, input_name='k')) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Instance', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Instance', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.location is not None: + namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else '' self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - try: - self.id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.id = self.gds_parse_integer(value, node, 'id') if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('i', node) if value is not None and 'i' not in already_processed: already_processed.add('i') - try: - self.i = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.i = self.gds_parse_integer(value, node, 'i') if self.i < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('j', node) if value is not None and 'j' not in already_processed: already_processed.add('j') - try: - self.j = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.j = self.gds_parse_integer(value, node, 'j') if self.j < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('k', node) if value is not None and 'k' not in already_processed: already_processed.add('k') - try: - self.k = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.k = self.gds_parse_integer(value, node, 'k') if self.k < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'location': obj_ = Location.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.location = obj_ obj_.original_tagname_ = 'location' @@ -5713,19 +6685,26 @@ def __repr__(self): class Location(GeneratedsSuper): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('y', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('z', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('x', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('y', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('z', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, x=None, y=None, z=None, **kwargs_): + def __init__(self, x=None, y=None, z=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.x = _cast(float, x) + self.x_nsprefix_ = None self.y = _cast(float, y) + self.y_nsprefix_ = None self.z = _cast(float, z) + self.z_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5754,6 +6733,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5776,36 +6757,34 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' z="%s"' % self.gds_format_float(self.z, input_name='z')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Location', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('x', node) if value is not None and 'x' not in already_processed: already_processed.add('x') - try: - self.x = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (x): %s' % exp) + value = self.gds_parse_float(value, node, 'x') + self.x = value value = find_attr_value_('y', node) if value is not None and 'y' not in already_processed: already_processed.add('y') - try: - self.y = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (y): %s' % exp) + value = self.gds_parse_float(value, node, 'y') + self.y = value value = find_attr_value_('z', node) if value is not None and 'z' not in already_processed: already_processed.add('z') - try: - self.z = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (z): %s' % exp) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + value = self.gds_parse_float(value, node, 'z') + self.z = value + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass def _format(self,value): @@ -5827,24 +6806,32 @@ def __repr__(self): class SynapticConnection(GeneratedsSuper): - """Single explicit connection. Introduced to test connections in LEMS. - Will probably be removed in favour of connections wrapped in - projection element""" + """Single explicit connection. Introduced to test connections in LEMS. Will + probably be removed in favour of + connections wrapped in projection element""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('to', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('destination', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('from_', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('to', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('destination', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, synapse=None, destination=None, **kwargs_): + def __init__(self, from_=None, to=None, synapse=None, destination=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.from_ = _cast(None, from_) + self.from__nsprefix_ = None self.to = _cast(None, to) + self.to_nsprefix_ = None self.synapse = _cast(None, synapse) + self.synapse_nsprefix_ = None self.destination = _cast(None, destination) + self.destination_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5858,11 +6845,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( @@ -5880,6 +6871,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5902,15 +6895,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) if self.destination is not None and 'destination' not in already_processed: already_processed.add('destination') - outfile.write(' destination=%s' % (quote_attrib(self.destination), )) + outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SynapticConnection', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -5930,16 +6927,18 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('destination') self.destination = value self.validate_NmlId(self.destination) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass def _get_cell_id(self,ref): + """Get cell ID""" if '[' in ref: return int(ref.split('[')[1].split(']')[0]) else: return int(ref.split('/')[2]) def _get_population(self,ref): + """Get population""" if '[' in ref: return ref.split('[')[0] else: @@ -5955,22 +6954,29 @@ def __str__(self): class ExplicitInput(GeneratedsSuper): - """Single explicit input. Introduced to test inputs in LEMS. Will - probably be removed in favour of inputs wrapped in inputList - element""" + """Single explicit input. Introduced to test inputs in LEMS. Will probably + be removed in favour of + inputs wrapped in inputList element""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('target', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('input', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('target', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('input', 'xs:string', 0, 0, {'use': 'required'}), MemberSpec_('destination', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, target=None, input=None, destination=None, **kwargs_): + def __init__(self, target=None, input=None, destination=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.target = _cast(None, target) + self.target_nsprefix_ = None self.input = _cast(None, input) + self.input_nsprefix_ = None self.destination = _cast(None, destination) + self.destination_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5999,6 +7005,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6021,12 +7029,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExplicitInput', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('target', node) @@ -6041,7 +7053,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'destination' not in already_processed: already_processed.add('destination') self.destination = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass def _get_cell_id(self, id_string): @@ -6068,12 +7080,14 @@ def __str__(self): def get_target_cell_id(self,): + """Get target cell ID""" if '[' in self.target: return int(self.target.split('[')[1].split(']')[0]) else: return int(self.target.split('/')[2]) def get_target_population(self,): + """Get target population.""" if '[' in self.target: return self.target.split('[')[0] else: @@ -6090,23 +7104,32 @@ def __str__(self): class Input(GeneratedsSuper): """Individual input to the cell specified by target""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': u'required'}), - MemberSpec_('target', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('destination', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('target', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('destination', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('segmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('fractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, extensiontype_=None, **kwargs_): + def __init__(self, id=None, target=None, destination=None, segmentId=None, fractionAlong=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None self.id = _cast(int, id) + self.id_nsprefix_ = None self.target = _cast(None, target) + self.target_nsprefix_ = None self.destination = _cast(None, destination) - self.segment_id = _cast(int, segment_id) - self.fraction_along = _cast(float, fraction_along) + self.destination_nsprefix_ = None + self.segmentId = _cast(int, segmentId) + self.segmentId_nsprefix_ = None + self.fractionAlong = _cast(float, fractionAlong) + self.fractionAlong_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6121,22 +7144,38 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value < 0: - warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False if value > 1: - warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False def hasContent_(self): if ( @@ -6154,6 +7193,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6167,40 +7208,45 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Input'): if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (quote_attrib(self.id), )) + outfile.write(' id="%s"' % self.gds_format_integer(self.id, input_name='id')) if self.target is not None and 'target' not in already_processed: already_processed.add('target') outfile.write(' target=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.target), input_name='target')), )) if self.destination is not None and 'destination' not in already_processed: already_processed.add('destination') - outfile.write(' destination=%s' % (quote_attrib(self.destination), )) - if self.segment_id is not None and 'segment_id' not in already_processed: - already_processed.add('segment_id') - outfile.write(' segmentId=%s' % (quote_attrib(self.segment_id), )) - if self.fraction_along is not None and 'fraction_along' not in already_processed: - already_processed.add('fraction_along') - outfile.write(' fractionAlong=%s' % (quote_attrib(self.fraction_along), )) + outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) + if self.segmentId is not None and 'segmentId' not in already_processed: + already_processed.add('segmentId') + outfile.write(' segmentId="%s"' % self.gds_format_integer(self.segmentId, input_name='segmentId')) + if self.fractionAlong is not None and 'fractionAlong' not in already_processed: + already_processed.add('fractionAlong') + outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fractionAlong, input_name='fractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Input', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - try: - self.id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.id = self.gds_parse_integer(value, node, 'id') if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.id) # validate type NonNegativeInteger @@ -6216,26 +7262,21 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentId', node) if value is not None and 'segmentId' not in already_processed: already_processed.add('segmentId') - try: - self.segment_id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segment_id < 0: + self.segmentId = self.gds_parse_integer(value, node, 'segmentId') + if self.segmentId < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment_id) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segmentId) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') - try: - self.fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (fractionAlong): %s' % exp) - self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'fractionAlong') + self.fractionAlong = value + self.validate_ZeroToOne(self.fractionAlong) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass def _get_cell_id(self, id_string): @@ -6264,18 +7305,23 @@ def __str__(self): class InputW(Input): - """Individual input to the cell specified by target. Includes setting - of _weight for the connection""" + """Individual input to the cell specified by target. Includes setting of + _weight for the connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = Input - def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, weight=None, **kwargs_): + def __init__(self, id=None, target=None, destination=None, segmentId=None, fractionAlong=None, weight=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(InputW, self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) + self.ns_prefix_ = None + super(InputW, self).__init__(id, target, destination, segmentId, fractionAlong, **kwargs_) self.weight = _cast(float, weight) + self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6304,6 +7350,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6320,25 +7368,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InputW', fromsubclass_=False, pretty_print=True): - super(InputW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(InputW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - try: - self.weight = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (weight): %s' % exp) + value = self.gds_parse_float(value, node, 'weight') + self.weight = value super(InputW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(InputW, self).buildChildren(child_, node, nodeName_, True) pass @@ -6355,17 +7405,22 @@ def __str__(self): class BaseWithoutId(GeneratedsSuper): """Base element without ID specified *yet*, e.g. for an element with a - particular requirement on its id which does not comply with - NmlId (e.g. Segment needs nonNegativeInteger).""" + particular requirement on its id which does not comply with NmlId (e.g. + Segment needs nonNegativeInteger).""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('neuro_lex_id', 'NeuroLexId', 0, 1, {'use': u'optional'}), + MemberSpec_('neuroLexId', 'NeuroLexId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, neuro_lex_id=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.neuro_lex_id = _cast(None, neuro_lex_id) + self.ns_prefix_ = None + self.neuroLexId = _cast(None, neuroLexId) + self.neuroLexId_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6380,11 +7435,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NeuroLexId(self, value): # Validate type NeuroLexId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NeuroLexId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NeuroLexId_patterns_, )) - validate_NeuroLexId_patterns_ = [[u'^[a-zA-Z0-9_:]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NeuroLexId_patterns_, )) + validate_NeuroLexId_patterns_ = [['^([a-zA-Z0-9_:]*)$']] def hasContent_(self): if ( @@ -6402,6 +7461,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6413,50 +7474,63 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseWithoutId'): - if self.neuro_lex_id is not None and 'neuro_lex_id' not in already_processed: - already_processed.add('neuro_lex_id') - outfile.write(' neuroLexId=%s' % (quote_attrib(self.neuro_lex_id), )) + if self.neuroLexId is not None and 'neuroLexId' not in already_processed: + already_processed.add('neuroLexId') + outfile.write(' neuroLexId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.neuroLexId), input_name='neuroLexId')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseWithoutId', fromsubclass_=False, pretty_print=True): pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('neuroLexId', node) if value is not None and 'neuroLexId' not in already_processed: already_processed.add('neuroLexId') - self.neuro_lex_id = value - self.validate_NeuroLexId(self.neuro_lex_id) # validate type NeuroLexId + self.neuroLexId = value + self.validate_NeuroLexId(self.neuroLexId) # validate type NeuroLexId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class BaseWithoutId class BaseNonNegativeIntegerId(BaseWithoutId): - """Anything which can have a unique (within its parent) id, which must - be an integer zero or greater.""" + """Anything which can have a unique (within its parent) id, which must be + an integer zero or greater.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseWithoutId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseNonNegativeIntegerId, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseNonNegativeIntegerId, self).__init__(neuroLexId, extensiontype_, **kwargs_) self.id = _cast(int, id) + self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6471,7 +7545,11 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( @@ -6490,6 +7568,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6504,29 +7584,34 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseNonNegativeIntegerId, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseNonNegativeIntegerId') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (quote_attrib(self.id), )) + outfile.write(' id="%s"' % self.gds_format_integer(self.id, input_name='id')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseNonNegativeIntegerId', fromsubclass_=False, pretty_print=True): - super(BaseNonNegativeIntegerId, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BaseNonNegativeIntegerId, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - try: - self.id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.id = self.gds_parse_integer(value, node, 'id') if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.id) # validate type NonNegativeInteger @@ -6535,7 +7620,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseNonNegativeIntegerId, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseNonNegativeIntegerId, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseNonNegativeIntegerId @@ -6543,18 +7628,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Base(BaseWithoutId): """Anything which can have a unique (within its parent) id of the form - NmlId (spaceless combination of letters, numbers and - underscore).""" + NmlId (spaceless combination of letters, numbers and underscore).""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('id', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('id', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseWithoutId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Base, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(Base, self).__init__(neuroLexId, extensiontype_, **kwargs_) self.id = _cast(None, id) + self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6569,11 +7658,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( super(Base, self).hasContent_() @@ -6591,6 +7684,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6605,20 +7700,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Base, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Base') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (quote_attrib(self.id), )) + outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Base', fromsubclass_=False, pretty_print=True): - super(Base, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Base, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) @@ -6631,7 +7734,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(Base, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Base, self).buildChildren(child_, node, nodeName_, True) pass # end class Base @@ -6640,26 +7743,34 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Standalone(Base): """Elements which can stand alone and be referenced by id, e.g. cell, morphology.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('metaid', 'MetaId', 0, 1, {'use': u'optional'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('properties', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Property', u'name': u'property', u'minOccurs': u'0'}, None), - MemberSpec_('annotation', 'Annotation', 0, 1, {u'type': u'Annotation', u'name': u'annotation', u'minOccurs': u'0'}, None), + MemberSpec_('metaid', 'MetaId', 0, 1, {'use': 'optional'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), + MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Standalone, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(Standalone, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) self.metaid = _cast(None, metaid) + self.metaid_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - if properties is None: - self.properties = [] + self.notes_nsprefix_ = None + if property is None: + self.property = [] else: - self.properties = properties + self.property = property + self.property_nsprefix_ = None self.annotation = annotation + self.annotation_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6673,27 +7784,37 @@ def factory(*args_, **kwargs_): return Standalone(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_MetaId(self, value): # Validate type MetaId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_MetaId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_MetaId_patterns_, )) - validate_MetaId_patterns_ = [[u'^[a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_MetaId_patterns_, )) + validate_MetaId_patterns_ = [['^([a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.notes is not None or - self.properties or + self.property or self.annotation is not None or super(Standalone, self).hasContent_() ): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Standalone', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Standalone', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Standalone') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -6703,6 +7824,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6718,30 +7841,41 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Standalone, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Standalone') if self.metaid is not None and 'metaid' not in already_processed: already_processed.add('metaid') - outfile.write(' metaid=%s' % (quote_attrib(self.metaid), )) + outfile.write(' metaid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.metaid), input_name='metaid')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Standalone', fromsubclass_=False, pretty_print=True): - super(Standalone, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Standalone', fromsubclass_=False, pretty_print=True): + super(Standalone, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - for property_ in self.properties: + for property_ in self.property: + namespaceprefix_ = self.property_nsprefix_ + ':' if (UseCapturedNS_ and self.property_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: + namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' self.annotation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='annotation', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('metaid', node) @@ -6754,21 +7888,23 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(Standalone, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) - obj_.build(child_) - self.properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.property.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.annotation = obj_ obj_.original_tagname_ = 'annotation' super(Standalone, self).buildChildren(child_, node, nodeName_, True) @@ -6776,20 +7912,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class SpikeSourcePoisson(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('start', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('start', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, start=None, duration=None, rate=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, start=None, duration=None, rate=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeSourcePoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(SpikeSourcePoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.start = _cast(None, start) + self.start_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.rate = _cast(None, rate) + self.rate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6803,18 +7946,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def hasContent_(self): if ( super(SpikeSourcePoisson, self).hasContent_() @@ -6832,6 +7983,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6847,21 +8000,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeSourcePoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeSourcePoisson') if self.start is not None and 'start' not in already_processed: already_processed.add('start') - outfile.write(' start=%s' % (quote_attrib(self.start), )) + outfile.write(' start=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start), input_name='start')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (quote_attrib(self.rate), )) + outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeSourcePoisson', fromsubclass_=False, pretty_print=True): - super(SpikeSourcePoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SpikeSourcePoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('start', node) @@ -6880,7 +8037,7 @@ def buildAttributes(self, node, attrs, already_processed): self.rate = value self.validate_Nml2Quantity_pertime(self.rate) # validate type Nml2Quantity_pertime super(SpikeSourcePoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeSourcePoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeSourcePoisson @@ -6889,28 +8046,36 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class InputList(Base): """List of inputs to a population. Currents will be provided by the specified component.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('populations', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('component', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('input', 'Input', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Input', u'name': u'input', u'minOccurs': u'0'}, None), - MemberSpec_('input_ws', 'InputW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InputW', u'name': u'inputW', u'minOccurs': u'0'}, None), + MemberSpec_('population', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('input', 'Input', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'input', 'type': 'Input'}, None), + MemberSpec_('inputW', 'InputW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputW', 'type': 'InputW'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, populations=None, component=None, input=None, input_ws=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, population=None, component=None, input=None, inputW=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(InputList, self).__init__(neuro_lex_id, id, **kwargs_) - self.populations = _cast(None, populations) + self.ns_prefix_ = None + super(InputList, self).__init__(neuroLexId, id, **kwargs_) + self.population = _cast(None, population) + self.population_nsprefix_ = None self.component = _cast(None, component) + self.component_nsprefix_ = None if input is None: self.input = [] else: self.input = input - if input_ws is None: - self.input_ws = [] + self.input_nsprefix_ = None + if inputW is None: + self.inputW = [] else: - self.input_ws = input_ws + self.inputW = inputW + self.inputW_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6924,15 +8089,19 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.input or - self.input_ws or + self.inputW or super(InputList, self).hasContent_() ): return True @@ -6948,6 +8117,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6961,52 +8132,58 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InputList'): super(InputList, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InputList') - if self.populations is not None and 'populations' not in already_processed: - already_processed.add('populations') - outfile.write(' population=%s' % (quote_attrib(self.populations), )) + if self.population is not None and 'population' not in already_processed: + already_processed.add('population') + outfile.write(' population=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.population), input_name='population')), )) if self.component is not None and 'component' not in already_processed: already_processed.add('component') - outfile.write(' component=%s' % (quote_attrib(self.component), )) + outfile.write(' component=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.component), input_name='component')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InputList', fromsubclass_=False, pretty_print=True): - super(InputList, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(InputList, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for input_ in self.input: + namespaceprefix_ = self.input_nsprefix_ + ':' if (UseCapturedNS_ and self.input_nsprefix_) else '' input_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='input', pretty_print=pretty_print) - for inputW_ in self.input_ws: + for inputW_ in self.inputW: + namespaceprefix_ = self.inputW_nsprefix_ + ':' if (UseCapturedNS_ and self.inputW_nsprefix_) else '' inputW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputW', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('population', node) if value is not None and 'population' not in already_processed: already_processed.add('population') - self.populations = value - self.validate_NmlId(self.populations) # validate type NmlId + self.population = value + self.validate_NmlId(self.population) # validate type NmlId value = find_attr_value_('component', node) if value is not None and 'component' not in already_processed: already_processed.add('component') self.component = value self.validate_NmlId(self.component) # validate type NmlId super(InputList, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'input': class_obj_ = self.get_class_obj_(child_, Input) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.input.append(obj_) obj_.original_tagname_ = 'input' elif nodeName_ == 'inputW': obj_ = InputW.factory(parent_object_=self) - obj_.build(child_) - self.input_ws.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.inputW.append(obj_) obj_.original_tagname_ = 'inputW' super(InputList, self).buildChildren(child_, node, nodeName_, True) @@ -7071,14 +8248,18 @@ def __str__(self): class BaseConnection(BaseNonNegativeIntegerId): """Base of all synaptic connections (chemical/electrical/analog, etc.) inside projections""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseConnection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseConnection, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -7108,6 +8289,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7123,16 +8306,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnection', fromsubclass_=False, pretty_print=True): - super(BaseConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BaseConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -7140,7 +8331,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseConnection, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnection @@ -7149,18 +8340,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class BaseProjection(Base): """Base for projection (set of synaptic connections) between two populations""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('presynaptic_population', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('postsynaptic_population', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('presynapticPopulation', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('postsynapticPopulation', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseProjection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) - self.presynaptic_population = _cast(None, presynaptic_population) - self.postsynaptic_population = _cast(None, postsynaptic_population) + self.ns_prefix_ = None + super(BaseProjection, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + self.presynapticPopulation = _cast(None, presynapticPopulation) + self.presynapticPopulation_nsprefix_ = None + self.postsynapticPopulation = _cast(None, postsynapticPopulation) + self.postsynapticPopulation_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -7175,11 +8372,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( super(BaseProjection, self).hasContent_() @@ -7197,6 +8398,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7209,60 +8412,73 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseProjection'): super(BaseProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseProjection') - if self.presynaptic_population is not None and 'presynaptic_population' not in already_processed: - already_processed.add('presynaptic_population') - outfile.write(' presynapticPopulation=%s' % (quote_attrib(self.presynaptic_population), )) - if self.postsynaptic_population is not None and 'postsynaptic_population' not in already_processed: - already_processed.add('postsynaptic_population') - outfile.write(' postsynapticPopulation=%s' % (quote_attrib(self.postsynaptic_population), )) + if self.presynapticPopulation is not None and 'presynapticPopulation' not in already_processed: + already_processed.add('presynapticPopulation') + outfile.write(' presynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.presynapticPopulation), input_name='presynapticPopulation')), )) + if self.postsynapticPopulation is not None and 'postsynapticPopulation' not in already_processed: + already_processed.add('postsynapticPopulation') + outfile.write(' postsynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postsynapticPopulation), input_name='postsynapticPopulation')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseProjection', fromsubclass_=False, pretty_print=True): - super(BaseProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BaseProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('presynapticPopulation', node) if value is not None and 'presynapticPopulation' not in already_processed: already_processed.add('presynapticPopulation') - self.presynaptic_population = value - self.validate_NmlId(self.presynaptic_population) # validate type NmlId + self.presynapticPopulation = value + self.validate_NmlId(self.presynapticPopulation) # validate type NmlId value = find_attr_value_('postsynapticPopulation', node) if value is not None and 'postsynapticPopulation' not in already_processed: already_processed.add('postsynapticPopulation') - self.postsynaptic_population = value - self.validate_NmlId(self.postsynaptic_population) # validate type NmlId + self.postsynapticPopulation = value + self.validate_NmlId(self.postsynapticPopulation) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BaseProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseProjection, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseProjection class CellSet(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('select', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('select', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, select=None, anytypeobjs_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, select=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(CellSet, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(CellSet, self).__init__(neuroLexId, id, **kwargs_) self.select = _cast(None, select) + self.select_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -7296,6 +8512,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7313,19 +8531,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('select') outfile.write(' select=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.select), input_name='select')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CellSet', fromsubclass_=False, pretty_print=True): - super(CellSet, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(CellSet, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('select', node) @@ -7333,38 +8555,47 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('select') self.select = value super(CellSet, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'CellSet') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'CellSet') + self.add_anytypeobjs_(content_) super(CellSet, self).buildChildren(child_, node, nodeName_, True) # end class CellSet class Population(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('component', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('size', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), - MemberSpec_('type', 'populationTypes', 0, 1, {'use': u'optional'}), - MemberSpec_('extracellular_properties', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('layout', 'Layout', 0, 1, {u'type': u'Layout', u'name': u'layout', u'minOccurs': u'0'}, 4), - MemberSpec_('instances', 'Instance', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Instance', u'name': u'instance'}, 4), + MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('size', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('type_', 'populationTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('extracellularProperties', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('layout', 'Layout', 0, 1, {'minOccurs': '0', 'name': 'layout', 'type': 'Layout'}, 4), + MemberSpec_('instance', 'Instance', 1, 0, {'maxOccurs': 'unbounded', 'name': 'instance', 'type': 'Instance'}, 4), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, component=None, size=None, type=None, extracellular_properties=None, layout=None, instances=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, component=None, size=None, type_=None, extracellularProperties=None, layout=None, instance=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Population, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(Population, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.component = _cast(None, component) + self.component_nsprefix_ = None self.size = _cast(int, size) - self.type = _cast(None, type) - self.extracellular_properties = _cast(None, extracellular_properties) + self.size_nsprefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None + self.extracellularProperties = _cast(None, extracellularProperties) + self.extracellularProperties_nsprefix_ = None self.layout = layout - if instances is None: - self.instances = [] + self.layout_nsprefix_ = None + if instance is None: + self.instance = [] else: - self.instances = instances + self.instance = instance + self.instance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7378,31 +8609,40 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_populationTypes(self, value): # Validate type populationTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['population', 'populationList'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on populationTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on populationTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def hasContent_(self): if ( self.layout is not None or - self.instances or + self.instance or super(Population, self).hasContent_() ): return True @@ -7418,6 +8658,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7433,32 +8675,38 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Population, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Population') if self.component is not None and 'component' not in already_processed: already_processed.add('component') - outfile.write(' component=%s' % (quote_attrib(self.component), )) + outfile.write(' component=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.component), input_name='component')), )) if self.size is not None and 'size' not in already_processed: already_processed.add('size') - outfile.write(' size=%s' % (quote_attrib(self.size), )) - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) - if self.extracellular_properties is not None and 'extracellular_properties' not in already_processed: - already_processed.add('extracellular_properties') - outfile.write(' extracellularProperties=%s' % (quote_attrib(self.extracellular_properties), )) + outfile.write(' size="%s"' % self.gds_format_integer(self.size, input_name='size')) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.extracellularProperties is not None and 'extracellularProperties' not in already_processed: + already_processed.add('extracellularProperties') + outfile.write(' extracellularProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.extracellularProperties), input_name='extracellularProperties')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Population', fromsubclass_=False, pretty_print=True): - super(Population, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Population, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.layout is not None: + namespaceprefix_ = self.layout_nsprefix_ + ':' if (UseCapturedNS_ and self.layout_nsprefix_) else '' self.layout.export(outfile, level, namespaceprefix_, namespacedef_='', name_='layout', pretty_print=pretty_print) - for instance_ in self.instances: + for instance_ in self.instance: + namespaceprefix_ = self.instance_nsprefix_ + ':' if (UseCapturedNS_ and self.instance_nsprefix_) else '' instance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='instance', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('component', node) @@ -7469,34 +8717,31 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('size', node) if value is not None and 'size' not in already_processed: already_processed.add('size') - try: - self.size = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.size = self.gds_parse_integer(value, node, 'size') if self.size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.size) # validate type NonNegativeInteger value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_populationTypes(self.type) # validate type populationTypes + self.type_ = value + self.validate_populationTypes(self.type_) # validate type populationTypes value = find_attr_value_('extracellularProperties', node) if value is not None and 'extracellularProperties' not in already_processed: already_processed.add('extracellularProperties') - self.extracellular_properties = value - self.validate_NmlId(self.extracellular_properties) # validate type NmlId + self.extracellularProperties = value + self.validate_NmlId(self.extracellularProperties) # validate type NmlId super(Population, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'layout': obj_ = Layout.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.layout = obj_ obj_.original_tagname_ = 'layout' elif nodeName_ == 'instance': obj_ = Instance.factory(parent_object_=self) - obj_.build(child_) - self.instances.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.instance.append(obj_) obj_.original_tagname_ = 'instance' super(Population, self).buildChildren(child_, node, nodeName_, True) @@ -7549,17 +8794,22 @@ def __str__(self): class Region(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spaces', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('space', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, spaces=None, anytypeobjs_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, space=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Region, self).__init__(neuro_lex_id, id, **kwargs_) - self.spaces = _cast(None, spaces) + self.ns_prefix_ = None + super(Region, self).__init__(neuroLexId, id, **kwargs_) + self.space = _cast(None, space) + self.space_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -7577,11 +8827,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -7600,6 +8854,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7613,52 +8869,61 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Region'): super(Region, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Region') - if self.spaces is not None and 'spaces' not in already_processed: - already_processed.add('spaces') - outfile.write(' space=%s' % (quote_attrib(self.spaces), )) + if self.space is not None and 'space' not in already_processed: + already_processed.add('space') + outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.space), input_name='space')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Region', fromsubclass_=False, pretty_print=True): - super(Region, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Region, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) if value is not None and 'space' not in already_processed: already_processed.add('space') - self.spaces = value - self.validate_NmlId(self.spaces) # validate type NmlId + self.space = value + self.validate_NmlId(self.space) # validate type NmlId super(Region, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'Region') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'Region') + self.add_anytypeobjs_(content_) super(Region, self).buildChildren(child_, node, nodeName_, True) # end class Region class Space(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('based_on', 'allowedSpaces', 0, 1, {'use': u'optional'}), - MemberSpec_('structure', 'SpaceStructure', 0, 1, {u'type': u'SpaceStructure', u'name': u'structure', u'minOccurs': u'0'}, None), + MemberSpec_('basedOn', 'allowedSpaces', 0, 1, {'use': 'optional'}), + MemberSpec_('structure', 'SpaceStructure', 0, 1, {'minOccurs': '0', 'name': 'structure', 'type': 'SpaceStructure'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, based_on=None, structure=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, basedOn=None, structure=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Space, self).__init__(neuro_lex_id, id, **kwargs_) - self.based_on = _cast(None, based_on) + self.ns_prefix_ = None + super(Space, self).__init__(neuroLexId, id, **kwargs_) + self.basedOn = _cast(None, basedOn) + self.basedOn_nsprefix_ = None self.structure = structure + self.structure_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7672,16 +8937,17 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_allowedSpaces(self, value): # Validate type allowedSpaces, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['Euclidean_1D', 'Euclidean_2D', 'Euclidean_3D', 'Grid_1D', 'Grid_2D', 'Grid_3D'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on allowedSpaces' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on allowedSpaces' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def hasContent_(self): if ( self.structure is not None or @@ -7700,6 +8966,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7713,35 +8981,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Space'): super(Space, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Space') - if self.based_on is not None and 'based_on' not in already_processed: - already_processed.add('based_on') - outfile.write(' basedOn=%s' % (quote_attrib(self.based_on), )) + if self.basedOn is not None and 'basedOn' not in already_processed: + already_processed.add('basedOn') + outfile.write(' basedOn=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.basedOn), input_name='basedOn')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Space', fromsubclass_=False, pretty_print=True): - super(Space, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Space, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.structure is not None: + namespaceprefix_ = self.structure_nsprefix_ + ':' if (UseCapturedNS_ and self.structure_nsprefix_) else '' self.structure.export(outfile, level, namespaceprefix_, namespacedef_='', name_='structure', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('basedOn', node) if value is not None and 'basedOn' not in already_processed: already_processed.add('basedOn') - self.based_on = value - self.validate_allowedSpaces(self.based_on) # validate type allowedSpaces + self.basedOn = value + self.validate_allowedSpaces(self.basedOn) # validate type allowedSpaces super(Space, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'structure': obj_ = SpaceStructure.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.structure = obj_ obj_.original_tagname_ = 'structure' super(Space, self).buildChildren(child_, node, nodeName_, True) @@ -7749,73 +9022,90 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Network(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'networkTypes', 0, 1, {'use': u'optional'}), - MemberSpec_('temperature', 'Nml2Quantity_temperature', 0, 1, {'use': u'optional'}), - MemberSpec_('spaces', 'Space', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Space', u'name': u'space', u'minOccurs': u'0'}, None), - MemberSpec_('regions', 'Region', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Region', u'name': u'region', u'minOccurs': u'0'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularPropertiesLocal', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExtracellularPropertiesLocal', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), - MemberSpec_('populations', 'Population', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Population', u'name': u'population'}, None), - MemberSpec_('cell_sets', 'CellSet', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CellSet', u'name': u'cellSet', u'minOccurs': u'0'}, None), - MemberSpec_('synaptic_connections', 'SynapticConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SynapticConnection', u'name': u'synapticConnection', u'minOccurs': u'0'}, None), - MemberSpec_('projections', 'Projection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Projection', u'name': u'projection', u'minOccurs': u'0'}, None), - MemberSpec_('electrical_projections', 'ElectricalProjection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalProjection', u'name': u'electricalProjection', u'minOccurs': u'0'}, None), - MemberSpec_('continuous_projections', 'ContinuousProjection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousProjection', u'name': u'continuousProjection', u'minOccurs': u'0'}, None), - MemberSpec_('explicit_inputs', 'ExplicitInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExplicitInput', u'name': u'explicitInput', u'minOccurs': u'0'}, None), - MemberSpec_('input_lists', 'InputList', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InputList', u'name': u'inputList', u'minOccurs': u'0'}, None), + MemberSpec_('type_', 'networkTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('temperature', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), + MemberSpec_('space', 'Space', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'space', 'type': 'Space'}, None), + MemberSpec_('region', 'Region', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'region', 'type': 'Region'}, None), + MemberSpec_('extracellularProperties', 'ExtracellularPropertiesLocal', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularPropertiesLocal'}, None), + MemberSpec_('population', 'Population', 1, 0, {'maxOccurs': 'unbounded', 'name': 'population', 'type': 'Population'}, None), + MemberSpec_('cellSet', 'CellSet', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cellSet', 'type': 'CellSet'}, None), + MemberSpec_('synapticConnection', 'SynapticConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'synapticConnection', 'type': 'SynapticConnection'}, None), + MemberSpec_('projection', 'Projection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'projection', 'type': 'Projection'}, None), + MemberSpec_('electricalProjection', 'ElectricalProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalProjection', 'type': 'ElectricalProjection'}, None), + MemberSpec_('continuousProjection', 'ContinuousProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousProjection', 'type': 'ContinuousProjection'}, None), + MemberSpec_('explicitInput', 'ExplicitInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'explicitInput', 'type': 'ExplicitInput'}, None), + MemberSpec_('inputList', 'InputList', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputList', 'type': 'InputList'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, type=None, temperature=None, spaces=None, regions=None, extracellular_properties=None, populations=None, cell_sets=None, synaptic_connections=None, projections=None, electrical_projections=None, continuous_projections=None, explicit_inputs=None, input_lists=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, type_=None, temperature=None, space=None, region=None, extracellularProperties=None, population=None, cellSet=None, synapticConnection=None, projection=None, electricalProjection=None, continuousProjection=None, explicitInput=None, inputList=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Network, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.type = _cast(None, type) + self.ns_prefix_ = None + super(Network, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.temperature = _cast(None, temperature) - if spaces is None: - self.spaces = [] - else: - self.spaces = spaces - if regions is None: - self.regions = [] - else: - self.regions = regions - if extracellular_properties is None: - self.extracellular_properties = [] - else: - self.extracellular_properties = extracellular_properties - if populations is None: - self.populations = [] - else: - self.populations = populations - if cell_sets is None: - self.cell_sets = [] - else: - self.cell_sets = cell_sets - if synaptic_connections is None: - self.synaptic_connections = [] - else: - self.synaptic_connections = synaptic_connections - if projections is None: - self.projections = [] - else: - self.projections = projections - if electrical_projections is None: - self.electrical_projections = [] - else: - self.electrical_projections = electrical_projections - if continuous_projections is None: - self.continuous_projections = [] - else: - self.continuous_projections = continuous_projections - if explicit_inputs is None: - self.explicit_inputs = [] - else: - self.explicit_inputs = explicit_inputs - if input_lists is None: - self.input_lists = [] - else: - self.input_lists = input_lists + self.temperature_nsprefix_ = None + if space is None: + self.space = [] + else: + self.space = space + self.space_nsprefix_ = None + if region is None: + self.region = [] + else: + self.region = region + self.region_nsprefix_ = None + if extracellularProperties is None: + self.extracellularProperties = [] + else: + self.extracellularProperties = extracellularProperties + self.extracellularProperties_nsprefix_ = None + if population is None: + self.population = [] + else: + self.population = population + self.population_nsprefix_ = None + if cellSet is None: + self.cellSet = [] + else: + self.cellSet = cellSet + self.cellSet_nsprefix_ = None + if synapticConnection is None: + self.synapticConnection = [] + else: + self.synapticConnection = synapticConnection + self.synapticConnection_nsprefix_ = None + if projection is None: + self.projection = [] + else: + self.projection = projection + self.projection_nsprefix_ = None + if electricalProjection is None: + self.electricalProjection = [] + else: + self.electricalProjection = electricalProjection + self.electricalProjection_nsprefix_ = None + if continuousProjection is None: + self.continuousProjection = [] + else: + self.continuousProjection = continuousProjection + self.continuousProjection_nsprefix_ = None + if explicitInput is None: + self.explicitInput = [] + else: + self.explicitInput = explicitInput + self.explicitInput_nsprefix_ = None + if inputList is None: + self.inputList = [] + else: + self.inputList = inputList + self.inputList_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7829,36 +9119,41 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_networkTypes(self, value): # Validate type networkTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['network', 'networkWithTemperature'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on networkTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on networkTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] def hasContent_(self): if ( - self.spaces or - self.regions or - self.extracellular_properties or - self.populations or - self.cell_sets or - self.synaptic_connections or - self.projections or - self.electrical_projections or - self.continuous_projections or - self.explicit_inputs or - self.input_lists or + self.space or + self.region or + self.extracellularProperties or + self.population or + self.cellSet or + self.synapticConnection or + self.projection or + self.electricalProjection or + self.continuousProjection or + self.explicitInput or + self.inputList or super(Network, self).hasContent_() ): return True @@ -7874,6 +9169,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7887,114 +9184,129 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Network'): super(Network, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Network') - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.temperature is not None and 'temperature' not in already_processed: already_processed.add('temperature') - outfile.write(' temperature=%s' % (quote_attrib(self.temperature), )) + outfile.write(' temperature=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.temperature), input_name='temperature')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Network', fromsubclass_=False, pretty_print=True): - super(Network, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Network, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for space_ in self.spaces: + for space_ in self.space: + namespaceprefix_ = self.space_nsprefix_ + ':' if (UseCapturedNS_ and self.space_nsprefix_) else '' space_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='space', pretty_print=pretty_print) - for region_ in self.regions: + for region_ in self.region: + namespaceprefix_ = self.region_nsprefix_ + ':' if (UseCapturedNS_ and self.region_nsprefix_) else '' region_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='region', pretty_print=pretty_print) - for extracellularProperties_ in self.extracellular_properties: + for extracellularProperties_ in self.extracellularProperties: + namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - for population_ in self.populations: + for population_ in self.population: + namespaceprefix_ = self.population_nsprefix_ + ':' if (UseCapturedNS_ and self.population_nsprefix_) else '' population_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='population', pretty_print=pretty_print) - for cellSet_ in self.cell_sets: + for cellSet_ in self.cellSet: + namespaceprefix_ = self.cellSet_nsprefix_ + ':' if (UseCapturedNS_ and self.cellSet_nsprefix_) else '' cellSet_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cellSet', pretty_print=pretty_print) - for synapticConnection_ in self.synaptic_connections: + for synapticConnection_ in self.synapticConnection: + namespaceprefix_ = self.synapticConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.synapticConnection_nsprefix_) else '' synapticConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='synapticConnection', pretty_print=pretty_print) - for projection_ in self.projections: + for projection_ in self.projection: + namespaceprefix_ = self.projection_nsprefix_ + ':' if (UseCapturedNS_ and self.projection_nsprefix_) else '' projection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='projection', pretty_print=pretty_print) - for electricalProjection_ in self.electrical_projections: + for electricalProjection_ in self.electricalProjection: + namespaceprefix_ = self.electricalProjection_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalProjection_nsprefix_) else '' electricalProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalProjection', pretty_print=pretty_print) - for continuousProjection_ in self.continuous_projections: + for continuousProjection_ in self.continuousProjection: + namespaceprefix_ = self.continuousProjection_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousProjection_nsprefix_) else '' continuousProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousProjection', pretty_print=pretty_print) - for explicitInput_ in self.explicit_inputs: + for explicitInput_ in self.explicitInput: + namespaceprefix_ = self.explicitInput_nsprefix_ + ':' if (UseCapturedNS_ and self.explicitInput_nsprefix_) else '' explicitInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='explicitInput', pretty_print=pretty_print) - for inputList_ in self.input_lists: + for inputList_ in self.inputList: + namespaceprefix_ = self.inputList_nsprefix_ + ':' if (UseCapturedNS_ and self.inputList_nsprefix_) else '' inputList_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputList', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_networkTypes(self.type) # validate type networkTypes + self.type_ = value + self.validate_networkTypes(self.type_) # validate type networkTypes value = find_attr_value_('temperature', node) if value is not None and 'temperature' not in already_processed: already_processed.add('temperature') self.temperature = value self.validate_Nml2Quantity_temperature(self.temperature) # validate type Nml2Quantity_temperature super(Network, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'space': obj_ = Space.factory(parent_object_=self) - obj_.build(child_) - self.spaces.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.space.append(obj_) obj_.original_tagname_ = 'space' elif nodeName_ == 'region': obj_ = Region.factory(parent_object_=self) - obj_.build(child_) - self.regions.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.region.append(obj_) obj_.original_tagname_ = 'region' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularPropertiesLocal.factory(parent_object_=self) - obj_.build(child_) - self.extracellular_properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.extracellularProperties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'population': obj_ = Population.factory(parent_object_=self) - obj_.build(child_) - self.populations.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.population.append(obj_) obj_.original_tagname_ = 'population' elif nodeName_ == 'cellSet': obj_ = CellSet.factory(parent_object_=self) - obj_.build(child_) - self.cell_sets.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.cellSet.append(obj_) obj_.original_tagname_ = 'cellSet' elif nodeName_ == 'synapticConnection': obj_ = SynapticConnection.factory(parent_object_=self) - obj_.build(child_) - self.synaptic_connections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.synapticConnection.append(obj_) obj_.original_tagname_ = 'synapticConnection' elif nodeName_ == 'projection': obj_ = Projection.factory(parent_object_=self) - obj_.build(child_) - self.projections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.projection.append(obj_) obj_.original_tagname_ = 'projection' elif nodeName_ == 'electricalProjection': obj_ = ElectricalProjection.factory(parent_object_=self) - obj_.build(child_) - self.electrical_projections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.electricalProjection.append(obj_) obj_.original_tagname_ = 'electricalProjection' elif nodeName_ == 'continuousProjection': obj_ = ContinuousProjection.factory(parent_object_=self) - obj_.build(child_) - self.continuous_projections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.continuousProjection.append(obj_) obj_.original_tagname_ = 'continuousProjection' elif nodeName_ == 'explicitInput': obj_ = ExplicitInput.factory(parent_object_=self) - obj_.build(child_) - self.explicit_inputs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.explicitInput.append(obj_) obj_.original_tagname_ = 'explicitInput' elif nodeName_ == 'inputList': obj_ = InputList.factory(parent_object_=self) - obj_.build(child_) - self.input_lists.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.inputList.append(obj_) obj_.original_tagname_ = 'inputList' super(Network, self).buildChildren(child_, node, nodeName_, True) @@ -8061,24 +9373,33 @@ def exportHdf5(self, h5file, h5Group): class TransientPoissonFiringSynapse(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, delay=None, duration=None, synapse=None, spike_target=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, delay=None, duration=None, synapse=None, spikeTarget=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(TransientPoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.average_rate = _cast(None, average_rate) + self.ns_prefix_ = None + super(TransientPoissonFiringSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.averageRate = _cast(None, averageRate) + self.averageRate_nsprefix_ = None self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.synapse = _cast(None, synapse) - self.spike_target = _cast(None, spike_target) + self.synapse_nsprefix_ = None + self.spikeTarget = _cast(None, spikeTarget) + self.spikeTarget_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8092,18 +9413,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(TransientPoissonFiringSynapse, self).hasContent_() @@ -8121,6 +9450,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8134,36 +9465,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='TransientPoissonFiringSynapse'): super(TransientPoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TransientPoissonFiringSynapse') - if self.average_rate is not None and 'average_rate' not in already_processed: - already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) + if self.averageRate is not None and 'averageRate' not in already_processed: + already_processed.add('averageRate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) - if self.spike_target is not None and 'spike_target' not in already_processed: - already_processed.add('spike_target') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) + if self.spikeTarget is not None and 'spikeTarget' not in already_processed: + already_processed.add('spikeTarget') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TransientPoissonFiringSynapse', fromsubclass_=False, pretty_print=True): - super(TransientPoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(TransientPoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.average_rate = value - self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime + self.averageRate = value + self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: already_processed.add('delay') @@ -8181,29 +9516,36 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spike_target = value + self.spikeTarget = value super(TransientPoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(TransientPoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class TransientPoissonFiringSynapse class PoissonFiringSynapse(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, synapse=None, spike_target=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, synapse=None, spikeTarget=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(PoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.average_rate = _cast(None, average_rate) + self.ns_prefix_ = None + super(PoissonFiringSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.averageRate = _cast(None, averageRate) + self.averageRate_nsprefix_ = None self.synapse = _cast(None, synapse) - self.spike_target = _cast(None, spike_target) + self.synapse_nsprefix_ = None + self.spikeTarget = _cast(None, spikeTarget) + self.spikeTarget_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8217,11 +9559,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def hasContent_(self): if ( super(PoissonFiringSynapse, self).hasContent_() @@ -8239,6 +9585,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8252,30 +9600,34 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PoissonFiringSynapse'): super(PoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PoissonFiringSynapse') - if self.average_rate is not None and 'average_rate' not in already_processed: - already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) + if self.averageRate is not None and 'averageRate' not in already_processed: + already_processed.add('averageRate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) - if self.spike_target is not None and 'spike_target' not in already_processed: - already_processed.add('spike_target') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) + if self.spikeTarget is not None and 'spikeTarget' not in already_processed: + already_processed.add('spikeTarget') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PoissonFiringSynapse', fromsubclass_=False, pretty_print=True): - super(PoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(PoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.average_rate = value - self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime + self.averageRate = value + self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime value = find_attr_value_('synapse', node) if value is not None and 'synapse' not in already_processed: already_processed.add('synapse') @@ -8283,25 +9635,30 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spike_target = value + self.spikeTarget = value super(PoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(PoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class PoissonFiringSynapse class SpikeGeneratorPoisson(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeGeneratorPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) - self.average_rate = _cast(None, average_rate) + self.ns_prefix_ = None + super(SpikeGeneratorPoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + self.averageRate = _cast(None, averageRate) + self.averageRate_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8316,11 +9673,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def hasContent_(self): if ( super(SpikeGeneratorPoisson, self).hasContent_() @@ -8338,6 +9699,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8351,52 +9714,66 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorPoisson'): super(SpikeGeneratorPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorPoisson') - if self.average_rate is not None and 'average_rate' not in already_processed: - already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) + if self.averageRate is not None and 'averageRate' not in already_processed: + already_processed.add('averageRate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorPoisson', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorPoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SpikeGeneratorPoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.average_rate = value - self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime + self.averageRate = value + self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(SpikeGeneratorPoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGeneratorPoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorPoisson class SpikeGeneratorRandom(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('max_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('min_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('maxISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('minISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, max_isi=None, min_isi=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, maxISI=None, minISI=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeGeneratorRandom, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.max_isi = _cast(None, max_isi) - self.min_isi = _cast(None, min_isi) + self.ns_prefix_ = None + super(SpikeGeneratorRandom, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.maxISI = _cast(None, maxISI) + self.maxISI_nsprefix_ = None + self.minISI = _cast(None, minISI) + self.minISI_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8410,11 +9787,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(SpikeGeneratorRandom, self).hasContent_() @@ -8432,6 +9813,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8445,50 +9828,59 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorRandom'): super(SpikeGeneratorRandom, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRandom') - if self.max_isi is not None and 'max_isi' not in already_processed: - already_processed.add('max_isi') - outfile.write(' maxISI=%s' % (quote_attrib(self.max_isi), )) - if self.min_isi is not None and 'min_isi' not in already_processed: - already_processed.add('min_isi') - outfile.write(' minISI=%s' % (quote_attrib(self.min_isi), )) + if self.maxISI is not None and 'maxISI' not in already_processed: + already_processed.add('maxISI') + outfile.write(' maxISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.maxISI), input_name='maxISI')), )) + if self.minISI is not None and 'minISI' not in already_processed: + already_processed.add('minISI') + outfile.write(' minISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minISI), input_name='minISI')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRandom', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorRandom, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SpikeGeneratorRandom, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('maxISI', node) if value is not None and 'maxISI' not in already_processed: already_processed.add('maxISI') - self.max_isi = value - self.validate_Nml2Quantity_time(self.max_isi) # validate type Nml2Quantity_time + self.maxISI = value + self.validate_Nml2Quantity_time(self.maxISI) # validate type Nml2Quantity_time value = find_attr_value_('minISI', node) if value is not None and 'minISI' not in already_processed: already_processed.add('minISI') - self.min_isi = value - self.validate_Nml2Quantity_time(self.min_isi) # validate type Nml2Quantity_time + self.minISI = value + self.validate_Nml2Quantity_time(self.minISI) # validate type Nml2Quantity_time super(SpikeGeneratorRandom, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGeneratorRandom, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorRandom class SpikeGenerator(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, period=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, period=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(SpikeGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.period = _cast(None, period) + self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8502,11 +9894,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(SpikeGenerator, self).hasContent_() @@ -8524,6 +9920,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8539,15 +9937,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGenerator') if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (quote_attrib(self.period), )) + outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGenerator', fromsubclass_=False, pretty_print=True): - super(SpikeGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SpikeGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('period', node) @@ -8556,30 +9958,37 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SpikeGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGenerator class TimedSynapticInput(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('spikes', 'Spike', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Spike', u'name': u'spike', u'minOccurs': u'0'}, None), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spike', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse=None, spike_target=None, spikes=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, synapse=None, spikeTarget=None, spike=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(TimedSynapticInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(TimedSynapticInput, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.synapse = _cast(None, synapse) - self.spike_target = _cast(None, spike_target) - if spikes is None: - self.spikes = [] - else: - self.spikes = spikes + self.synapse_nsprefix_ = None + self.spikeTarget = _cast(None, spikeTarget) + self.spikeTarget_nsprefix_ = None + if spike is None: + self.spike = [] + else: + self.spike = spike + self.spike_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8593,14 +10002,18 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.spikes or + self.spike or super(TimedSynapticInput, self).hasContent_() ): return True @@ -8616,6 +10029,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8631,24 +10046,29 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(TimedSynapticInput, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TimedSynapticInput') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) - if self.spike_target is not None and 'spike_target' not in already_processed: - already_processed.add('spike_target') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) + outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) + if self.spikeTarget is not None and 'spikeTarget' not in already_processed: + already_processed.add('spikeTarget') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TimedSynapticInput', fromsubclass_=False, pretty_print=True): - super(TimedSynapticInput, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(TimedSynapticInput, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for spike_ in self.spikes: + for spike_ in self.spike: + namespaceprefix_ = self.spike_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -8659,32 +10079,37 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spike_target = value + self.spikeTarget = value super(TimedSynapticInput, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) - obj_.build(child_) - self.spikes.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spike.append(obj_) obj_.original_tagname_ = 'spike' super(TimedSynapticInput, self).buildChildren(child_, node, nodeName_, True) # end class TimedSynapticInput class SpikeArray(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spikes', 'Spike', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Spike', u'name': u'spike', u'minOccurs': u'0'}, None), + MemberSpec_('spike', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, spikes=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, spike=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeArray, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - if spikes is None: - self.spikes = [] + self.ns_prefix_ = None + super(SpikeArray, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + if spike is None: + self.spike = [] else: - self.spikes = spikes + self.spike = spike + self.spike_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8698,7 +10123,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.spikes or + self.spike or super(SpikeArray, self).hasContent_() ): return True @@ -8714,6 +10139,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8728,43 +10155,53 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeArray'): super(SpikeArray, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeArray') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeArray', fromsubclass_=False, pretty_print=True): - super(SpikeArray, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(SpikeArray, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for spike_ in self.spikes: + for spike_ in self.spike: + namespaceprefix_ = self.spike_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(SpikeArray, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) - obj_.build(child_) - self.spikes.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spike.append(obj_) obj_.original_tagname_ = 'spike' super(SpikeArray, self).buildChildren(child_, node, nodeName_, True) # end class SpikeArray class Spike(BaseNonNegativeIntegerId): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('time', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('time', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, time=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, time=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Spike, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(Spike, self).__init__(neuroLexId, id, **kwargs_) self.time = _cast(None, time) + self.time_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8778,11 +10215,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(Spike, self).hasContent_() @@ -8800,6 +10241,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8814,16 +10257,20 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Spike, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Spike') if self.time is not None and 'time' not in already_processed: already_processed.add('time') - outfile.write(' time=%s' % (quote_attrib(self.time), )) + outfile.write(' time=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.time), input_name='time')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Spike', fromsubclass_=False, pretty_print=True): - super(Spike, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Spike, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('time', node) @@ -8832,35 +10279,46 @@ def buildAttributes(self, node, attrs, already_processed): self.time = value self.validate_Nml2Quantity_time(self.time) # validate type Nml2Quantity_time super(Spike, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Spike, self).buildChildren(child_, node, nodeName_, True) pass # end class Spike class VoltageClampTriple(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('active', 'ZeroOrOne', 0, 0, {'use': u'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('conditioning_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('testing_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('return_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': u'required'}), + MemberSpec_('active', 'ZeroOrOne', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('conditioningVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('testingVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('returnVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('simpleSeriesResistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, active=None, delay=None, duration=None, conditioning_voltage=None, testing_voltage=None, return_voltage=None, simple_series_resistance=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, active=None, delay=None, duration=None, conditioningVoltage=None, testingVoltage=None, returnVoltage=None, simpleSeriesResistance=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(VoltageClampTriple, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(VoltageClampTriple, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.active = _cast(float, active) + self.active_nsprefix_ = None self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.conditioning_voltage = _cast(None, conditioning_voltage) - self.testing_voltage = _cast(None, testing_voltage) - self.return_voltage = _cast(None, return_voltage) - self.simple_series_resistance = _cast(None, simple_series_resistance) + self.duration_nsprefix_ = None + self.conditioningVoltage = _cast(None, conditioningVoltage) + self.conditioningVoltage_nsprefix_ = None + self.testingVoltage = _cast(None, testingVoltage) + self.testingVoltage_nsprefix_ = None + self.returnVoltage = _cast(None, returnVoltage) + self.returnVoltage_nsprefix_ = None + self.simpleSeriesResistance = _cast(None, simpleSeriesResistance) + self.simpleSeriesResistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8874,37 +10332,50 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_ZeroOrOne(self, value): # Validate type ZeroOrOne, a restriction on xs:double. - if value is not None and Validate_simpletypes_: - value = str(value) - enumerations = ['0', '1'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on ZeroOrOne' % {"value" : value.encode("utf-8")} ) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False + value = value + enumerations = [0.0, 1.0] + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ZeroOrOne' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_resistance(self, value): # Validate type Nml2Quantity_resistance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_resistance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_resistance_patterns_, )) - validate_Nml2Quantity_resistance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_resistance_patterns_, )) + validate_Nml2Quantity_resistance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm))$']] def hasContent_(self): if ( super(VoltageClampTriple, self).hasContent_() @@ -8922,6 +10393,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8937,42 +10410,44 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(VoltageClampTriple, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='VoltageClampTriple') if self.active is not None and 'active' not in already_processed: already_processed.add('active') - outfile.write(' active=%s' % (quote_attrib(self.active), )) + outfile.write(' active="%s"' % self.gds_format_double(self.active, input_name='active')) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) - if self.conditioning_voltage is not None and 'conditioning_voltage' not in already_processed: - already_processed.add('conditioning_voltage') - outfile.write(' conditioningVoltage=%s' % (quote_attrib(self.conditioning_voltage), )) - if self.testing_voltage is not None and 'testing_voltage' not in already_processed: - already_processed.add('testing_voltage') - outfile.write(' testingVoltage=%s' % (quote_attrib(self.testing_voltage), )) - if self.return_voltage is not None and 'return_voltage' not in already_processed: - already_processed.add('return_voltage') - outfile.write(' returnVoltage=%s' % (quote_attrib(self.return_voltage), )) - if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: - already_processed.add('simple_series_resistance') - outfile.write(' simpleSeriesResistance=%s' % (quote_attrib(self.simple_series_resistance), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + if self.conditioningVoltage is not None and 'conditioningVoltage' not in already_processed: + already_processed.add('conditioningVoltage') + outfile.write(' conditioningVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conditioningVoltage), input_name='conditioningVoltage')), )) + if self.testingVoltage is not None and 'testingVoltage' not in already_processed: + already_processed.add('testingVoltage') + outfile.write(' testingVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.testingVoltage), input_name='testingVoltage')), )) + if self.returnVoltage is not None and 'returnVoltage' not in already_processed: + already_processed.add('returnVoltage') + outfile.write(' returnVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.returnVoltage), input_name='returnVoltage')), )) + if self.simpleSeriesResistance is not None and 'simpleSeriesResistance' not in already_processed: + already_processed.add('simpleSeriesResistance') + outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simpleSeriesResistance), input_name='simpleSeriesResistance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClampTriple', fromsubclass_=False, pretty_print=True): - super(VoltageClampTriple, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(VoltageClampTriple, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('active', node) if value is not None and 'active' not in already_processed: already_processed.add('active') - try: - self.active = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (active): %s' % exp) + value = self.gds_parse_double(value, node, 'active') + self.active = value self.validate_ZeroOrOne(self.active) # validate type ZeroOrOne value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: @@ -8987,47 +10462,55 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conditioningVoltage', node) if value is not None and 'conditioningVoltage' not in already_processed: already_processed.add('conditioningVoltage') - self.conditioning_voltage = value - self.validate_Nml2Quantity_voltage(self.conditioning_voltage) # validate type Nml2Quantity_voltage + self.conditioningVoltage = value + self.validate_Nml2Quantity_voltage(self.conditioningVoltage) # validate type Nml2Quantity_voltage value = find_attr_value_('testingVoltage', node) if value is not None and 'testingVoltage' not in already_processed: already_processed.add('testingVoltage') - self.testing_voltage = value - self.validate_Nml2Quantity_voltage(self.testing_voltage) # validate type Nml2Quantity_voltage + self.testingVoltage = value + self.validate_Nml2Quantity_voltage(self.testingVoltage) # validate type Nml2Quantity_voltage value = find_attr_value_('returnVoltage', node) if value is not None and 'returnVoltage' not in already_processed: already_processed.add('returnVoltage') - self.return_voltage = value - self.validate_Nml2Quantity_voltage(self.return_voltage) # validate type Nml2Quantity_voltage + self.returnVoltage = value + self.validate_Nml2Quantity_voltage(self.returnVoltage) # validate type Nml2Quantity_voltage value = find_attr_value_('simpleSeriesResistance', node) if value is not None and 'simpleSeriesResistance' not in already_processed: already_processed.add('simpleSeriesResistance') - self.simple_series_resistance = value - self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance + self.simpleSeriesResistance = value + self.validate_Nml2Quantity_resistance(self.simpleSeriesResistance) # validate type Nml2Quantity_resistance super(VoltageClampTriple, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(VoltageClampTriple, self).buildChildren(child_, node, nodeName_, True) pass # end class VoltageClampTriple class VoltageClamp(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('target_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('targetVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('simpleSeriesResistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, target_voltage=None, simple_series_resistance=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, targetVoltage=None, simpleSeriesResistance=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(VoltageClamp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(VoltageClamp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.target_voltage = _cast(None, target_voltage) - self.simple_series_resistance = _cast(None, simple_series_resistance) + self.duration_nsprefix_ = None + self.targetVoltage = _cast(None, targetVoltage) + self.targetVoltage_nsprefix_ = None + self.simpleSeriesResistance = _cast(None, simpleSeriesResistance) + self.simpleSeriesResistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9041,25 +10524,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_resistance(self, value): # Validate type Nml2Quantity_resistance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_resistance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_resistance_patterns_, )) - validate_Nml2Quantity_resistance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_resistance_patterns_, )) + validate_Nml2Quantity_resistance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm))$']] def hasContent_(self): if ( super(VoltageClamp, self).hasContent_() @@ -9077,6 +10572,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9092,24 +10589,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(VoltageClamp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='VoltageClamp') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) - if self.target_voltage is not None and 'target_voltage' not in already_processed: - already_processed.add('target_voltage') - outfile.write(' targetVoltage=%s' % (quote_attrib(self.target_voltage), )) - if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: - already_processed.add('simple_series_resistance') - outfile.write(' simpleSeriesResistance=%s' % (quote_attrib(self.simple_series_resistance), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + if self.targetVoltage is not None and 'targetVoltage' not in already_processed: + already_processed.add('targetVoltage') + outfile.write(' targetVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.targetVoltage), input_name='targetVoltage')), )) + if self.simpleSeriesResistance is not None and 'simpleSeriesResistance' not in already_processed: + already_processed.add('simpleSeriesResistance') + outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simpleSeriesResistance), input_name='simpleSeriesResistance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClamp', fromsubclass_=False, pretty_print=True): - super(VoltageClamp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(VoltageClamp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9125,44 +10626,51 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('targetVoltage', node) if value is not None and 'targetVoltage' not in already_processed: already_processed.add('targetVoltage') - self.target_voltage = value - self.validate_Nml2Quantity_voltage(self.target_voltage) # validate type Nml2Quantity_voltage + self.targetVoltage = value + self.validate_Nml2Quantity_voltage(self.targetVoltage) # validate type Nml2Quantity_voltage value = find_attr_value_('simpleSeriesResistance', node) if value is not None and 'simpleSeriesResistance' not in already_processed: already_processed.add('simpleSeriesResistance') - self.simple_series_resistance = value - self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance + self.simpleSeriesResistance = value + self.validate_Nml2Quantity_resistance(self.simpleSeriesResistance) # validate type Nml2Quantity_resistance super(VoltageClamp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(VoltageClamp, self).buildChildren(child_, node, nodeName_, True) pass # end class VoltageClamp class CompoundInputDL(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGeneratorDL', u'name': u'pulseGeneratorDL', u'minOccurs': u'0'}, None), - MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGeneratorDL', u'name': u'sineGeneratorDL', u'minOccurs': u'0'}, None), - MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGeneratorDL', u'name': u'rampGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('pulseGeneratorDL', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), + MemberSpec_('sineGeneratorDL', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), + MemberSpec_('rampGeneratorDL', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generator_dls=None, sine_generator_dls=None, ramp_generator_dls=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, pulseGeneratorDL=None, sineGeneratorDL=None, rampGeneratorDL=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(CompoundInputDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - if pulse_generator_dls is None: - self.pulse_generator_dls = [] - else: - self.pulse_generator_dls = pulse_generator_dls - if sine_generator_dls is None: - self.sine_generator_dls = [] - else: - self.sine_generator_dls = sine_generator_dls - if ramp_generator_dls is None: - self.ramp_generator_dls = [] - else: - self.ramp_generator_dls = ramp_generator_dls + self.ns_prefix_ = None + super(CompoundInputDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + if pulseGeneratorDL is None: + self.pulseGeneratorDL = [] + else: + self.pulseGeneratorDL = pulseGeneratorDL + self.pulseGeneratorDL_nsprefix_ = None + if sineGeneratorDL is None: + self.sineGeneratorDL = [] + else: + self.sineGeneratorDL = sineGeneratorDL + self.sineGeneratorDL_nsprefix_ = None + if rampGeneratorDL is None: + self.rampGeneratorDL = [] + else: + self.rampGeneratorDL = rampGeneratorDL + self.rampGeneratorDL_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9176,9 +10684,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.pulse_generator_dls or - self.sine_generator_dls or - self.ramp_generator_dls or + self.pulseGeneratorDL or + self.sineGeneratorDL or + self.rampGeneratorDL or super(CompoundInputDL, self).hasContent_() ): return True @@ -9194,6 +10702,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9208,70 +10718,84 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CompoundInputDL'): super(CompoundInputDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CompoundInputDL') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundInputDL', fromsubclass_=False, pretty_print=True): - super(CompoundInputDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(CompoundInputDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for pulseGeneratorDL_ in self.pulse_generator_dls: + for pulseGeneratorDL_ in self.pulseGeneratorDL: + namespaceprefix_ = self.pulseGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGeneratorDL_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) - for sineGeneratorDL_ in self.sine_generator_dls: + for sineGeneratorDL_ in self.sineGeneratorDL: + namespaceprefix_ = self.sineGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGeneratorDL_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) - for rampGeneratorDL_ in self.ramp_generator_dls: + for rampGeneratorDL_ in self.rampGeneratorDL: + namespaceprefix_ = self.rampGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGeneratorDL_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(CompoundInputDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.pulse_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.pulseGeneratorDL.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.sine_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.sineGeneratorDL.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.ramp_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.rampGeneratorDL.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' super(CompoundInputDL, self).buildChildren(child_, node, nodeName_, True) # end class CompoundInputDL class CompoundInput(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGenerator', u'name': u'pulseGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGenerator', u'name': u'sineGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGenerator', u'name': u'rampGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('pulseGenerator', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), + MemberSpec_('sineGenerator', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), + MemberSpec_('rampGenerator', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generators=None, sine_generators=None, ramp_generators=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, pulseGenerator=None, sineGenerator=None, rampGenerator=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(CompoundInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - if pulse_generators is None: - self.pulse_generators = [] - else: - self.pulse_generators = pulse_generators - if sine_generators is None: - self.sine_generators = [] - else: - self.sine_generators = sine_generators - if ramp_generators is None: - self.ramp_generators = [] - else: - self.ramp_generators = ramp_generators + self.ns_prefix_ = None + super(CompoundInput, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + if pulseGenerator is None: + self.pulseGenerator = [] + else: + self.pulseGenerator = pulseGenerator + self.pulseGenerator_nsprefix_ = None + if sineGenerator is None: + self.sineGenerator = [] + else: + self.sineGenerator = sineGenerator + self.sineGenerator_nsprefix_ = None + if rampGenerator is None: + self.rampGenerator = [] + else: + self.rampGenerator = rampGenerator + self.rampGenerator_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9285,9 +10809,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.pulse_generators or - self.sine_generators or - self.ramp_generators or + self.pulseGenerator or + self.sineGenerator or + self.rampGenerator or super(CompoundInput, self).hasContent_() ): return True @@ -9303,6 +10827,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9317,65 +10843,81 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CompoundInput'): super(CompoundInput, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CompoundInput') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundInput', fromsubclass_=False, pretty_print=True): - super(CompoundInput, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(CompoundInput, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for pulseGenerator_ in self.pulse_generators: + for pulseGenerator_ in self.pulseGenerator: + namespaceprefix_ = self.pulseGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGenerator_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) - for sineGenerator_ in self.sine_generators: + for sineGenerator_ in self.sineGenerator: + namespaceprefix_ = self.sineGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGenerator_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) - for rampGenerator_ in self.ramp_generators: + for rampGenerator_ in self.rampGenerator: + namespaceprefix_ = self.rampGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGenerator_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(CompoundInput, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) - obj_.build(child_) - self.pulse_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.pulseGenerator.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) - obj_.build(child_) - self.sine_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.sineGenerator.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) - obj_.build(child_) - self.ramp_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.rampGenerator.append(obj_) obj_.original_tagname_ = 'rampGenerator' super(CompoundInput, self).buildChildren(child_, node, nodeName_, True) # end class CompoundInput class RampGeneratorDL(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('start_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('finish_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('baseline_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('startAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('finishAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('baselineAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, startAmplitude=None, finishAmplitude=None, baselineAmplitude=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(RampGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(RampGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.start_amplitude = _cast(None, start_amplitude) - self.finish_amplitude = _cast(None, finish_amplitude) - self.baseline_amplitude = _cast(None, baseline_amplitude) + self.duration_nsprefix_ = None + self.startAmplitude = _cast(None, startAmplitude) + self.startAmplitude_nsprefix_ = None + self.finishAmplitude = _cast(None, finishAmplitude) + self.finishAmplitude_nsprefix_ = None + self.baselineAmplitude = _cast(None, baselineAmplitude) + self.baselineAmplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9389,18 +10931,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(RampGeneratorDL, self).hasContent_() @@ -9418,6 +10968,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9433,27 +10985,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(RampGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RampGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) - if self.start_amplitude is not None and 'start_amplitude' not in already_processed: - already_processed.add('start_amplitude') - outfile.write(' startAmplitude=%s' % (quote_attrib(self.start_amplitude), )) - if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: - already_processed.add('finish_amplitude') - outfile.write(' finishAmplitude=%s' % (quote_attrib(self.finish_amplitude), )) - if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: - already_processed.add('baseline_amplitude') - outfile.write(' baselineAmplitude=%s' % (quote_attrib(self.baseline_amplitude), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + if self.startAmplitude is not None and 'startAmplitude' not in already_processed: + already_processed.add('startAmplitude') + outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.startAmplitude), input_name='startAmplitude')), )) + if self.finishAmplitude is not None and 'finishAmplitude' not in already_processed: + already_processed.add('finishAmplitude') + outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finishAmplitude), input_name='finishAmplitude')), )) + if self.baselineAmplitude is not None and 'baselineAmplitude' not in already_processed: + already_processed.add('baselineAmplitude') + outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baselineAmplitude), input_name='baselineAmplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGeneratorDL', fromsubclass_=False, pretty_print=True): - super(RampGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(RampGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9469,44 +11025,53 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('startAmplitude', node) if value is not None and 'startAmplitude' not in already_processed: already_processed.add('startAmplitude') - self.start_amplitude = value - self.validate_Nml2Quantity_none(self.start_amplitude) # validate type Nml2Quantity_none + self.startAmplitude = value + self.validate_Nml2Quantity_none(self.startAmplitude) # validate type Nml2Quantity_none value = find_attr_value_('finishAmplitude', node) if value is not None and 'finishAmplitude' not in already_processed: already_processed.add('finishAmplitude') - self.finish_amplitude = value - self.validate_Nml2Quantity_none(self.finish_amplitude) # validate type Nml2Quantity_none + self.finishAmplitude = value + self.validate_Nml2Quantity_none(self.finishAmplitude) # validate type Nml2Quantity_none value = find_attr_value_('baselineAmplitude', node) if value is not None and 'baselineAmplitude' not in already_processed: already_processed.add('baselineAmplitude') - self.baseline_amplitude = value - self.validate_Nml2Quantity_none(self.baseline_amplitude) # validate type Nml2Quantity_none + self.baselineAmplitude = value + self.validate_Nml2Quantity_none(self.baselineAmplitude) # validate type Nml2Quantity_none super(RampGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(RampGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class RampGeneratorDL class RampGenerator(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('start_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), - MemberSpec_('finish_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), - MemberSpec_('baseline_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('startAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('finishAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('baselineAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, startAmplitude=None, finishAmplitude=None, baselineAmplitude=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(RampGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(RampGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.start_amplitude = _cast(None, start_amplitude) - self.finish_amplitude = _cast(None, finish_amplitude) - self.baseline_amplitude = _cast(None, baseline_amplitude) + self.duration_nsprefix_ = None + self.startAmplitude = _cast(None, startAmplitude) + self.startAmplitude_nsprefix_ = None + self.finishAmplitude = _cast(None, finishAmplitude) + self.finishAmplitude_nsprefix_ = None + self.baselineAmplitude = _cast(None, baselineAmplitude) + self.baselineAmplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9520,18 +11085,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(RampGenerator, self).hasContent_() @@ -9549,6 +11122,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9564,27 +11139,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(RampGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RampGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) - if self.start_amplitude is not None and 'start_amplitude' not in already_processed: - already_processed.add('start_amplitude') - outfile.write(' startAmplitude=%s' % (quote_attrib(self.start_amplitude), )) - if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: - already_processed.add('finish_amplitude') - outfile.write(' finishAmplitude=%s' % (quote_attrib(self.finish_amplitude), )) - if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: - already_processed.add('baseline_amplitude') - outfile.write(' baselineAmplitude=%s' % (quote_attrib(self.baseline_amplitude), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + if self.startAmplitude is not None and 'startAmplitude' not in already_processed: + already_processed.add('startAmplitude') + outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.startAmplitude), input_name='startAmplitude')), )) + if self.finishAmplitude is not None and 'finishAmplitude' not in already_processed: + already_processed.add('finishAmplitude') + outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finishAmplitude), input_name='finishAmplitude')), )) + if self.baselineAmplitude is not None and 'baselineAmplitude' not in already_processed: + already_processed.add('baselineAmplitude') + outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baselineAmplitude), input_name='baselineAmplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGenerator', fromsubclass_=False, pretty_print=True): - super(RampGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(RampGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9600,44 +11179,53 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('startAmplitude', node) if value is not None and 'startAmplitude' not in already_processed: already_processed.add('startAmplitude') - self.start_amplitude = value - self.validate_Nml2Quantity_current(self.start_amplitude) # validate type Nml2Quantity_current + self.startAmplitude = value + self.validate_Nml2Quantity_current(self.startAmplitude) # validate type Nml2Quantity_current value = find_attr_value_('finishAmplitude', node) if value is not None and 'finishAmplitude' not in already_processed: already_processed.add('finishAmplitude') - self.finish_amplitude = value - self.validate_Nml2Quantity_current(self.finish_amplitude) # validate type Nml2Quantity_current + self.finishAmplitude = value + self.validate_Nml2Quantity_current(self.finishAmplitude) # validate type Nml2Quantity_current value = find_attr_value_('baselineAmplitude', node) if value is not None and 'baselineAmplitude' not in already_processed: already_processed.add('baselineAmplitude') - self.baseline_amplitude = value - self.validate_Nml2Quantity_current(self.baseline_amplitude) # validate type Nml2Quantity_current + self.baselineAmplitude = value + self.validate_Nml2Quantity_current(self.baselineAmplitude) # validate type Nml2Quantity_current super(RampGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(RampGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class RampGenerator class SineGeneratorDL(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SineGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(SineGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.phase = _cast(None, phase) + self.phase_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) + self.amplitude_nsprefix_ = None self.period = _cast(None, period) + self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9651,18 +11239,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(SineGeneratorDL, self).hasContent_() @@ -9680,6 +11276,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9695,27 +11293,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SineGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SineGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.phase is not None and 'phase' not in already_processed: already_processed.add('phase') - outfile.write(' phase=%s' % (quote_attrib(self.phase), )) + outfile.write(' phase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phase), input_name='phase')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) + outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (quote_attrib(self.period), )) + outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SineGeneratorDL', fromsubclass_=False, pretty_print=True): - super(SineGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SineGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9744,31 +11346,40 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SineGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SineGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class SineGeneratorDL class SineGenerator(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SineGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(SineGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.phase = _cast(None, phase) + self.phase_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) + self.amplitude_nsprefix_ = None self.period = _cast(None, period) + self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9782,25 +11393,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(SineGenerator, self).hasContent_() @@ -9818,6 +11441,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9833,27 +11458,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SineGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SineGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.phase is not None and 'phase' not in already_processed: already_processed.add('phase') - outfile.write(' phase=%s' % (quote_attrib(self.phase), )) + outfile.write(' phase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phase), input_name='phase')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) + outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (quote_attrib(self.period), )) + outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SineGenerator', fromsubclass_=False, pretty_print=True): - super(SineGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SineGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9882,7 +11511,7 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SineGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SineGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class SineGenerator @@ -9891,20 +11520,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class PulseGeneratorDL(Standalone): """Generates a constant current pulse of a certain amplitude (non dimensional) for a specified duration after a delay.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(PulseGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(PulseGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) + self.amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9918,18 +11554,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(PulseGeneratorDL, self).hasContent_() @@ -9947,6 +11591,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9962,21 +11608,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PulseGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PulseGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) + outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PulseGeneratorDL', fromsubclass_=False, pretty_print=True): - super(PulseGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(PulseGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -9995,7 +11645,7 @@ def buildAttributes(self, node, attrs, already_processed): self.amplitude = value self.validate_Nml2Quantity_none(self.amplitude) # validate type Nml2Quantity_none super(PulseGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(PulseGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class PulseGeneratorDL @@ -10004,20 +11654,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class PulseGenerator(Standalone): """Generates a constant current pulse of a certain amplitude (with dimensions for current) for a specified duration after a delay.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(PulseGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(PulseGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.delay = _cast(None, delay) + self.delay_nsprefix_ = None self.duration = _cast(None, duration) + self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) + self.amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10031,18 +11688,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(PulseGenerator, self).hasContent_() @@ -10060,6 +11725,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10075,21 +11742,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PulseGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PulseGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (quote_attrib(self.duration), )) + outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) + outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PulseGenerator', fromsubclass_=False, pretty_print=True): - super(PulseGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(PulseGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -10108,26 +11779,32 @@ def buildAttributes(self, node, attrs, already_processed): self.amplitude = value self.validate_Nml2Quantity_current(self.amplitude) # validate type Nml2Quantity_current super(PulseGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(PulseGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class PulseGenerator class ReactionScheme(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('source', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('source', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, source=None, type=None, anytypeobjs_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, source=None, type_=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ReactionScheme, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(ReactionScheme, self).__init__(neuroLexId, id, **kwargs_) self.source = _cast(None, source) - self.type = _cast(None, type) + self.source_nsprefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -10161,6 +11838,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10177,23 +11856,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.source is not None and 'source' not in already_processed: already_processed.add('source') outfile.write(' source=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.source), input_name='source')), )) - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ReactionScheme', fromsubclass_=False, pretty_print=True): - super(ReactionScheme, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ReactionScheme, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('source', node) @@ -10203,30 +11886,34 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value + self.type_ = value super(ReactionScheme, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'ReactionScheme') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'ReactionScheme') + self.add_anytypeobjs_(content_) super(ReactionScheme, self).buildChildren(child_, node, nodeName_, True) # end class ReactionScheme class ExtracellularProperties(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), + MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, species=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, species=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExtracellularProperties, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(ExtracellularProperties, self).__init__(neuroLexId, id, **kwargs_) if species is None: self.species = [] else: self.species = species + self.species_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10256,6 +11943,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10270,26 +11959,31 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExtracellularProperties'): super(ExtracellularProperties, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExtracellularProperties') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularProperties', fromsubclass_=False, pretty_print=True): - super(ExtracellularProperties, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ExtracellularProperties, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: + namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ExtracellularProperties, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.species.append(obj_) obj_.original_tagname_ = 'species' super(ExtracellularProperties, self).buildChildren(child_, node, nodeName_, True) @@ -10298,32 +11992,42 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityGHK2(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityGHK2, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) - self.cond_density = _cast(None, cond_density) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(None, segments) + self.ns_prefix_ = None + super(ChannelDensityGHK2, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None + self.condDensity = _cast(None, condDensity) + self.condDensity_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(None, segment) + self.segment_nsprefix_ = None self.ion = _cast(None, ion) + self.ion_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10337,18 +12041,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] def hasContent_(self): if ( super(ChannelDensityGHK2, self).hasContent_() @@ -10366,6 +12078,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10378,59 +12092,63 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityGHK2'): super(ChannelDensityGHK2, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK2') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) - if self.cond_density is not None and 'cond_density' not in already_processed: - already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.condDensity is not None and 'condDensity' not in already_processed: + already_processed.add('condDensity') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityGHK2', fromsubclass_=False, pretty_print=True): - super(ChannelDensityGHK2, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityGHK2, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.cond_density = value - self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity + self.condDensity = value + self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = value - self.validate_NmlId(self.segments) # validate type NmlId + self.segment = value + self.validate_NmlId(self.segment) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityGHK2, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ChannelDensityGHK2, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityGHK2 @@ -10438,32 +12156,42 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityGHK(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('permeability', 'Nml2Quantity_permeability', 0, 0, {'use': u'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('permeability', 'Nml2Quantity_permeability', 0, 0, {'use': 'required'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, permeability=None, segment_groups='all', segments=None, ion=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, permeability=None, segmentGroup='all', segment=None, ion=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityGHK, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) + self.ns_prefix_ = None + super(ChannelDensityGHK, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None self.permeability = _cast(None, permeability) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(None, segments) + self.permeability_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(None, segment) + self.segment_nsprefix_ = None self.ion = _cast(None, ion) + self.ion_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10477,18 +12205,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_permeability(self, value): # Validate type Nml2Quantity_permeability, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_permeability_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_permeability_patterns_, )) - validate_Nml2Quantity_permeability_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m_per_s| um_per_ms|cm_per_s|cm_per_ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_permeability_patterns_, )) + validate_Nml2Quantity_permeability_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m_per_s| um_per_ms|cm_per_s|cm_per_ms))$']] def hasContent_(self): if ( super(ChannelDensityGHK, self).hasContent_() @@ -10506,6 +12242,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10518,37 +12256,41 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityGHK'): super(ChannelDensityGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) if self.permeability is not None and 'permeability' not in already_processed: already_processed.add('permeability') - outfile.write(' permeability=%s' % (quote_attrib(self.permeability), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + outfile.write(' permeability=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.permeability), input_name='permeability')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityGHK', fromsubclass_=False, pretty_print=True): - super(ChannelDensityGHK, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityGHK, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('permeability', node) if value is not None and 'permeability' not in already_processed: already_processed.add('permeability') @@ -10557,20 +12299,20 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = value - self.validate_NmlId(self.segments) # validate type NmlId + self.segment = value + self.validate_NmlId(self.segment) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityGHK, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ChannelDensityGHK, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityGHK @@ -10578,37 +12320,48 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityNernst(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityNernst, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) - self.ion_channel = _cast(None, ion_channel) - self.cond_density = _cast(None, cond_density) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(None, segments) + self.ns_prefix_ = None + super(ChannelDensityNernst, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None + self.condDensity = _cast(None, condDensity) + self.condDensity_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(None, segment) + self.segment_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -10623,21 +12376,29 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelDensityNernst, self).hasContent_() ): return True @@ -10653,6 +12414,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10666,61 +12429,70 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNernst'): super(ChannelDensityNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNernst') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) - if self.cond_density is not None and 'cond_density' not in already_processed: - already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.condDensity is not None and 'condDensity' not in already_processed: + already_processed.add('condDensity') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNernst', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNernst, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNernst, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.cond_density = value - self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity + self.condDensity = value + self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = value - self.validate_NmlId(self.segments) # validate type NmlId + self.segment = value + self.validate_NmlId(self.segment) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -10731,11 +12503,11 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ChannelDensityNernst, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNernst, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNernst @@ -10743,39 +12515,51 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensity(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensity, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) - self.ion_channel = _cast(None, ion_channel) - self.cond_density = _cast(None, cond_density) + self.ns_prefix_ = None + super(ChannelDensity, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None + self.condDensity = _cast(None, condDensity) + self.condDensity_nsprefix_ = None self.erev = _cast(None, erev) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(int, segments) + self.erev_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(int, segment) + self.segment_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -10790,32 +12574,48 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelDensity, self).hasContent_() ): return True @@ -10831,6 +12631,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10844,54 +12646,63 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensity'): super(ChannelDensity, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensity') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) - if self.cond_density is not None and 'cond_density' not in already_processed: - already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.condDensity is not None and 'condDensity' not in already_processed: + already_processed.add('condDensity') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensity', fromsubclass_=False, pretty_print=True): - super(ChannelDensity, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensity, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.cond_density = value - self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity + self.condDensity = value + self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('erev', node) if value is not None and 'erev' not in already_processed: already_processed.add('erev') @@ -10900,18 +12711,15 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - try: - self.segments = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segments < 0: + self.segment = self.gds_parse_integer(value, node, 'segment') + if self.segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -10922,11 +12730,11 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ChannelDensity, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensity, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensity @@ -10934,31 +12742,39 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityNonUniformGHK(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityNonUniformGHK, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) + self.ns_prefix_ = None + super(ChannelDensityNonUniformGHK, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10972,14 +12788,18 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelDensityNonUniformGHK, self).hasContent_() ): return True @@ -10995,6 +12815,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11008,44 +12830,49 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniformGHK'): super(ChannelDensityNonUniformGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformGHK') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniformGHK', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniformGHK, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniformGHK, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniformGHK, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformGHK, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniformGHK @@ -11053,31 +12880,39 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityNonUniformNernst(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityNonUniformNernst, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) + self.ns_prefix_ = None + super(ChannelDensityNonUniformNernst, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11091,14 +12926,18 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelDensityNonUniformNernst, self).hasContent_() ): return True @@ -11114,6 +12953,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11127,44 +12968,49 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniformNernst'): super(ChannelDensityNonUniformNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformNernst') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniformNernst', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniformNernst, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniformNernst, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniformNernst, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformNernst, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniformNernst @@ -11172,33 +13018,42 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelDensityNonUniform(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, erev=None, ion=None, variable_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, erev=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityNonUniform, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) + self.ns_prefix_ = None + super(ChannelDensityNonUniform, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None self.erev = _cast(None, erev) + self.erev_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11212,21 +13067,29 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelDensityNonUniform, self).hasContent_() ): return True @@ -11242,6 +13105,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11255,36 +13120,41 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniform'): super(ChannelDensityNonUniform, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniform') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniform', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniform, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniform, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('erev', node) if value is not None and 'erev' not in already_processed: already_processed.add('erev') @@ -11296,11 +13166,11 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniform, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniform, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniform @@ -11308,39 +13178,51 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ChannelPopulation(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here TEMPORARILY since - selecting all ca or na conducting channel populations/densities - in a cell would be difficult otherwise. Also, it will make it - easier to set the correct native simulator value for erev (e.g. - ek for ion = k in NEURON). Currently a required attribute. It - should be removed in the longer term, due to possible - inconsistencies in this value and that in the ionChannel + ionChannel definition. It is added here + TEMPORARILY since selecting all ca or na conducting channel + populations/densities in a cell would be difficult otherwise. + Also, it will make it easier to set the correct native simulator value for + erev (e.g. ek for ion = k in NEURON). + Currently a required attribute. + It should be removed in the longer term, due to possible inconsistencies in + this value and that in the ionChannel element. TODO: remove.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('number', 'NonNegativeInteger', 0, 0, {'use': u'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), + MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('number', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, number=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, number=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelPopulation, self).__init__(neuro_lex_id, id, **kwargs_) - self.ion_channel = _cast(None, ion_channel) + self.ns_prefix_ = None + super(ChannelPopulation, self).__init__(neuroLexId, id, **kwargs_) + self.ionChannel = _cast(None, ionChannel) + self.ionChannel_nsprefix_ = None self.number = _cast(int, number) + self.number_nsprefix_ = None self.erev = _cast(None, erev) - self.segment_groups = _cast(None, segment_groups) - self.segments = _cast(int, segments) + self.erev_nsprefix_ = None + self.segmentGroup = _cast(None, segmentGroup) + self.segmentGroup_nsprefix_ = None + self.segment = _cast(int, segment) + self.segment_nsprefix_ = None self.ion = _cast(None, ion) - if variable_parameters is None: - self.variable_parameters = [] + self.ion_nsprefix_ = None + if variableParameter is None: + self.variableParameter = [] else: - self.variable_parameters = variable_parameters + self.variableParameter = variableParameter + self.variableParameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11354,25 +13236,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( - self.variable_parameters or + self.variableParameter or super(ChannelPopulation, self).hasContent_() ): return True @@ -11388,6 +13282,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11401,52 +13297,54 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelPopulation'): super(ChannelPopulation, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelPopulation') - if self.ion_channel is not None and 'ion_channel' not in already_processed: - already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) + if self.ionChannel is not None and 'ionChannel' not in already_processed: + already_processed.add('ionChannel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) if self.number is not None and 'number' not in already_processed: already_processed.add('number') - outfile.write(' number=%s' % (quote_attrib(self.number), )) + outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) - if self.segment_groups != "all" and 'segment_groups' not in already_processed: - already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) - if self.segments is not None and 'segments' not in already_processed: - already_processed.add('segments') - outfile.write(' segment=%s' % (quote_attrib(self.segments), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: + already_processed.add('segmentGroup') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment is not None and 'segment' not in already_processed: + already_processed.add('segment') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelPopulation', fromsubclass_=False, pretty_print=True): - super(ChannelPopulation, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ChannelPopulation, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variable_parameters: + for variableParameter_ in self.variableParameter: + namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ion_channel = value - self.validate_NmlId(self.ion_channel) # validate type NmlId + self.ionChannel = value + self.validate_NmlId(self.ionChannel) # validate type NmlId value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - try: - self.number = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.number = self.gds_parse_integer(value, node, 'number') if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.number) # validate type NonNegativeInteger @@ -11458,45 +13356,46 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segment_groups = value - self.validate_NmlId(self.segment_groups) # validate type NmlId + self.segmentGroup = value + self.validate_NmlId(self.segmentGroup) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - try: - self.segments = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.segments < 0: + self.segment = self.gds_parse_integer(value, node, 'segment') + if self.segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelPopulation, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_) - self.variable_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.variableParameter.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelPopulation, self).buildChildren(child_, node, nodeName_, True) # end class ChannelPopulation class Resistivity(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate - library generation (e.g. libNeuroML)""" + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library + generation (e.g. libNeuroML)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Resistivity, self).__init__(value, segment_groups, segments, **kwargs_) + self.ns_prefix_ = None + super(Resistivity, self).__init__(value, segmentGroup, segment, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11525,6 +13424,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11538,34 +13439,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Resistivity'): super(Resistivity, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Resistivity') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Resistivity', fromsubclass_=False, pretty_print=True): - super(Resistivity, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Resistivity, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Resistivity, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Resistivity, self).buildChildren(child_, node, nodeName_, True) pass # end class Resistivity class InitMembPotential(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate - library generation (e.g. libNeuroML)""" + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library + generation (e.g. libNeuroML)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(InitMembPotential, self).__init__(value, segment_groups, segments, **kwargs_) + self.ns_prefix_ = None + super(InitMembPotential, self).__init__(value, segmentGroup, segment, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11594,6 +13503,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11607,34 +13518,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InitMembPotential'): super(InitMembPotential, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InitMembPotential') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InitMembPotential', fromsubclass_=False, pretty_print=True): - super(InitMembPotential, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(InitMembPotential, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(InitMembPotential, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(InitMembPotential, self).buildChildren(child_, node, nodeName_, True) pass # end class InitMembPotential class SpecificCapacitance(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate - library generation (e.g. libNeuroML)""" + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library + generation (e.g. libNeuroML)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpecificCapacitance, self).__init__(value, segment_groups, segments, **kwargs_) + self.ns_prefix_ = None + super(SpecificCapacitance, self).__init__(value, segmentGroup, segment, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11663,6 +13582,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11676,34 +13597,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpecificCapacitance'): super(SpecificCapacitance, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpecificCapacitance') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpecificCapacitance', fromsubclass_=False, pretty_print=True): - super(SpecificCapacitance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(SpecificCapacitance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(SpecificCapacitance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpecificCapacitance, self).buildChildren(child_, node, nodeName_, True) pass # end class SpecificCapacitance class SpikeThresh(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate - library generation (e.g. libNeuroML)""" + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library + generation (e.g. libNeuroML)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): + def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeThresh, self).__init__(value, segment_groups, segments, **kwargs_) + self.ns_prefix_ = None + super(SpikeThresh, self).__init__(value, segmentGroup, segment, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11732,6 +13661,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11745,40 +13676,52 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeThresh'): super(SpikeThresh, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeThresh') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeThresh', fromsubclass_=False, pretty_print=True): - super(SpikeThresh, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(SpikeThresh, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(SpikeThresh, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeThresh, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeThresh class BiophysicalProperties2CaPools(Standalone): - """Standalone element which is usually inside a single cell, but could - be outside and referenced by id.""" + """Standalone element which is usually inside a single cell, but could be + outside and + referenced by id.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('membrane_properties2_ca_pools', 'MembraneProperties2CaPools', 0, 0, {u'type': u'MembraneProperties2CaPools', u'name': u'membraneProperties2CaPools'}, None), - MemberSpec_('intracellular_properties2_ca_pools', 'IntracellularProperties2CaPools', 0, 1, {u'type': u'IntracellularProperties2CaPools', u'name': u'intracellularProperties2CaPools', u'minOccurs': u'0'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('membraneProperties2CaPools', 'MembraneProperties2CaPools', 0, 0, {'name': 'membraneProperties2CaPools', 'type': 'MembraneProperties2CaPools'}, None), + MemberSpec_('intracellularProperties2CaPools', 'IntracellularProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties2CaPools', 'type': 'IntracellularProperties2CaPools'}, None), + MemberSpec_('extracellularProperties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties2_ca_pools=None, intracellular_properties2_ca_pools=None, extracellular_properties=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, membraneProperties2CaPools=None, intracellularProperties2CaPools=None, extracellularProperties=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BiophysicalProperties2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.membrane_properties2_ca_pools = membrane_properties2_ca_pools - self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools - self.extracellular_properties = extracellular_properties + self.ns_prefix_ = None + super(BiophysicalProperties2CaPools, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.membraneProperties2CaPools = membraneProperties2CaPools + self.membraneProperties2CaPools_nsprefix_ = None + self.intracellularProperties2CaPools = intracellularProperties2CaPools + self.intracellularProperties2CaPools_nsprefix_ = None + self.extracellularProperties = extracellularProperties + self.extracellularProperties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11792,9 +13735,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.membrane_properties2_ca_pools is not None or - self.intracellular_properties2_ca_pools is not None or - self.extracellular_properties is not None or + self.membraneProperties2CaPools is not None or + self.intracellularProperties2CaPools is not None or + self.extracellularProperties is not None or super(BiophysicalProperties2CaPools, self).hasContent_() ): return True @@ -11810,6 +13753,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11824,63 +13769,78 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BiophysicalProperties2CaPools'): super(BiophysicalProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BiophysicalProperties2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BiophysicalProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(BiophysicalProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BiophysicalProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if self.membrane_properties2_ca_pools is not None: - self.membrane_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties2CaPools', pretty_print=pretty_print) - if self.intracellular_properties2_ca_pools is not None: - self.intracellular_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties2CaPools', pretty_print=pretty_print) - if self.extracellular_properties is not None: - self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.membraneProperties2CaPools is not None: + namespaceprefix_ = self.membraneProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.membraneProperties2CaPools_nsprefix_) else '' + self.membraneProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties2CaPools', pretty_print=pretty_print) + if self.intracellularProperties2CaPools is not None: + namespaceprefix_ = self.intracellularProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties2CaPools_nsprefix_) else '' + self.intracellularProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties2CaPools', pretty_print=pretty_print) + if self.extracellularProperties is not None: + namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' + self.extracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(BiophysicalProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'membraneProperties2CaPools': obj_ = MembraneProperties2CaPools.factory(parent_object_=self) - obj_.build(child_) - self.membrane_properties2_ca_pools = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.membraneProperties2CaPools = obj_ obj_.original_tagname_ = 'membraneProperties2CaPools' elif nodeName_ == 'intracellularProperties2CaPools': obj_ = IntracellularProperties2CaPools.factory(parent_object_=self) - obj_.build(child_) - self.intracellular_properties2_ca_pools = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.intracellularProperties2CaPools = obj_ obj_.original_tagname_ = 'intracellularProperties2CaPools' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_) - self.extracellular_properties = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.extracellularProperties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class BiophysicalProperties2CaPools class BiophysicalProperties(Standalone): - """Standalone element which is usually inside a single cell, but could - be outside and referenced by id.""" + """Standalone element which is usually inside a single cell, but could be + outside and + referenced by id.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('membrane_properties', 'MembraneProperties', 0, 0, {u'type': u'MembraneProperties', u'name': u'membraneProperties'}, None), - MemberSpec_('intracellular_properties', 'IntracellularProperties', 0, 1, {u'type': u'IntracellularProperties', u'name': u'intracellularProperties', u'minOccurs': u'0'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('membraneProperties', 'MembraneProperties', 0, 0, {'name': 'membraneProperties', 'type': 'MembraneProperties'}, None), + MemberSpec_('intracellularProperties', 'IntracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), + MemberSpec_('extracellularProperties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties=None, intracellular_properties=None, extracellular_properties=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, membraneProperties=None, intracellularProperties=None, extracellularProperties=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BiophysicalProperties, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.membrane_properties = membrane_properties - self.intracellular_properties = intracellular_properties - self.extracellular_properties = extracellular_properties + self.ns_prefix_ = None + super(BiophysicalProperties, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.membraneProperties = membraneProperties + self.membraneProperties_nsprefix_ = None + self.intracellularProperties = intracellularProperties + self.intracellularProperties_nsprefix_ = None + self.extracellularProperties = extracellularProperties + self.extracellularProperties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11894,9 +13854,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.membrane_properties is not None or - self.intracellular_properties is not None or - self.extracellular_properties is not None or + self.membraneProperties is not None or + self.intracellularProperties is not None or + self.extracellularProperties is not None or super(BiophysicalProperties, self).hasContent_() ): return True @@ -11912,6 +13872,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11926,65 +13888,80 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BiophysicalProperties'): super(BiophysicalProperties, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BiophysicalProperties') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BiophysicalProperties', fromsubclass_=False, pretty_print=True): - super(BiophysicalProperties, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BiophysicalProperties, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if self.membrane_properties is not None: - self.membrane_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties', pretty_print=pretty_print) - if self.intracellular_properties is not None: - self.intracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) - if self.extracellular_properties is not None: - self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.membraneProperties is not None: + namespaceprefix_ = self.membraneProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.membraneProperties_nsprefix_) else '' + self.membraneProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties', pretty_print=pretty_print) + if self.intracellularProperties is not None: + namespaceprefix_ = self.intracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties_nsprefix_) else '' + self.intracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) + if self.extracellularProperties is not None: + namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' + self.extracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(BiophysicalProperties, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'membraneProperties': class_obj_ = self.get_class_obj_(child_, MembraneProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.membrane_properties = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.membraneProperties = obj_ obj_.original_tagname_ = 'membraneProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.intracellular_properties = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.intracellularProperties = obj_ obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_) - self.extracellular_properties = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.extracellularProperties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties, self).buildChildren(child_, node, nodeName_, True) # end class BiophysicalProperties class InhomogeneousParameter(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('variable', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('metric', 'Metric', 0, 0, {'use': u'required'}), - MemberSpec_('proximal', 'ProximalDetails', 0, 1, {u'type': u'ProximalDetails', u'name': u'proximal', u'minOccurs': u'0'}, None), - MemberSpec_('distal', 'DistalDetails', 0, 1, {u'type': u'DistalDetails', u'name': u'distal', u'minOccurs': u'0'}, None), + MemberSpec_('variable', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('metric', 'Metric', 0, 0, {'use': 'required'}), + MemberSpec_('proximal', 'ProximalDetails', 0, 1, {'minOccurs': '0', 'name': 'proximal', 'type': 'ProximalDetails'}, None), + MemberSpec_('distal', 'DistalDetails', 0, 1, {'minOccurs': '0', 'name': 'distal', 'type': 'DistalDetails'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, variable=None, metric=None, proximal=None, distal=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, variable=None, metric=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(InhomogeneousParameter, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(InhomogeneousParameter, self).__init__(neuroLexId, id, **kwargs_) self.variable = _cast(None, variable) + self.variable_nsprefix_ = None self.metric = _cast(None, metric) + self.metric_nsprefix_ = None self.proximal = proximal + self.proximal_nsprefix_ = None self.distal = distal + self.distal_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11998,16 +13975,17 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Metric(self, value): # Validate type Metric, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['Path Length from root'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on Metric' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on Metric' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def hasContent_(self): if ( self.proximal is not None or @@ -12027,6 +14005,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12045,23 +14025,29 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' variable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.variable), input_name='variable')), )) if self.metric is not None and 'metric' not in already_processed: already_processed.add('metric') - outfile.write(' metric=%s' % (quote_attrib(self.metric), )) + outfile.write(' metric=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.metric), input_name='metric')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InhomogeneousParameter', fromsubclass_=False, pretty_print=True): - super(InhomogeneousParameter, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(InhomogeneousParameter, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.proximal is not None: + namespaceprefix_ = self.proximal_nsprefix_ + ':' if (UseCapturedNS_ and self.proximal_nsprefix_) else '' self.proximal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='proximal', pretty_print=pretty_print) if self.distal is not None: + namespaceprefix_ = self.distal_nsprefix_ + ':' if (UseCapturedNS_ and self.distal_nsprefix_) else '' self.distal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='distal', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('variable', node) @@ -12074,15 +14060,15 @@ def buildAttributes(self, node, attrs, already_processed): self.metric = value self.validate_Metric(self.metric) # validate type Metric super(InhomogeneousParameter, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'proximal': obj_ = ProximalDetails.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.proximal = obj_ obj_.original_tagname_ = 'proximal' elif nodeName_ == 'distal': obj_ = DistalDetails.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.distal = obj_ obj_.original_tagname_ = 'distal' super(InhomogeneousParameter, self).buildChildren(child_, node, nodeName_, True) @@ -12090,49 +14076,61 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class SegmentGroup(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('properties', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Property', u'name': u'property', u'minOccurs': u'0'}, None), - MemberSpec_('annotation', 'Annotation', 0, 1, {u'type': u'Annotation', u'name': u'annotation', u'minOccurs': u'0'}, None), - MemberSpec_('members', 'Member', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Member', u'name': u'member', u'minOccurs': u'0'}, None), - MemberSpec_('includes', 'Include', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Include', u'name': u'include', u'minOccurs': u'0'}, None), - MemberSpec_('paths', 'Path', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Path', u'name': u'path', u'minOccurs': u'0'}, None), - MemberSpec_('sub_trees', 'SubTree', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SubTree', u'name': u'subTree', u'minOccurs': u'0'}, None), - MemberSpec_('inhomogeneous_parameters', 'InhomogeneousParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InhomogeneousParameter', u'name': u'inhomogeneousParameter', u'minOccurs': u'0'}, None), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), + MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), + MemberSpec_('member', 'Member', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'member', 'type': 'Member'}, None), + MemberSpec_('include', 'Include', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'Include'}, None), + MemberSpec_('path', 'Path', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'path', 'type': 'Path'}, None), + MemberSpec_('subTree', 'SubTree', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subTree', 'type': 'SubTree'}, None), + MemberSpec_('inhomogeneousParameter', 'InhomogeneousParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inhomogeneousParameter', 'type': 'InhomogeneousParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, notes=None, properties=None, annotation=None, members=None, includes=None, paths=None, sub_trees=None, inhomogeneous_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, notes=None, property=None, annotation=None, member=None, include=None, path=None, subTree=None, inhomogeneousParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SegmentGroup, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(SegmentGroup, self).__init__(neuroLexId, id, **kwargs_) self.notes = notes self.validate_Notes(self.notes) - if properties is None: - self.properties = [] + self.notes_nsprefix_ = None + if property is None: + self.property = [] else: - self.properties = properties + self.property = property + self.property_nsprefix_ = None self.annotation = annotation - if members is None: - self.members = [] - else: - self.members = members - if includes is None: - self.includes = [] - else: - self.includes = includes - if paths is None: - self.paths = [] - else: - self.paths = paths - if sub_trees is None: - self.sub_trees = [] - else: - self.sub_trees = sub_trees - if inhomogeneous_parameters is None: - self.inhomogeneous_parameters = [] - else: - self.inhomogeneous_parameters = inhomogeneous_parameters + self.annotation_nsprefix_ = None + if member is None: + self.member = [] + else: + self.member = member + self.member_nsprefix_ = None + if include is None: + self.include = [] + else: + self.include = include + self.include_nsprefix_ = None + if path is None: + self.path = [] + else: + self.path = path + self.path_nsprefix_ = None + if subTree is None: + self.subTree = [] + else: + self.subTree = subTree + self.subTree_nsprefix_ = None + if inhomogeneousParameter is None: + self.inhomogeneousParameter = [] + else: + self.inhomogeneousParameter = inhomogeneousParameter + self.inhomogeneousParameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12145,19 +14143,25 @@ def factory(*args_, **kwargs_): return SegmentGroup(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def hasContent_(self): if ( self.notes is not None or - self.properties or + self.property or self.annotation is not None or - self.members or - self.includes or - self.paths or - self.sub_trees or - self.inhomogeneous_parameters or + self.member or + self.include or + self.path or + self.subTree or + self.inhomogeneousParameter or super(SegmentGroup, self).hasContent_() ): return True @@ -12173,6 +14177,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12187,78 +14193,92 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentGroup'): super(SegmentGroup, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SegmentGroup') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentGroup', fromsubclass_=False, pretty_print=True): - super(SegmentGroup, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(SegmentGroup, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - for property_ in self.properties: + for property_ in self.property: + namespaceprefix_ = self.property_nsprefix_ + ':' if (UseCapturedNS_ and self.property_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: + namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' self.annotation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='annotation', pretty_print=pretty_print) - for member_ in self.members: + for member_ in self.member: + namespaceprefix_ = self.member_nsprefix_ + ':' if (UseCapturedNS_ and self.member_nsprefix_) else '' member_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='member', pretty_print=pretty_print) - for include_ in self.includes: + for include_ in self.include: + namespaceprefix_ = self.include_nsprefix_ + ':' if (UseCapturedNS_ and self.include_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) - for path_ in self.paths: + for path_ in self.path: + namespaceprefix_ = self.path_nsprefix_ + ':' if (UseCapturedNS_ and self.path_nsprefix_) else '' path_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='path', pretty_print=pretty_print) - for subTree_ in self.sub_trees: + for subTree_ in self.subTree: + namespaceprefix_ = self.subTree_nsprefix_ + ':' if (UseCapturedNS_ and self.subTree_nsprefix_) else '' subTree_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subTree', pretty_print=pretty_print) - for inhomogeneousParameter_ in self.inhomogeneous_parameters: + for inhomogeneousParameter_ in self.inhomogeneousParameter: + namespaceprefix_ = self.inhomogeneousParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneousParameter_nsprefix_) else '' inhomogeneousParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousParameter', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(SegmentGroup, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) - obj_.build(child_) - self.properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.property.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.annotation = obj_ obj_.original_tagname_ = 'annotation' elif nodeName_ == 'member': obj_ = Member.factory(parent_object_=self) - obj_.build(child_) - self.members.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.member.append(obj_) obj_.original_tagname_ = 'member' elif nodeName_ == 'include': obj_ = Include.factory(parent_object_=self) - obj_.build(child_) - self.includes.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.include.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'path': obj_ = Path.factory(parent_object_=self) - obj_.build(child_) - self.paths.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.path.append(obj_) obj_.original_tagname_ = 'path' elif nodeName_ == 'subTree': obj_ = SubTree.factory(parent_object_=self) - obj_.build(child_) - self.sub_trees.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.subTree.append(obj_) obj_.original_tagname_ = 'subTree' elif nodeName_ == 'inhomogeneousParameter': obj_ = InhomogeneousParameter.factory(parent_object_=self) - obj_.build(child_) - self.inhomogeneous_parameters.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.inhomogeneousParameter.append(obj_) obj_.original_tagname_ = 'inhomogeneousParameter' super(SegmentGroup, self).buildChildren(child_, node, nodeName_, True) @@ -12275,22 +14295,30 @@ def __repr__(self): class Segment(BaseNonNegativeIntegerId): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 1, {'use': u'optional'}), - MemberSpec_('parent', 'SegmentParent', 0, 1, {u'type': u'SegmentParent', u'name': u'parent', u'minOccurs': u'0'}, None), - MemberSpec_('proximal', 'Point3DWithDiam', 0, 1, {u'type': u'Point3DWithDiam', u'name': u'proximal', u'minOccurs': u'0'}, None), - MemberSpec_('distal', 'Point3DWithDiam', 0, 0, {u'type': u'Point3DWithDiam', u'name': u'distal', u'minOccurs': u'1'}, None), + MemberSpec_('name', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('parent', 'SegmentParent', 0, 1, {'minOccurs': '0', 'name': 'parent', 'type': 'SegmentParent'}, None), + MemberSpec_('proximal', 'Point3DWithDiam', 0, 1, {'minOccurs': '0', 'name': 'proximal', 'type': 'Point3DWithDiam'}, None), + MemberSpec_('distal', 'Point3DWithDiam', 0, 0, {'minOccurs': '1', 'name': 'distal', 'type': 'Point3DWithDiam'}, None), ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, name=None, parent=None, proximal=None, distal=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, name=None, parent=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Segment, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(Segment, self).__init__(neuroLexId, id, **kwargs_) self.name = _cast(None, name) + self.name_nsprefix_ = None self.parent = parent + self.parent_nsprefix_ = None self.proximal = proximal + self.proximal_nsprefix_ = None self.distal = distal + self.distal_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12322,6 +14350,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12339,23 +14369,30 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('name') outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Segment', fromsubclass_=False, pretty_print=True): - super(Segment, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Segment, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.parent is not None: + namespaceprefix_ = self.parent_nsprefix_ + ':' if (UseCapturedNS_ and self.parent_nsprefix_) else '' self.parent.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parent', pretty_print=pretty_print) if self.proximal is not None: + namespaceprefix_ = self.proximal_nsprefix_ + ':' if (UseCapturedNS_ and self.proximal_nsprefix_) else '' self.proximal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='proximal', pretty_print=pretty_print) if self.distal is not None: + namespaceprefix_ = self.distal_nsprefix_ + ':' if (UseCapturedNS_ and self.distal_nsprefix_) else '' self.distal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='distal', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -12363,20 +14400,20 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('name') self.name = value super(Segment, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'parent': obj_ = SegmentParent.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.parent = obj_ obj_.original_tagname_ = 'parent' elif nodeName_ == 'proximal': obj_ = Point3DWithDiam.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.proximal = obj_ obj_.original_tagname_ = 'proximal' elif nodeName_ == 'distal': obj_ = Point3DWithDiam.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.distal = obj_ obj_.original_tagname_ = 'distal' super(Segment, self).buildChildren(child_, node, nodeName_, True) @@ -12456,26 +14493,33 @@ def surface_area(self): class Morphology(Standalone): - """Standalone element which is usually inside a single cell, but could - be outside and referenced by id.""" + """Standalone element which is usually inside a single cell, but could be + outside and + referenced by id.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'Segment', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Segment', u'name': u'segment'}, None), - MemberSpec_('segment_groups', 'SegmentGroup', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SegmentGroup', u'name': u'segmentGroup', u'minOccurs': u'0'}, None), + MemberSpec_('segment', 'Segment', 1, 0, {'maxOccurs': 'unbounded', 'name': 'segment', 'type': 'Segment'}, None), + MemberSpec_('segmentGroup', 'SegmentGroup', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'segmentGroup', 'type': 'SegmentGroup'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, segments=None, segment_groups=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, segment=None, segmentGroup=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Morphology, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - if segments is None: - self.segments = [] - else: - self.segments = segments - if segment_groups is None: - self.segment_groups = [] - else: - self.segment_groups = segment_groups + self.ns_prefix_ = None + super(Morphology, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + if segment is None: + self.segment = [] + else: + self.segment = segment + self.segment_nsprefix_ = None + if segmentGroup is None: + self.segmentGroup = [] + else: + self.segmentGroup = segmentGroup + self.segmentGroup_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12489,8 +14533,8 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.segments or - self.segment_groups or + self.segment or + self.segmentGroup or super(Morphology, self).hasContent_() ): return True @@ -12506,6 +14550,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12520,34 +14566,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Morphology'): super(Morphology, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Morphology') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Morphology', fromsubclass_=False, pretty_print=True): - super(Morphology, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Morphology, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for segment_ in self.segments: + for segment_ in self.segment: + namespaceprefix_ = self.segment_nsprefix_ + ':' if (UseCapturedNS_ and self.segment_nsprefix_) else '' segment_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segment', pretty_print=pretty_print) - for segmentGroup_ in self.segment_groups: + for segmentGroup_ in self.segmentGroup: + namespaceprefix_ = self.segmentGroup_nsprefix_ + ':' if (UseCapturedNS_ and self.segmentGroup_nsprefix_) else '' segmentGroup_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segmentGroup', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Morphology, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'segment': obj_ = Segment.factory(parent_object_=self) - obj_.build(child_) - self.segments.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.segment.append(obj_) obj_.original_tagname_ = 'segment' elif nodeName_ == 'segmentGroup': obj_ = SegmentGroup.factory(parent_object_=self) - obj_.build(child_) - self.segment_groups.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.segmentGroup.append(obj_) obj_.original_tagname_ = 'segmentGroup' super(Morphology, self).buildChildren(child_, node, nodeName_, True) @property @@ -12557,14 +14609,18 @@ def num_segments(self): class BaseCell(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -12594,6 +14650,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12610,15 +14668,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCell', fromsubclass_=False, pretty_print=True): - super(BaseCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -12626,21 +14692,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseCell, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCell class BaseSynapse(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -12670,6 +14740,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12686,15 +14758,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseSynapse', fromsubclass_=False, pretty_print=True): - super(BaseSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -12702,7 +14782,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseSynapse @@ -12710,22 +14790,30 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class FixedFactorConcentrationModel(Standalone): """Should not be required, as it's present on the species element!""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), - MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('rho', 'Nml2Quantity_rhoFactor', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('restingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('decayConstant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('rho', 'Nml2Quantity_rhoFactor', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, rho=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, rho=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(FixedFactorConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(FixedFactorConcentrationModel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.ion = _cast(None, ion) - self.resting_conc = _cast(None, resting_conc) - self.decay_constant = _cast(None, decay_constant) + self.ion_nsprefix_ = None + self.restingConc = _cast(None, restingConc) + self.restingConc_nsprefix_ = None + self.decayConstant = _cast(None, decayConstant) + self.decayConstant_nsprefix_ = None self.rho = _cast(None, rho) + self.rho_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12739,32 +14827,48 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_rhoFactor(self, value): # Validate type Nml2Quantity_rhoFactor, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_rhoFactor_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_rhoFactor_patterns_, )) - validate_Nml2Quantity_rhoFactor_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m_per_A_per_s|mol_per_cm_per_uA_per_ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_rhoFactor_patterns_, )) + validate_Nml2Quantity_rhoFactor_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m_per_A_per_s|mol_per_cm_per_uA_per_ms))$']] def hasContent_(self): if ( super(FixedFactorConcentrationModel, self).hasContent_() @@ -12782,6 +14886,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12797,24 +14903,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FixedFactorConcentrationModel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FixedFactorConcentrationModel') if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) - if self.resting_conc is not None and 'resting_conc' not in already_processed: - already_processed.add('resting_conc') - outfile.write(' restingConc=%s' % (quote_attrib(self.resting_conc), )) - if self.decay_constant is not None and 'decay_constant' not in already_processed: - already_processed.add('decay_constant') - outfile.write(' decayConstant=%s' % (quote_attrib(self.decay_constant), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + if self.restingConc is not None and 'restingConc' not in already_processed: + already_processed.add('restingConc') + outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.restingConc), input_name='restingConc')), )) + if self.decayConstant is not None and 'decayConstant' not in already_processed: + already_processed.add('decayConstant') + outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decayConstant), input_name='decayConstant')), )) if self.rho is not None and 'rho' not in already_processed: already_processed.add('rho') - outfile.write(' rho=%s' % (quote_attrib(self.rho), )) + outfile.write(' rho=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rho), input_name='rho')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FixedFactorConcentrationModel', fromsubclass_=False, pretty_print=True): - super(FixedFactorConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(FixedFactorConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ion', node) @@ -12825,20 +14935,20 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('restingConc', node) if value is not None and 'restingConc' not in already_processed: already_processed.add('restingConc') - self.resting_conc = value - self.validate_Nml2Quantity_concentration(self.resting_conc) # validate type Nml2Quantity_concentration + self.restingConc = value + self.validate_Nml2Quantity_concentration(self.restingConc) # validate type Nml2Quantity_concentration value = find_attr_value_('decayConstant', node) if value is not None and 'decayConstant' not in already_processed: already_processed.add('decayConstant') - self.decay_constant = value - self.validate_Nml2Quantity_time(self.decay_constant) # validate type Nml2Quantity_time + self.decayConstant = value + self.validate_Nml2Quantity_time(self.decayConstant) # validate type Nml2Quantity_time value = find_attr_value_('rho', node) if value is not None and 'rho' not in already_processed: already_processed.add('rho') self.rho = value self.validate_Nml2Quantity_rhoFactor(self.rho) # validate type Nml2Quantity_rhoFactor super(FixedFactorConcentrationModel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(FixedFactorConcentrationModel, self).buildChildren(child_, node, nodeName_, True) pass # end class FixedFactorConcentrationModel @@ -12846,22 +14956,30 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class DecayingPoolConcentrationModel(Standalone): """Should not be required, as it's present on the species element!""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), - MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('shell_thickness', 'Nml2Quantity_length', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('restingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('decayConstant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('shellThickness', 'Nml2Quantity_length', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, shellThickness=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(DecayingPoolConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(DecayingPoolConcentrationModel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.ion = _cast(None, ion) - self.resting_conc = _cast(None, resting_conc) - self.decay_constant = _cast(None, decay_constant) - self.shell_thickness = _cast(None, shell_thickness) + self.ion_nsprefix_ = None + self.restingConc = _cast(None, restingConc) + self.restingConc_nsprefix_ = None + self.decayConstant = _cast(None, decayConstant) + self.decayConstant_nsprefix_ = None + self.shellThickness = _cast(None, shellThickness) + self.shellThickness_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -12876,32 +14994,48 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_length(self, value): # Validate type Nml2Quantity_length, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_length_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_length_patterns_, )) - validate_Nml2Quantity_length_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m|cm|um)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_length_patterns_, )) + validate_Nml2Quantity_length_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m|cm|um))$']] def hasContent_(self): if ( super(DecayingPoolConcentrationModel, self).hasContent_() @@ -12919,6 +15053,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12934,28 +15070,36 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(DecayingPoolConcentrationModel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DecayingPoolConcentrationModel') if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (quote_attrib(self.ion), )) - if self.resting_conc is not None and 'resting_conc' not in already_processed: - already_processed.add('resting_conc') - outfile.write(' restingConc=%s' % (quote_attrib(self.resting_conc), )) - if self.decay_constant is not None and 'decay_constant' not in already_processed: - already_processed.add('decay_constant') - outfile.write(' decayConstant=%s' % (quote_attrib(self.decay_constant), )) - if self.shell_thickness is not None and 'shell_thickness' not in already_processed: - already_processed.add('shell_thickness') - outfile.write(' shellThickness=%s' % (quote_attrib(self.shell_thickness), )) + outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + if self.restingConc is not None and 'restingConc' not in already_processed: + already_processed.add('restingConc') + outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.restingConc), input_name='restingConc')), )) + if self.decayConstant is not None and 'decayConstant' not in already_processed: + already_processed.add('decayConstant') + outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decayConstant), input_name='decayConstant')), )) + if self.shellThickness is not None and 'shellThickness' not in already_processed: + already_processed.add('shellThickness') + outfile.write(' shellThickness=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.shellThickness), input_name='shellThickness')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DecayingPoolConcentrationModel', fromsubclass_=False, pretty_print=True): - super(DecayingPoolConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(DecayingPoolConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ion', node) @@ -12966,49 +15110,58 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('restingConc', node) if value is not None and 'restingConc' not in already_processed: already_processed.add('restingConc') - self.resting_conc = value - self.validate_Nml2Quantity_concentration(self.resting_conc) # validate type Nml2Quantity_concentration + self.restingConc = value + self.validate_Nml2Quantity_concentration(self.restingConc) # validate type Nml2Quantity_concentration value = find_attr_value_('decayConstant', node) if value is not None and 'decayConstant' not in already_processed: already_processed.add('decayConstant') - self.decay_constant = value - self.validate_Nml2Quantity_time(self.decay_constant) # validate type Nml2Quantity_time + self.decayConstant = value + self.validate_Nml2Quantity_time(self.decayConstant) # validate type Nml2Quantity_time value = find_attr_value_('shellThickness', node) if value is not None and 'shellThickness' not in already_processed: already_processed.add('shellThickness') - self.shell_thickness = value - self.validate_Nml2Quantity_length(self.shell_thickness) # validate type Nml2Quantity_length + self.shellThickness = value + self.validate_Nml2Quantity_length(self.shellThickness) # validate type Nml2Quantity_length value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(DecayingPoolConcentrationModel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(DecayingPoolConcentrationModel, self).buildChildren(child_, node, nodeName_, True) pass # end class DecayingPoolConcentrationModel class GateFractionalSubgate(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('fractional_conductance', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), + MemberSpec_('fractionalConductance', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, fractional_conductance=None, notes=None, q10_settings=None, steady_state=None, time_course=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, fractionalConductance=None, notes=None, q10Settings=None, steadyState=None, timeCourse=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateFractionalSubgate, self).__init__(neuro_lex_id, id, **kwargs_) - self.fractional_conductance = _cast(None, fractional_conductance) + self.ns_prefix_ = None + super(GateFractionalSubgate, self).__init__(neuroLexId, id, **kwargs_) + self.fractionalConductance = _cast(None, fractionalConductance) + self.fractionalConductance_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.steady_state = steady_state - self.time_course = time_course + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13021,22 +15174,32 @@ def factory(*args_, **kwargs_): return GateFractionalSubgate(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.steady_state is not None or - self.time_course is not None or + self.q10Settings is not None or + self.steadyState is not None or + self.timeCourse is not None or super(GateFractionalSubgate, self).hasContent_() ): return True @@ -13052,6 +15215,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13065,85 +15230,103 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='GateFractionalSubgate'): super(GateFractionalSubgate, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateFractionalSubgate') - if self.fractional_conductance is not None and 'fractional_conductance' not in already_processed: - already_processed.add('fractional_conductance') - outfile.write(' fractionalConductance=%s' % (quote_attrib(self.fractional_conductance), )) + if self.fractionalConductance is not None and 'fractionalConductance' not in already_processed: + already_processed.add('fractionalConductance') + outfile.write(' fractionalConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fractionalConductance), input_name='fractionalConductance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateFractionalSubgate', fromsubclass_=False, pretty_print=True): - super(GateFractionalSubgate, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateFractionalSubgate, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('fractionalConductance', node) if value is not None and 'fractionalConductance' not in already_processed: already_processed.add('fractionalConductance') - self.fractional_conductance = value - self.validate_Nml2Quantity_none(self.fractional_conductance) # validate type Nml2Quantity_none + self.fractionalConductance = value + self.validate_Nml2Quantity_none(self.fractionalConductance) # validate type Nml2Quantity_none super(GateFractionalSubgate, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' super(GateFractionalSubgate, self).buildChildren(child_, node, nodeName_, True) # end class GateFractionalSubgate class GateFractional(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'GateFractionalSubgate', u'name': u'subGate', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('subGate', 'GateFractionalSubgate', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, sub_gates=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, subGate=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateFractional, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateFractional, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - if sub_gates is None: - self.sub_gates = [] - else: - self.sub_gates = sub_gates + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + if subGate is None: + self.subGate = [] + else: + self.subGate = subGate + self.subGate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13156,18 +15339,28 @@ def factory(*args_, **kwargs_): return GateFractional(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.sub_gates or + self.q10Settings is not None or + self.subGate or super(GateFractional, self).hasContent_() ): return True @@ -13183,6 +15376,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13198,76 +15393,89 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateFractional, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateFractional') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateFractional', fromsubclass_=False, pretty_print=True): - super(GateFractional, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateFractional, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - for subGate_ in self.sub_gates: + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + for subGate_ in self.subGate: + namespaceprefix_ = self.subGate_nsprefix_ + ':' if (UseCapturedNS_ and self.subGate_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateFractional, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) - obj_.build(child_) - self.sub_gates.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.subGate.append(obj_) obj_.original_tagname_ = 'subGate' super(GateFractional, self).buildChildren(child_, node, nodeName_, True) # end class GateFractional class GateHHInstantaneous(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, steady_state=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, steadyState=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHInstantaneous, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHInstantaneous, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.steady_state = steady_state + self.notes_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13280,17 +15488,27 @@ def factory(*args_, **kwargs_): return GateHHInstantaneous(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.steady_state is not None or + self.steadyState is not None or super(GateHHInstantaneous, self).hasContent_() ): return True @@ -13306,6 +15524,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13321,75 +15541,90 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHInstantaneous, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHInstantaneous') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHInstantaneous', fromsubclass_=False, pretty_print=True): - super(GateHHInstantaneous, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHInstantaneous, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHInstantaneous, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHInstantaneous, self).buildChildren(child_, node, nodeName_, True) # end class GateHHInstantaneous class GateHHRatesInf(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, steady_state=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, steadyState=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHRatesInf, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHRatesInf, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.forward_rate = forward_rate - self.reverse_rate = reverse_rate - self.steady_state = steady_state + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.forwardRate = forwardRate + self.forwardRate_nsprefix_ = None + self.reverseRate = reverseRate + self.reverseRate_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13402,20 +15637,30 @@ def factory(*args_, **kwargs_): return GateHHRatesInf(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.forward_rate is not None or - self.reverse_rate is not None or - self.steady_state is not None or + self.q10Settings is not None or + self.forwardRate is not None or + self.reverseRate is not None or + self.steadyState is not None or super(GateHHRatesInf, self).hasContent_() ): return True @@ -13431,6 +15676,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13446,96 +15693,114 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesInf', fromsubclass_=False, pretty_print=True): - super(GateHHRatesInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHRatesInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forward_rate is not None: - self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverse_rate is not None: - self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forwardRate is not None: + namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' + self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverseRate is not None: + namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' + self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.forward_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardRate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.reverse_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseRate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesInf class GateHHRatesTau(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHRatesTau, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHRatesTau, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.forward_rate = forward_rate - self.reverse_rate = reverse_rate - self.time_course = time_course + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.forwardRate = forwardRate + self.forwardRate_nsprefix_ = None + self.reverseRate = reverseRate + self.reverseRate_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13548,20 +15813,30 @@ def factory(*args_, **kwargs_): return GateHHRatesTau(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.forward_rate is not None or - self.reverse_rate is not None or - self.time_course is not None or + self.q10Settings is not None or + self.forwardRate is not None or + self.reverseRate is not None or + self.timeCourse is not None or super(GateHHRatesTau, self).hasContent_() ): return True @@ -13577,6 +15852,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13592,98 +15869,117 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesTau, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesTau') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesTau', fromsubclass_=False, pretty_print=True): - super(GateHHRatesTau, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHRatesTau, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forward_rate is not None: - self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverse_rate is not None: - self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forwardRate is not None: + namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' + self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverseRate is not None: + namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' + self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesTau, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.forward_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardRate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.reverse_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseRate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' super(GateHHRatesTau, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesTau class GateHHRatesTauInf(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, steadyState=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHRatesTauInf, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHRatesTauInf, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.forward_rate = forward_rate - self.reverse_rate = reverse_rate - self.time_course = time_course - self.steady_state = steady_state + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.forwardRate = forwardRate + self.forwardRate_nsprefix_ = None + self.reverseRate = reverseRate + self.reverseRate_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13696,21 +15992,31 @@ def factory(*args_, **kwargs_): return GateHHRatesTauInf(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.forward_rate is not None or - self.reverse_rate is not None or - self.time_course is not None or - self.steady_state is not None or + self.q10Settings is not None or + self.forwardRate is not None or + self.reverseRate is not None or + self.timeCourse is not None or + self.steadyState is not None or super(GateHHRatesTauInf, self).hasContent_() ): return True @@ -13726,6 +16032,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13741,101 +16049,119 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesTauInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesTauInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesTauInf', fromsubclass_=False, pretty_print=True): - super(GateHHRatesTauInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHRatesTauInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forward_rate is not None: - self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverse_rate is not None: - self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forwardRate is not None: + namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' + self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverseRate is not None: + namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' + self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesTauInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.forward_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardRate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.reverse_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseRate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesTauInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesTauInf class GateHHTauInf(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, time_course=None, steady_state=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, timeCourse=None, steadyState=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHTauInf, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHTauInf, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.time_course = time_course - self.steady_state = steady_state + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13848,19 +16174,29 @@ def factory(*args_, **kwargs_): return GateHHTauInf(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.time_course is not None or - self.steady_state is not None or + self.q10Settings is not None or + self.timeCourse is not None or + self.steadyState is not None or super(GateHHTauInf, self).hasContent_() ): return True @@ -13876,6 +16212,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13891,87 +16229,103 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHTauInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHTauInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHTauInf', fromsubclass_=False, pretty_print=True): - super(GateHHTauInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHTauInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHTauInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHTauInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHTauInf class GateHHRates(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHRates, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHRates, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.forward_rate = forward_rate - self.reverse_rate = reverse_rate + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.forwardRate = forwardRate + self.forwardRate_nsprefix_ = None + self.reverseRate = reverseRate + self.reverseRate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13984,19 +16338,29 @@ def factory(*args_, **kwargs_): return GateHHRates(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.forward_rate is not None or - self.reverse_rate is not None or + self.q10Settings is not None or + self.forwardRate is not None or + self.reverseRate is not None or super(GateHHRates, self).hasContent_() ): return True @@ -14012,6 +16376,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14027,101 +16393,121 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRates, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRates') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRates', fromsubclass_=False, pretty_print=True): - super(GateHHRates, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHRates, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forward_rate is not None: - self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverse_rate is not None: - self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forwardRate is not None: + namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' + self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverseRate is not None: + namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' + self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRates, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.forward_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardRate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.reverse_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseRate = obj_ obj_.original_tagname_ = 'reverseRate' super(GateHHRates, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRates class GateHHUndetermined(Base): - """Note all sub elements for gateHHrates, gateHHratesTau, - gateFractional etc. allowed here. Which are valid should be - constrained by what type is set""" + """Note all sub elements for gateHHrates, gateHHratesTau, gateFractional + etc. allowed here. Which are valid should be constrained by what type + is set""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('type', 'gateTypes', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 1, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'0'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 1, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'0'}, None), - MemberSpec_('time_course', 'HHTime', 0, 1, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'0'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 1, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'0'}, None), - MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateFractionalSubgate', u'name': u'subGate', u'minOccurs': u'0'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('type_', 'gateTypes', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forwardRate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverseRate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 1, {'minOccurs': '0', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steadyState', 'HHVariable', 0, 1, {'minOccurs': '0', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('subGate', 'GateFractionalSubgate', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, type=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, sub_gates=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, type_=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, steadyState=None, subGate=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateHHUndetermined, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateHHUndetermined, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) - self.type = _cast(None, type) + self.instances_nsprefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - self.forward_rate = forward_rate - self.reverse_rate = reverse_rate - self.time_course = time_course - self.steady_state = steady_state - if sub_gates is None: - self.sub_gates = [] - else: - self.sub_gates = sub_gates + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + self.forwardRate = forwardRate + self.forwardRate_nsprefix_ = None + self.reverseRate = reverseRate + self.reverseRate_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None + if subGate is None: + self.subGate = [] + else: + self.subGate = subGate + self.subGate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14134,34 +16520,45 @@ def factory(*args_, **kwargs_): return GateHHUndetermined(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_gateTypes(self, value): # Validate type gateTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['gateHHrates', 'gateHHratesTau', 'gateHHtauInf', 'gateHHratesInf', 'gateHHratesTauInf', 'gateHHInstantaneous', 'gateKS', 'gateFractional'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on gateTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on gateTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.forward_rate is not None or - self.reverse_rate is not None or - self.time_course is not None or - self.steady_state is not None or - self.sub_gates or + self.q10Settings is not None or + self.forwardRate is not None or + self.reverseRate is not None or + self.timeCourse is not None or + self.steadyState is not None or + self.subGate or super(GateHHUndetermined, self).hasContent_() ): return True @@ -14177,6 +16574,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14192,137 +16591,159 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHUndetermined, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHUndetermined') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHUndetermined', fromsubclass_=False, pretty_print=True): - super(GateHHUndetermined, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateHHUndetermined, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forward_rate is not None: - self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverse_rate is not None: - self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - for subGate_ in self.sub_gates: + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forwardRate is not None: + namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' + self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverseRate is not None: + namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' + self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + for subGate_ in self.subGate: + namespaceprefix_ = self.subGate_nsprefix_ + ':' if (UseCapturedNS_ and self.subGate_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_gateTypes(self.type) # validate type gateTypes + self.type_ = value + self.validate_gateTypes(self.type_) # validate type gateTypes super(GateHHUndetermined, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.forward_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardRate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_) - self.reverse_rate = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseRate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) - obj_.build(child_) - self.sub_gates.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.subGate.append(obj_) obj_.original_tagname_ = 'subGate' super(GateHHUndetermined, self).buildChildren(child_, node, nodeName_, True) # end class GateHHUndetermined class GateKS(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), - MemberSpec_('closed_states', 'ClosedState', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'ClosedState', u'name': u'closedState', u'minOccurs': u'1'}, None), - MemberSpec_('open_states', 'OpenState', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'OpenState', u'name': u'openState', u'minOccurs': u'1'}, None), - MemberSpec_('forward_transition', 'ForwardTransition', 1, 0, {u'type': u'ForwardTransition', u'name': u'forwardTransition'}, 2), - MemberSpec_('reverse_transition', 'ReverseTransition', 1, 0, {u'type': u'ReverseTransition', u'name': u'reverseTransition'}, 2), - MemberSpec_('tau_inf_transition', 'TauInfTransition', 1, 0, {u'type': u'TauInfTransition', u'name': u'tauInfTransition'}, 2), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), + MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('closedState', 'ClosedState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'closedState', 'type': 'ClosedState'}, None), + MemberSpec_('openState', 'OpenState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'openState', 'type': 'OpenState'}, None), + MemberSpec_('forwardTransition', 'ForwardTransition', 1, 0, {'name': 'forwardTransition', 'type': 'ForwardTransition'}, 2), + MemberSpec_('reverseTransition', 'ReverseTransition', 1, 0, {'name': 'reverseTransition', 'type': 'ReverseTransition'}, 2), + MemberSpec_('tauInfTransition', 'TauInfTransition', 1, 0, {'name': 'tauInfTransition', 'type': 'TauInfTransition'}, 2), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, closed_states=None, open_states=None, forward_transition=None, reverse_transition=None, tau_inf_transition=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, closedState=None, openState=None, forwardTransition=None, reverseTransition=None, tauInfTransition=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GateKS, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(GateKS, self).__init__(neuroLexId, id, **kwargs_) self.instances = _cast(int, instances) + self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.q10_settings = q10_settings - if closed_states is None: - self.closed_states = [] - else: - self.closed_states = closed_states - if open_states is None: - self.open_states = [] - else: - self.open_states = open_states - if forward_transition is None: - self.forward_transition = [] - else: - self.forward_transition = forward_transition - if reverse_transition is None: - self.reverse_transition = [] - else: - self.reverse_transition = reverse_transition - if tau_inf_transition is None: - self.tau_inf_transition = [] - else: - self.tau_inf_transition = tau_inf_transition + self.notes_nsprefix_ = None + self.q10Settings = q10Settings + self.q10Settings_nsprefix_ = None + if closedState is None: + self.closedState = [] + else: + self.closedState = closedState + self.closedState_nsprefix_ = None + if openState is None: + self.openState = [] + else: + self.openState = openState + self.openState_nsprefix_ = None + if forwardTransition is None: + self.forwardTransition = [] + else: + self.forwardTransition = forwardTransition + self.forwardTransition_nsprefix_ = None + if reverseTransition is None: + self.reverseTransition = [] + else: + self.reverseTransition = reverseTransition + self.reverseTransition_nsprefix_ = None + if tauInfTransition is None: + self.tauInfTransition = [] + else: + self.tauInfTransition = tauInfTransition + self.tauInfTransition_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14335,22 +16756,32 @@ def factory(*args_, **kwargs_): return GateKS(*args_, **kwargs_) factory = staticmethod(factory) def validate_Notes(self, value): + result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False pass + return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def hasContent_(self): if ( self.notes is not None or - self.q10_settings is not None or - self.closed_states or - self.open_states or - self.forward_transition or - self.reverse_transition or - self.tau_inf_transition or + self.q10Settings is not None or + self.closedState or + self.openState or + self.forwardTransition or + self.reverseTransition or + self.tauInfTransition or super(GateKS, self).hasContent_() ): return True @@ -14366,6 +16797,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14381,105 +16814,123 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateKS, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateKS') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances=%s' % (quote_attrib(self.instances), )) + outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateKS', fromsubclass_=False, pretty_print=True): - super(GateKS, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(GateKS, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: + namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10_settings is not None: - self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - for closedState_ in self.closed_states: + if self.q10Settings is not None: + namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' + self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + for closedState_ in self.closedState: + namespaceprefix_ = self.closedState_nsprefix_ + ':' if (UseCapturedNS_ and self.closedState_nsprefix_) else '' closedState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='closedState', pretty_print=pretty_print) - for openState_ in self.open_states: + for openState_ in self.openState: + namespaceprefix_ = self.openState_nsprefix_ + ':' if (UseCapturedNS_ and self.openState_nsprefix_) else '' openState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='openState', pretty_print=pretty_print) - for forwardTransition_ in self.forward_transition: + for forwardTransition_ in self.forwardTransition: + namespaceprefix_ = self.forwardTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardTransition_nsprefix_) else '' forwardTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardTransition', pretty_print=pretty_print) - for reverseTransition_ in self.reverse_transition: + for reverseTransition_ in self.reverseTransition: + namespaceprefix_ = self.reverseTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseTransition_nsprefix_) else '' reverseTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseTransition', pretty_print=pretty_print) - for tauInfTransition_ in self.tau_inf_transition: + for tauInfTransition_ in self.tauInfTransition: + namespaceprefix_ = self.tauInfTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.tauInfTransition_nsprefix_) else '' tauInfTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tauInfTransition', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - try: - self.instances = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) + self.instances = self.gds_parse_integer(value, node, 'instances') if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateKS, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': - notes_ = child_.text - notes_ = self.gds_validate_string(notes_, node, 'notes') - self.notes = notes_ + value_ = child_.text + value_ = self.gds_parse_string(value_, node, 'notes') + value_ = self.gds_validate_string(value_, node, 'notes') + self.notes = value_ + self.notes_nsprefix_ = child_.prefix # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_) - self.q10_settings = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.q10Settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'closedState': obj_ = ClosedState.factory(parent_object_=self) - obj_.build(child_) - self.closed_states.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.closedState.append(obj_) obj_.original_tagname_ = 'closedState' elif nodeName_ == 'openState': obj_ = OpenState.factory(parent_object_=self) - obj_.build(child_) - self.open_states.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.openState.append(obj_) obj_.original_tagname_ = 'openState' elif nodeName_ == 'forwardTransition': obj_ = ForwardTransition.factory(parent_object_=self) - obj_.build(child_) - self.forward_transition.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.forwardTransition.append(obj_) obj_.original_tagname_ = 'forwardTransition' elif nodeName_ == 'reverseTransition': obj_ = ReverseTransition.factory(parent_object_=self) - obj_.build(child_) - self.reverse_transition.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.reverseTransition.append(obj_) obj_.original_tagname_ = 'reverseTransition' elif nodeName_ == 'tauInfTransition': obj_ = TauInfTransition.factory(parent_object_=self) - obj_.build(child_) - self.tau_inf_transition.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.tauInfTransition.append(obj_) obj_.original_tagname_ = 'tauInfTransition' super(GateKS, self).buildChildren(child_, node, nodeName_, True) # end class GateKS class TauInfTransition(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('steadyState', 'HHVariable', 0, 0, {'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('timeCourse', 'HHTime', 0, 0, {'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, steady_state=None, time_course=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, from_=None, to=None, steadyState=None, timeCourse=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(TauInfTransition, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(TauInfTransition, self).__init__(neuroLexId, id, **kwargs_) self.from_ = _cast(None, from_) + self.from__nsprefix_ = None self.to = _cast(None, to) - self.steady_state = steady_state - self.time_course = time_course + self.to_nsprefix_ = None + self.steadyState = steadyState + self.steadyState_nsprefix_ = None + self.timeCourse = timeCourse + self.timeCourse_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14493,15 +16944,19 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.steady_state is not None or - self.time_course is not None or + self.steadyState is not None or + self.timeCourse is not None or super(TauInfTransition, self).hasContent_() ): return True @@ -14517,6 +16972,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14532,26 +16989,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(TauInfTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TauInfTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (quote_attrib(self.from_), )) + outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (quote_attrib(self.to), )) + outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TauInfTransition', fromsubclass_=False, pretty_print=True): - super(TauInfTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(TauInfTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if self.steady_state is not None: - self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - if self.time_course is not None: - self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.steadyState is not None: + namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' + self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.timeCourse is not None: + namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' + self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -14565,35 +17028,41 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(TauInfTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_) - self.steady_state = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.steadyState = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_) - self.time_course = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.timeCourse = obj_ obj_.original_tagname_ = 'timeCourse' super(TauInfTransition, self).buildChildren(child_, node, nodeName_, True) # end class TauInfTransition class ReverseTransition(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ReverseTransition, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(ReverseTransition, self).__init__(neuroLexId, id, **kwargs_) self.from_ = _cast(None, from_) + self.from__nsprefix_ = None self.to = _cast(None, to) + self.to_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -14611,11 +17080,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -14634,6 +17107,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14649,24 +17124,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ReverseTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ReverseTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (quote_attrib(self.from_), )) + outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (quote_attrib(self.to), )) + outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ReverseTransition', fromsubclass_=False, pretty_print=True): - super(ReverseTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ReverseTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -14680,28 +17159,33 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(ReverseTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'ReverseTransition') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'ReverseTransition') + self.add_anytypeobjs_(content_) super(ReverseTransition, self).buildChildren(child_, node, nodeName_, True) # end class ReverseTransition class ForwardTransition(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ForwardTransition, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(ForwardTransition, self).__init__(neuroLexId, id, **kwargs_) self.from_ = _cast(None, from_) + self.from__nsprefix_ = None self.to = _cast(None, to) + self.to_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -14719,11 +17203,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -14742,6 +17230,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14757,24 +17247,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ForwardTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ForwardTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (quote_attrib(self.from_), )) + outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (quote_attrib(self.to), )) + outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ForwardTransition', fromsubclass_=False, pretty_print=True): - super(ForwardTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ForwardTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for obj_ in self.anytypeobjs_: obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -14788,23 +17282,26 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(ForwardTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - obj_ = self.gds_build_any(child_, 'ForwardTransition') - if obj_ is not None: - self.add_anytypeobjs_(obj_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + content_ = self.gds_build_any(child_, 'ForwardTransition') + self.add_anytypeobjs_(content_) super(ForwardTransition, self).buildChildren(child_, node, nodeName_, True) # end class ForwardTransition class OpenState(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(OpenState, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(OpenState, self).__init__(neuroLexId, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14833,6 +17330,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='O eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14846,32 +17345,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='O def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OpenState'): super(OpenState, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OpenState') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OpenState', fromsubclass_=False, pretty_print=True): - super(OpenState, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(OpenState, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(OpenState, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(OpenState, self).buildChildren(child_, node, nodeName_, True) pass # end class OpenState class ClosedState(Base): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ClosedState, self).__init__(neuro_lex_id, id, **kwargs_) + self.ns_prefix_ = None + super(ClosedState, self).__init__(neuroLexId, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14900,6 +17407,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14913,18 +17422,22 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ClosedState'): super(ClosedState, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ClosedState') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ClosedState', fromsubclass_=False, pretty_print=True): - super(ClosedState, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ClosedState, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ClosedState, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ClosedState, self).buildChildren(child_, node, nodeName_, True) pass # end class ClosedState @@ -14932,23 +17445,30 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class IonChannelKS(Standalone): """Kinetic scheme based ion channel.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': u'optional'}), - MemberSpec_('gate_kses', 'GateKS', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateKS', u'name': u'gateKS', u'minOccurs': u'0'}, None), + MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), + MemberSpec_('gateKS', 'GateKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateKS', 'type': 'GateKS'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, species=None, conductance=None, gate_kses=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, species=None, conductance=None, gateKS=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IonChannelKS, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(IonChannelKS, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.species = _cast(None, species) + self.species_nsprefix_ = None self.conductance = _cast(None, conductance) - if gate_kses is None: - self.gate_kses = [] + self.conductance_nsprefix_ = None + if gateKS is None: + self.gateKS = [] else: - self.gate_kses = gate_kses + self.gateKS = gateKS + self.gateKS_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14962,21 +17482,29 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( - self.gate_kses or + self.gateKS or super(IonChannelKS, self).hasContent_() ): return True @@ -14992,6 +17520,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15007,24 +17537,29 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IonChannelKS, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelKS') if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (quote_attrib(self.species), )) + outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) + outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelKS', fromsubclass_=False, pretty_print=True): - super(IonChannelKS, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(IonChannelKS, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for gateKS_ in self.gate_kses: + for gateKS_ in self.gateKS: + namespaceprefix_ = self.gateKS_nsprefix_ + ':' if (UseCapturedNS_ and self.gateKS_nsprefix_) else '' gateKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateKS', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('species', node) @@ -15038,30 +17573,35 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(IonChannelKS, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'gateKS': obj_ = GateKS.factory(parent_object_=self) - obj_.build(child_) - self.gate_kses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateKS.append(obj_) obj_.original_tagname_ = 'gateKS' super(IonChannelKS, self).buildChildren(child_, node, nodeName_, True) # end class IonChannelKS class IonChannelScalable(Standalone): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10_conductance_scalings', 'Q10ConductanceScaling', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Q10ConductanceScaling', u'name': u'q10ConductanceScaling', u'minOccurs': u'0'}, None), + MemberSpec_('q10ConductanceScaling', 'Q10ConductanceScaling', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'q10ConductanceScaling', 'type': 'Q10ConductanceScaling'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IonChannelScalable, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) - if q10_conductance_scalings is None: - self.q10_conductance_scalings = [] + self.ns_prefix_ = None + super(IonChannelScalable, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + if q10ConductanceScaling is None: + self.q10ConductanceScaling = [] else: - self.q10_conductance_scalings = q10_conductance_scalings + self.q10ConductanceScaling = q10ConductanceScaling + self.q10ConductanceScaling_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -15076,7 +17616,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.q10_conductance_scalings or + self.q10ConductanceScaling or super(IonChannelScalable, self).hasContent_() ): return True @@ -15092,6 +17632,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15100,390 +17642,470 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('>%s' % (eol_, )) self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='IonChannelScalable', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) - outfile.write('%s' % (namespaceprefix_, name_, eol_)) - else: - outfile.write('/>%s' % (eol_, )) - def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelScalable'): - super(IonChannelScalable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelScalable') - if self.extensiontype_ is not None and 'xsi:type' not in already_processed: - already_processed.add('xsi:type') - outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelScalable', fromsubclass_=False, pretty_print=True): - super(IonChannelScalable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - if pretty_print: - eol_ = '\n' - else: - eol_ = '' - for q10ConductanceScaling_ in self.q10_conductance_scalings: - q10ConductanceScaling_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10ConductanceScaling', pretty_print=pretty_print) - def build(self, node): - already_processed = set() - self.buildAttributes(node, node.attrib, already_processed) - for child in node: - nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) - return self - def buildAttributes(self, node, attrs, already_processed): - value = find_attr_value_('xsi:type', node) - if value is not None and 'xsi:type' not in already_processed: - already_processed.add('xsi:type') - self.extensiontype_ = value - super(IonChannelScalable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): - if nodeName_ == 'q10ConductanceScaling': - obj_ = Q10ConductanceScaling.factory(parent_object_=self) - obj_.build(child_) - self.q10_conductance_scalings.append(obj_) - obj_.original_tagname_ = 'q10ConductanceScaling' - super(IonChannelScalable, self).buildChildren(child_, node, nodeName_, True) -# end class IonChannelScalable - - -class NeuroMLDocument(Standalone): - member_data_items_ = [ - MemberSpec_('includes', 'IncludeType', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IncludeType', u'name': u'include', u'minOccurs': u'0'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), - MemberSpec_('intracellular_properties', 'IntracellularProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IntracellularProperties', u'name': u'intracellularProperties', u'minOccurs': u'0'}, None), - MemberSpec_('morphology', 'Morphology', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Morphology', u'name': u'morphology', u'minOccurs': u'0'}, None), - MemberSpec_('ion_channel', 'IonChannel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannel', u'name': u'ionChannel', u'minOccurs': u'0'}, None), - MemberSpec_('ion_channel_hhs', 'IonChannelHH', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelHH', u'name': u'ionChannelHH', u'minOccurs': u'0'}, None), - MemberSpec_('ion_channel_v_shifts', 'IonChannelVShift', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelVShift', u'name': u'ionChannelVShift', u'minOccurs': u'0'}, None), - MemberSpec_('ion_channel_kses', 'IonChannelKS', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelKS', u'name': u'ionChannelKS', u'minOccurs': u'0'}, None), - MemberSpec_('decaying_pool_concentration_models', 'DecayingPoolConcentrationModel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DecayingPoolConcentrationModel', u'name': u'decayingPoolConcentrationModel', u'minOccurs': u'0'}, None), - MemberSpec_('fixed_factor_concentration_models', 'FixedFactorConcentrationModel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FixedFactorConcentrationModel', u'name': u'fixedFactorConcentrationModel', u'minOccurs': u'0'}, None), - MemberSpec_('alpha_current_synapses', 'AlphaCurrentSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCurrentSynapse', u'name': u'alphaCurrentSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('alpha_synapses', 'AlphaSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaSynapse', u'name': u'alphaSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('exp_one_synapses', 'ExpOneSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpOneSynapse', u'name': u'expOneSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('exp_two_synapses', 'ExpTwoSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpTwoSynapse', u'name': u'expTwoSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('exp_three_synapses', 'ExpThreeSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpThreeSynapse', u'name': u'expThreeSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('blocking_plastic_synapses', 'BlockingPlasticSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BlockingPlasticSynapse', u'name': u'blockingPlasticSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('double_synapses', 'DoubleSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DoubleSynapse', u'name': u'doubleSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('gap_junctions', 'GapJunction', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GapJunction', u'name': u'gapJunction', u'minOccurs': u'0'}, None), - MemberSpec_('silent_synapses', 'SilentSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SilentSynapse', u'name': u'silentSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('linear_graded_synapses', 'LinearGradedSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'LinearGradedSynapse', u'name': u'linearGradedSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('graded_synapses', 'GradedSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GradedSynapse', u'name': u'gradedSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('biophysical_properties', 'BiophysicalProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BiophysicalProperties', u'name': u'biophysicalProperties', u'minOccurs': u'0'}, None), - MemberSpec_('cells', 'Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Cell', u'name': u'cell', u'minOccurs': u'0'}, None), - MemberSpec_('cell2_ca_poolses', 'Cell2CaPools', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Cell2CaPools', u'name': u'cell2CaPools', u'minOccurs': u'0'}, None), - MemberSpec_('base_cells', 'BaseCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BaseCell', u'name': u'baseCell', u'minOccurs': u'0'}, None), - MemberSpec_('iaf_tau_cells', 'IafTauCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafTauCell', u'name': u'iafTauCell', u'minOccurs': u'0'}, None), - MemberSpec_('iaf_tau_ref_cells', 'IafTauRefCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafTauRefCell', u'name': u'iafTauRefCell', u'minOccurs': u'0'}, None), - MemberSpec_('iaf_cells', 'IafCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafCell', u'name': u'iafCell', u'minOccurs': u'0'}, None), - MemberSpec_('iaf_ref_cells', 'IafRefCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafRefCell', u'name': u'iafRefCell', u'minOccurs': u'0'}, None), - MemberSpec_('izhikevich_cells', 'IzhikevichCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IzhikevichCell', u'name': u'izhikevichCell', u'minOccurs': u'0'}, None), - MemberSpec_('izhikevich2007_cells', 'Izhikevich2007Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Izhikevich2007Cell', u'name': u'izhikevich2007Cell', u'minOccurs': u'0'}, None), - MemberSpec_('ad_ex_ia_f_cells', 'AdExIaFCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AdExIaFCell', u'name': u'adExIaFCell', u'minOccurs': u'0'}, None), - MemberSpec_('fitz_hugh_nagumo_cells', 'FitzHughNagumoCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FitzHughNagumoCell', u'name': u'fitzHughNagumoCell', u'minOccurs': u'0'}, None), - MemberSpec_('fitz_hugh_nagumo1969_cells', 'FitzHughNagumo1969Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FitzHughNagumo1969Cell', u'name': u'fitzHughNagumo1969Cell', u'minOccurs': u'0'}, None), - MemberSpec_('pinsky_rinzel_ca3_cells', 'PinskyRinzelCA3Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PinskyRinzelCA3Cell', u'name': u'pinskyRinzelCA3Cell', u'minOccurs': u'0'}, None), - MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGenerator', u'name': u'pulseGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGeneratorDL', u'name': u'pulseGeneratorDL', u'minOccurs': u'0'}, None), - MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGenerator', u'name': u'sineGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGeneratorDL', u'name': u'sineGeneratorDL', u'minOccurs': u'0'}, None), - MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGenerator', u'name': u'rampGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGeneratorDL', u'name': u'rampGeneratorDL', u'minOccurs': u'0'}, None), - MemberSpec_('compound_inputs', 'CompoundInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CompoundInput', u'name': u'compoundInput', u'minOccurs': u'0'}, None), - MemberSpec_('compound_input_dls', 'CompoundInputDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CompoundInputDL', u'name': u'compoundInputDL', u'minOccurs': u'0'}, None), - MemberSpec_('voltage_clamps', 'VoltageClamp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VoltageClamp', u'name': u'voltageClamp', u'minOccurs': u'0'}, None), - MemberSpec_('voltage_clamp_triples', 'VoltageClampTriple', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VoltageClampTriple', u'name': u'voltageClampTriple', u'minOccurs': u'0'}, None), - MemberSpec_('spike_arrays', 'SpikeArray', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeArray', u'name': u'spikeArray', u'minOccurs': u'0'}, None), - MemberSpec_('timed_synaptic_inputs', 'TimedSynapticInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TimedSynapticInput', u'name': u'timedSynapticInput', u'minOccurs': u'0'}, None), - MemberSpec_('spike_generators', 'SpikeGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGenerator', u'name': u'spikeGenerator', u'minOccurs': u'0'}, None), - MemberSpec_('spike_generator_randoms', 'SpikeGeneratorRandom', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorRandom', u'name': u'spikeGeneratorRandom', u'minOccurs': u'0'}, None), - MemberSpec_('spike_generator_poissons', 'SpikeGeneratorPoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorPoisson', u'name': u'spikeGeneratorPoisson', u'minOccurs': u'0'}, None), - MemberSpec_('spike_generator_ref_poissons', 'SpikeGeneratorRefPoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorRefPoisson', u'name': u'spikeGeneratorRefPoisson', u'minOccurs': u'0'}, None), - MemberSpec_('poisson_firing_synapses', 'PoissonFiringSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PoissonFiringSynapse', u'name': u'poissonFiringSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('transient_poisson_firing_synapses', 'TransientPoissonFiringSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TransientPoissonFiringSynapse', u'name': u'transientPoissonFiringSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('IF_curr_alpha', 'IF_curr_alpha', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_curr_alpha', u'name': u'IF_curr_alpha', u'minOccurs': u'0'}, None), - MemberSpec_('IF_curr_exp', 'IF_curr_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_curr_exp', u'name': u'IF_curr_exp', u'minOccurs': u'0'}, None), - MemberSpec_('IF_cond_alpha', 'IF_cond_alpha', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_cond_alpha', u'name': u'IF_cond_alpha', u'minOccurs': u'0'}, None), - MemberSpec_('IF_cond_exp', 'IF_cond_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_cond_exp', u'name': u'IF_cond_exp', u'minOccurs': u'0'}, None), - MemberSpec_('EIF_cond_exp_isfa_ista', 'EIF_cond_exp_isfa_ista', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'EIF_cond_exp_isfa_ista', u'name': u'EIF_cond_exp_isfa_ista', u'minOccurs': u'0'}, None), - MemberSpec_('EIF_cond_alpha_isfa_ista', 'EIF_cond_alpha_isfa_ista', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'EIF_cond_alpha_isfa_ista', u'name': u'EIF_cond_alpha_isfa_ista', u'minOccurs': u'0'}, None), - MemberSpec_('HH_cond_exp', 'HH_cond_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'HH_cond_exp', u'name': u'HH_cond_exp', u'minOccurs': u'0'}, None), - MemberSpec_('exp_cond_synapses', 'ExpCondSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpCondSynapse', u'name': u'expCondSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('alpha_cond_synapses', 'AlphaCondSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCondSynapse', u'name': u'alphaCondSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('exp_curr_synapses', 'ExpCurrSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpCurrSynapse', u'name': u'expCurrSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('alpha_curr_synapses', 'AlphaCurrSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCurrSynapse', u'name': u'alphaCurrSynapse', u'minOccurs': u'0'}, None), - MemberSpec_('SpikeSourcePoisson', 'SpikeSourcePoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeSourcePoisson', u'name': u'SpikeSourcePoisson', u'minOccurs': u'0'}, None), - MemberSpec_('networks', 'Network', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Network', u'name': u'network', u'minOccurs': u'0'}, None), - MemberSpec_('ComponentType', 'ComponentType', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ComponentType', u'name': u'ComponentType', u'minOccurs': u'0'}, None), - ] - subclass = None - superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, includes=None, extracellular_properties=None, intracellular_properties=None, morphology=None, ion_channel=None, ion_channel_hhs=None, ion_channel_v_shifts=None, ion_channel_kses=None, decaying_pool_concentration_models=None, fixed_factor_concentration_models=None, alpha_current_synapses=None, alpha_synapses=None, exp_one_synapses=None, exp_two_synapses=None, exp_three_synapses=None, blocking_plastic_synapses=None, double_synapses=None, gap_junctions=None, silent_synapses=None, linear_graded_synapses=None, graded_synapses=None, biophysical_properties=None, cells=None, cell2_ca_poolses=None, base_cells=None, iaf_tau_cells=None, iaf_tau_ref_cells=None, iaf_cells=None, iaf_ref_cells=None, izhikevich_cells=None, izhikevich2007_cells=None, ad_ex_ia_f_cells=None, fitz_hugh_nagumo_cells=None, fitz_hugh_nagumo1969_cells=None, pinsky_rinzel_ca3_cells=None, pulse_generators=None, pulse_generator_dls=None, sine_generators=None, sine_generator_dls=None, ramp_generators=None, ramp_generator_dls=None, compound_inputs=None, compound_input_dls=None, voltage_clamps=None, voltage_clamp_triples=None, spike_arrays=None, timed_synaptic_inputs=None, spike_generators=None, spike_generator_randoms=None, spike_generator_poissons=None, spike_generator_ref_poissons=None, poisson_firing_synapses=None, transient_poisson_firing_synapses=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, exp_cond_synapses=None, alpha_cond_synapses=None, exp_curr_synapses=None, alpha_curr_synapses=None, SpikeSourcePoisson=None, networks=None, ComponentType=None, **kwargs_): - self.original_tagname_ = None - self.parent_object_ = kwargs_.get('parent_object_') - super(NeuroMLDocument, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - if includes is None: - self.includes = [] - else: - self.includes = includes - if extracellular_properties is None: - self.extracellular_properties = [] - else: - self.extracellular_properties = extracellular_properties - if intracellular_properties is None: - self.intracellular_properties = [] - else: - self.intracellular_properties = intracellular_properties - if morphology is None: - self.morphology = [] - else: - self.morphology = morphology - if ion_channel is None: - self.ion_channel = [] - else: - self.ion_channel = ion_channel - if ion_channel_hhs is None: - self.ion_channel_hhs = [] - else: - self.ion_channel_hhs = ion_channel_hhs - if ion_channel_v_shifts is None: - self.ion_channel_v_shifts = [] - else: - self.ion_channel_v_shifts = ion_channel_v_shifts - if ion_channel_kses is None: - self.ion_channel_kses = [] - else: - self.ion_channel_kses = ion_channel_kses - if decaying_pool_concentration_models is None: - self.decaying_pool_concentration_models = [] - else: - self.decaying_pool_concentration_models = decaying_pool_concentration_models - if fixed_factor_concentration_models is None: - self.fixed_factor_concentration_models = [] - else: - self.fixed_factor_concentration_models = fixed_factor_concentration_models - if alpha_current_synapses is None: - self.alpha_current_synapses = [] - else: - self.alpha_current_synapses = alpha_current_synapses - if alpha_synapses is None: - self.alpha_synapses = [] - else: - self.alpha_synapses = alpha_synapses - if exp_one_synapses is None: - self.exp_one_synapses = [] - else: - self.exp_one_synapses = exp_one_synapses - if exp_two_synapses is None: - self.exp_two_synapses = [] - else: - self.exp_two_synapses = exp_two_synapses - if exp_three_synapses is None: - self.exp_three_synapses = [] - else: - self.exp_three_synapses = exp_three_synapses - if blocking_plastic_synapses is None: - self.blocking_plastic_synapses = [] - else: - self.blocking_plastic_synapses = blocking_plastic_synapses - if double_synapses is None: - self.double_synapses = [] - else: - self.double_synapses = double_synapses - if gap_junctions is None: - self.gap_junctions = [] - else: - self.gap_junctions = gap_junctions - if silent_synapses is None: - self.silent_synapses = [] - else: - self.silent_synapses = silent_synapses - if linear_graded_synapses is None: - self.linear_graded_synapses = [] - else: - self.linear_graded_synapses = linear_graded_synapses - if graded_synapses is None: - self.graded_synapses = [] - else: - self.graded_synapses = graded_synapses - if biophysical_properties is None: - self.biophysical_properties = [] - else: - self.biophysical_properties = biophysical_properties - if cells is None: - self.cells = [] - else: - self.cells = cells - if cell2_ca_poolses is None: - self.cell2_ca_poolses = [] - else: - self.cell2_ca_poolses = cell2_ca_poolses - if base_cells is None: - self.base_cells = [] - else: - self.base_cells = base_cells - if iaf_tau_cells is None: - self.iaf_tau_cells = [] - else: - self.iaf_tau_cells = iaf_tau_cells - if iaf_tau_ref_cells is None: - self.iaf_tau_ref_cells = [] - else: - self.iaf_tau_ref_cells = iaf_tau_ref_cells - if iaf_cells is None: - self.iaf_cells = [] - else: - self.iaf_cells = iaf_cells - if iaf_ref_cells is None: - self.iaf_ref_cells = [] - else: - self.iaf_ref_cells = iaf_ref_cells - if izhikevich_cells is None: - self.izhikevich_cells = [] - else: - self.izhikevich_cells = izhikevich_cells - if izhikevich2007_cells is None: - self.izhikevich2007_cells = [] - else: - self.izhikevich2007_cells = izhikevich2007_cells - if ad_ex_ia_f_cells is None: - self.ad_ex_ia_f_cells = [] - else: - self.ad_ex_ia_f_cells = ad_ex_ia_f_cells - if fitz_hugh_nagumo_cells is None: - self.fitz_hugh_nagumo_cells = [] - else: - self.fitz_hugh_nagumo_cells = fitz_hugh_nagumo_cells - if fitz_hugh_nagumo1969_cells is None: - self.fitz_hugh_nagumo1969_cells = [] - else: - self.fitz_hugh_nagumo1969_cells = fitz_hugh_nagumo1969_cells - if pinsky_rinzel_ca3_cells is None: - self.pinsky_rinzel_ca3_cells = [] - else: - self.pinsky_rinzel_ca3_cells = pinsky_rinzel_ca3_cells - if pulse_generators is None: - self.pulse_generators = [] - else: - self.pulse_generators = pulse_generators - if pulse_generator_dls is None: - self.pulse_generator_dls = [] - else: - self.pulse_generator_dls = pulse_generator_dls - if sine_generators is None: - self.sine_generators = [] - else: - self.sine_generators = sine_generators - if sine_generator_dls is None: - self.sine_generator_dls = [] - else: - self.sine_generator_dls = sine_generator_dls - if ramp_generators is None: - self.ramp_generators = [] - else: - self.ramp_generators = ramp_generators - if ramp_generator_dls is None: - self.ramp_generator_dls = [] - else: - self.ramp_generator_dls = ramp_generator_dls - if compound_inputs is None: - self.compound_inputs = [] - else: - self.compound_inputs = compound_inputs - if compound_input_dls is None: - self.compound_input_dls = [] - else: - self.compound_input_dls = compound_input_dls - if voltage_clamps is None: - self.voltage_clamps = [] - else: - self.voltage_clamps = voltage_clamps - if voltage_clamp_triples is None: - self.voltage_clamp_triples = [] - else: - self.voltage_clamp_triples = voltage_clamp_triples - if spike_arrays is None: - self.spike_arrays = [] - else: - self.spike_arrays = spike_arrays - if timed_synaptic_inputs is None: - self.timed_synaptic_inputs = [] - else: - self.timed_synaptic_inputs = timed_synaptic_inputs - if spike_generators is None: - self.spike_generators = [] - else: - self.spike_generators = spike_generators - if spike_generator_randoms is None: - self.spike_generator_randoms = [] - else: - self.spike_generator_randoms = spike_generator_randoms - if spike_generator_poissons is None: - self.spike_generator_poissons = [] - else: - self.spike_generator_poissons = spike_generator_poissons - if spike_generator_ref_poissons is None: - self.spike_generator_ref_poissons = [] + outfile.write('%s' % (namespaceprefix_, name_, eol_)) else: - self.spike_generator_ref_poissons = spike_generator_ref_poissons - if poisson_firing_synapses is None: - self.poisson_firing_synapses = [] + outfile.write('/>%s' % (eol_, )) + def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelScalable'): + super(IonChannelScalable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelScalable') + if self.extensiontype_ is not None and 'xsi:type' not in already_processed: + already_processed.add('xsi:type') + outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelScalable', fromsubclass_=False, pretty_print=True): + super(IonChannelScalable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + if pretty_print: + eol_ = '\n' else: - self.poisson_firing_synapses = poisson_firing_synapses - if transient_poisson_firing_synapses is None: - self.transient_poisson_firing_synapses = [] + eol_ = '' + for q10ConductanceScaling_ in self.q10ConductanceScaling: + namespaceprefix_ = self.q10ConductanceScaling_nsprefix_ + ':' if (UseCapturedNS_ and self.q10ConductanceScaling_nsprefix_) else '' + q10ConductanceScaling_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10ConductanceScaling', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix + self.buildAttributes(node, node.attrib, already_processed) + for child in node: + nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + return self + def buildAttributes(self, node, attrs, already_processed): + value = find_attr_value_('xsi:type', node) + if value is not None and 'xsi:type' not in already_processed: + already_processed.add('xsi:type') + self.extensiontype_ = value + super(IonChannelScalable, self).buildAttributes(node, attrs, already_processed) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + if nodeName_ == 'q10ConductanceScaling': + obj_ = Q10ConductanceScaling.factory(parent_object_=self) + obj_.build(child_, gds_collector_=gds_collector_) + self.q10ConductanceScaling.append(obj_) + obj_.original_tagname_ = 'q10ConductanceScaling' + super(IonChannelScalable, self).buildChildren(child_, node, nodeName_, True) +# end class IonChannelScalable + + +class NeuroMLDocument(Standalone): + __hash__ = GeneratedsSuper.__hash__ + member_data_items_ = [ + MemberSpec_('include', 'IncludeType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'IncludeType'}, None), + MemberSpec_('extracellularProperties', 'ExtracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('intracellularProperties', 'IntracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), + MemberSpec_('morphology', 'Morphology', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), + MemberSpec_('ionChannel', 'IonChannel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannel', 'type': 'IonChannel'}, None), + MemberSpec_('ionChannelHH', 'IonChannelHH', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelHH', 'type': 'IonChannelHH'}, None), + MemberSpec_('ionChannelVShift', 'IonChannelVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelVShift', 'type': 'IonChannelVShift'}, None), + MemberSpec_('ionChannelKS', 'IonChannelKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelKS', 'type': 'IonChannelKS'}, None), + MemberSpec_('decayingPoolConcentrationModel', 'DecayingPoolConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'decayingPoolConcentrationModel', 'type': 'DecayingPoolConcentrationModel'}, None), + MemberSpec_('fixedFactorConcentrationModel', 'FixedFactorConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fixedFactorConcentrationModel', 'type': 'FixedFactorConcentrationModel'}, None), + MemberSpec_('alphaCurrentSynapse', 'AlphaCurrentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrentSynapse', 'type': 'AlphaCurrentSynapse'}, None), + MemberSpec_('alphaSynapse', 'AlphaSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaSynapse', 'type': 'AlphaSynapse'}, None), + MemberSpec_('expOneSynapse', 'ExpOneSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expOneSynapse', 'type': 'ExpOneSynapse'}, None), + MemberSpec_('expTwoSynapse', 'ExpTwoSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expTwoSynapse', 'type': 'ExpTwoSynapse'}, None), + MemberSpec_('expThreeSynapse', 'ExpThreeSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expThreeSynapse', 'type': 'ExpThreeSynapse'}, None), + MemberSpec_('blockingPlasticSynapse', 'BlockingPlasticSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'blockingPlasticSynapse', 'type': 'BlockingPlasticSynapse'}, None), + MemberSpec_('doubleSynapse', 'DoubleSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'doubleSynapse', 'type': 'DoubleSynapse'}, None), + MemberSpec_('gapJunction', 'GapJunction', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gapJunction', 'type': 'GapJunction'}, None), + MemberSpec_('silentSynapse', 'SilentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'silentSynapse', 'type': 'SilentSynapse'}, None), + MemberSpec_('linearGradedSynapse', 'LinearGradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'linearGradedSynapse', 'type': 'LinearGradedSynapse'}, None), + MemberSpec_('gradedSynapse', 'GradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gradedSynapse', 'type': 'GradedSynapse'}, None), + MemberSpec_('biophysicalProperties', 'BiophysicalProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), + MemberSpec_('cell', 'Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell', 'type': 'Cell'}, None), + MemberSpec_('cell2CaPools', 'Cell2CaPools', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell2CaPools', 'type': 'Cell2CaPools'}, None), + MemberSpec_('baseCell', 'BaseCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'baseCell', 'type': 'BaseCell'}, None), + MemberSpec_('iafTauCell', 'IafTauCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauCell', 'type': 'IafTauCell'}, None), + MemberSpec_('iafTauRefCell', 'IafTauRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauRefCell', 'type': 'IafTauRefCell'}, None), + MemberSpec_('iafCell', 'IafCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafCell', 'type': 'IafCell'}, None), + MemberSpec_('iafRefCell', 'IafRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafRefCell', 'type': 'IafRefCell'}, None), + MemberSpec_('izhikevichCell', 'IzhikevichCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevichCell', 'type': 'IzhikevichCell'}, None), + MemberSpec_('izhikevich2007Cell', 'Izhikevich2007Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevich2007Cell', 'type': 'Izhikevich2007Cell'}, None), + MemberSpec_('adExIaFCell', 'AdExIaFCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'adExIaFCell', 'type': 'AdExIaFCell'}, None), + MemberSpec_('fitzHughNagumoCell', 'FitzHughNagumoCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumoCell', 'type': 'FitzHughNagumoCell'}, None), + MemberSpec_('fitzHughNagumo1969Cell', 'FitzHughNagumo1969Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumo1969Cell', 'type': 'FitzHughNagumo1969Cell'}, None), + MemberSpec_('pinskyRinzelCA3Cell', 'PinskyRinzelCA3Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pinskyRinzelCA3Cell', 'type': 'PinskyRinzelCA3Cell'}, None), + MemberSpec_('pulseGenerator', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), + MemberSpec_('pulseGeneratorDL', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), + MemberSpec_('sineGenerator', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), + MemberSpec_('sineGeneratorDL', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), + MemberSpec_('rampGenerator', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), + MemberSpec_('rampGeneratorDL', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), + MemberSpec_('compoundInput', 'CompoundInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInput', 'type': 'CompoundInput'}, None), + MemberSpec_('compoundInputDL', 'CompoundInputDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInputDL', 'type': 'CompoundInputDL'}, None), + MemberSpec_('voltageClamp', 'VoltageClamp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClamp', 'type': 'VoltageClamp'}, None), + MemberSpec_('voltageClampTriple', 'VoltageClampTriple', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClampTriple', 'type': 'VoltageClampTriple'}, None), + MemberSpec_('spikeArray', 'SpikeArray', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeArray', 'type': 'SpikeArray'}, None), + MemberSpec_('timedSynapticInput', 'TimedSynapticInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'timedSynapticInput', 'type': 'TimedSynapticInput'}, None), + MemberSpec_('spikeGenerator', 'SpikeGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGenerator', 'type': 'SpikeGenerator'}, None), + MemberSpec_('spikeGeneratorRandom', 'SpikeGeneratorRandom', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRandom', 'type': 'SpikeGeneratorRandom'}, None), + MemberSpec_('spikeGeneratorPoisson', 'SpikeGeneratorPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorPoisson', 'type': 'SpikeGeneratorPoisson'}, None), + MemberSpec_('spikeGeneratorRefPoisson', 'SpikeGeneratorRefPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRefPoisson', 'type': 'SpikeGeneratorRefPoisson'}, None), + MemberSpec_('poissonFiringSynapse', 'PoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'poissonFiringSynapse', 'type': 'PoissonFiringSynapse'}, None), + MemberSpec_('transientPoissonFiringSynapse', 'TransientPoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'transientPoissonFiringSynapse', 'type': 'TransientPoissonFiringSynapse'}, None), + MemberSpec_('IF_curr_alpha', 'IF_curr_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_alpha', 'type': 'IF_curr_alpha'}, None), + MemberSpec_('IF_curr_exp', 'IF_curr_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_exp', 'type': 'IF_curr_exp'}, None), + MemberSpec_('IF_cond_alpha', 'IF_cond_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_cond_alpha', 'type': 'IF_cond_alpha'}, None), + MemberSpec_('IF_cond_exp', 'IF_cond_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_cond_exp', 'type': 'IF_cond_exp'}, None), + MemberSpec_('EIF_cond_exp_isfa_ista', 'EIF_cond_exp_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_exp_isfa_ista', 'type': 'EIF_cond_exp_isfa_ista'}, None), + MemberSpec_('EIF_cond_alpha_isfa_ista', 'EIF_cond_alpha_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_alpha_isfa_ista', 'type': 'EIF_cond_alpha_isfa_ista'}, None), + MemberSpec_('HH_cond_exp', 'HH_cond_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'HH_cond_exp', 'type': 'HH_cond_exp'}, None), + MemberSpec_('expCondSynapse', 'ExpCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCondSynapse', 'type': 'ExpCondSynapse'}, None), + MemberSpec_('alphaCondSynapse', 'AlphaCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCondSynapse', 'type': 'AlphaCondSynapse'}, None), + MemberSpec_('expCurrSynapse', 'ExpCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCurrSynapse', 'type': 'ExpCurrSynapse'}, None), + MemberSpec_('alphaCurrSynapse', 'AlphaCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrSynapse', 'type': 'AlphaCurrSynapse'}, None), + MemberSpec_('SpikeSourcePoisson', 'SpikeSourcePoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'SpikeSourcePoisson', 'type': 'SpikeSourcePoisson'}, None), + MemberSpec_('network', 'Network', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'network', 'type': 'Network'}, None), + MemberSpec_('ComponentType', 'ComponentType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ComponentType', 'type': 'ComponentType'}, None), + ] + subclass = None + superclass = Standalone + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, include=None, extracellularProperties=None, intracellularProperties=None, morphology=None, ionChannel=None, ionChannelHH=None, ionChannelVShift=None, ionChannelKS=None, decayingPoolConcentrationModel=None, fixedFactorConcentrationModel=None, alphaCurrentSynapse=None, alphaSynapse=None, expOneSynapse=None, expTwoSynapse=None, expThreeSynapse=None, blockingPlasticSynapse=None, doubleSynapse=None, gapJunction=None, silentSynapse=None, linearGradedSynapse=None, gradedSynapse=None, biophysicalProperties=None, cell=None, cell2CaPools=None, baseCell=None, iafTauCell=None, iafTauRefCell=None, iafCell=None, iafRefCell=None, izhikevichCell=None, izhikevich2007Cell=None, adExIaFCell=None, fitzHughNagumoCell=None, fitzHughNagumo1969Cell=None, pinskyRinzelCA3Cell=None, pulseGenerator=None, pulseGeneratorDL=None, sineGenerator=None, sineGeneratorDL=None, rampGenerator=None, rampGeneratorDL=None, compoundInput=None, compoundInputDL=None, voltageClamp=None, voltageClampTriple=None, spikeArray=None, timedSynapticInput=None, spikeGenerator=None, spikeGeneratorRandom=None, spikeGeneratorPoisson=None, spikeGeneratorRefPoisson=None, poissonFiringSynapse=None, transientPoissonFiringSynapse=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, expCondSynapse=None, alphaCondSynapse=None, expCurrSynapse=None, alphaCurrSynapse=None, SpikeSourcePoisson=None, network=None, ComponentType=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None + self.original_tagname_ = None + self.parent_object_ = kwargs_.get('parent_object_') + self.ns_prefix_ = None + super(NeuroMLDocument, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + if include is None: + self.include = [] + else: + self.include = include + self.include_nsprefix_ = None + if extracellularProperties is None: + self.extracellularProperties = [] + else: + self.extracellularProperties = extracellularProperties + self.extracellularProperties_nsprefix_ = None + if intracellularProperties is None: + self.intracellularProperties = [] + else: + self.intracellularProperties = intracellularProperties + self.intracellularProperties_nsprefix_ = None + if morphology is None: + self.morphology = [] else: - self.transient_poisson_firing_synapses = transient_poisson_firing_synapses + self.morphology = morphology + self.morphology_nsprefix_ = None + if ionChannel is None: + self.ionChannel = [] + else: + self.ionChannel = ionChannel + self.ionChannel_nsprefix_ = None + if ionChannelHH is None: + self.ionChannelHH = [] + else: + self.ionChannelHH = ionChannelHH + self.ionChannelHH_nsprefix_ = None + if ionChannelVShift is None: + self.ionChannelVShift = [] + else: + self.ionChannelVShift = ionChannelVShift + self.ionChannelVShift_nsprefix_ = None + if ionChannelKS is None: + self.ionChannelKS = [] + else: + self.ionChannelKS = ionChannelKS + self.ionChannelKS_nsprefix_ = None + if decayingPoolConcentrationModel is None: + self.decayingPoolConcentrationModel = [] + else: + self.decayingPoolConcentrationModel = decayingPoolConcentrationModel + self.decayingPoolConcentrationModel_nsprefix_ = None + if fixedFactorConcentrationModel is None: + self.fixedFactorConcentrationModel = [] + else: + self.fixedFactorConcentrationModel = fixedFactorConcentrationModel + self.fixedFactorConcentrationModel_nsprefix_ = None + if alphaCurrentSynapse is None: + self.alphaCurrentSynapse = [] + else: + self.alphaCurrentSynapse = alphaCurrentSynapse + self.alphaCurrentSynapse_nsprefix_ = None + if alphaSynapse is None: + self.alphaSynapse = [] + else: + self.alphaSynapse = alphaSynapse + self.alphaSynapse_nsprefix_ = None + if expOneSynapse is None: + self.expOneSynapse = [] + else: + self.expOneSynapse = expOneSynapse + self.expOneSynapse_nsprefix_ = None + if expTwoSynapse is None: + self.expTwoSynapse = [] + else: + self.expTwoSynapse = expTwoSynapse + self.expTwoSynapse_nsprefix_ = None + if expThreeSynapse is None: + self.expThreeSynapse = [] + else: + self.expThreeSynapse = expThreeSynapse + self.expThreeSynapse_nsprefix_ = None + if blockingPlasticSynapse is None: + self.blockingPlasticSynapse = [] + else: + self.blockingPlasticSynapse = blockingPlasticSynapse + self.blockingPlasticSynapse_nsprefix_ = None + if doubleSynapse is None: + self.doubleSynapse = [] + else: + self.doubleSynapse = doubleSynapse + self.doubleSynapse_nsprefix_ = None + if gapJunction is None: + self.gapJunction = [] + else: + self.gapJunction = gapJunction + self.gapJunction_nsprefix_ = None + if silentSynapse is None: + self.silentSynapse = [] + else: + self.silentSynapse = silentSynapse + self.silentSynapse_nsprefix_ = None + if linearGradedSynapse is None: + self.linearGradedSynapse = [] + else: + self.linearGradedSynapse = linearGradedSynapse + self.linearGradedSynapse_nsprefix_ = None + if gradedSynapse is None: + self.gradedSynapse = [] + else: + self.gradedSynapse = gradedSynapse + self.gradedSynapse_nsprefix_ = None + if biophysicalProperties is None: + self.biophysicalProperties = [] + else: + self.biophysicalProperties = biophysicalProperties + self.biophysicalProperties_nsprefix_ = None + if cell is None: + self.cell = [] + else: + self.cell = cell + self.cell_nsprefix_ = None + if cell2CaPools is None: + self.cell2CaPools = [] + else: + self.cell2CaPools = cell2CaPools + self.cell2CaPools_nsprefix_ = None + if baseCell is None: + self.baseCell = [] + else: + self.baseCell = baseCell + self.baseCell_nsprefix_ = None + if iafTauCell is None: + self.iafTauCell = [] + else: + self.iafTauCell = iafTauCell + self.iafTauCell_nsprefix_ = None + if iafTauRefCell is None: + self.iafTauRefCell = [] + else: + self.iafTauRefCell = iafTauRefCell + self.iafTauRefCell_nsprefix_ = None + if iafCell is None: + self.iafCell = [] + else: + self.iafCell = iafCell + self.iafCell_nsprefix_ = None + if iafRefCell is None: + self.iafRefCell = [] + else: + self.iafRefCell = iafRefCell + self.iafRefCell_nsprefix_ = None + if izhikevichCell is None: + self.izhikevichCell = [] + else: + self.izhikevichCell = izhikevichCell + self.izhikevichCell_nsprefix_ = None + if izhikevich2007Cell is None: + self.izhikevich2007Cell = [] + else: + self.izhikevich2007Cell = izhikevich2007Cell + self.izhikevich2007Cell_nsprefix_ = None + if adExIaFCell is None: + self.adExIaFCell = [] + else: + self.adExIaFCell = adExIaFCell + self.adExIaFCell_nsprefix_ = None + if fitzHughNagumoCell is None: + self.fitzHughNagumoCell = [] + else: + self.fitzHughNagumoCell = fitzHughNagumoCell + self.fitzHughNagumoCell_nsprefix_ = None + if fitzHughNagumo1969Cell is None: + self.fitzHughNagumo1969Cell = [] + else: + self.fitzHughNagumo1969Cell = fitzHughNagumo1969Cell + self.fitzHughNagumo1969Cell_nsprefix_ = None + if pinskyRinzelCA3Cell is None: + self.pinskyRinzelCA3Cell = [] + else: + self.pinskyRinzelCA3Cell = pinskyRinzelCA3Cell + self.pinskyRinzelCA3Cell_nsprefix_ = None + if pulseGenerator is None: + self.pulseGenerator = [] + else: + self.pulseGenerator = pulseGenerator + self.pulseGenerator_nsprefix_ = None + if pulseGeneratorDL is None: + self.pulseGeneratorDL = [] + else: + self.pulseGeneratorDL = pulseGeneratorDL + self.pulseGeneratorDL_nsprefix_ = None + if sineGenerator is None: + self.sineGenerator = [] + else: + self.sineGenerator = sineGenerator + self.sineGenerator_nsprefix_ = None + if sineGeneratorDL is None: + self.sineGeneratorDL = [] + else: + self.sineGeneratorDL = sineGeneratorDL + self.sineGeneratorDL_nsprefix_ = None + if rampGenerator is None: + self.rampGenerator = [] + else: + self.rampGenerator = rampGenerator + self.rampGenerator_nsprefix_ = None + if rampGeneratorDL is None: + self.rampGeneratorDL = [] + else: + self.rampGeneratorDL = rampGeneratorDL + self.rampGeneratorDL_nsprefix_ = None + if compoundInput is None: + self.compoundInput = [] + else: + self.compoundInput = compoundInput + self.compoundInput_nsprefix_ = None + if compoundInputDL is None: + self.compoundInputDL = [] + else: + self.compoundInputDL = compoundInputDL + self.compoundInputDL_nsprefix_ = None + if voltageClamp is None: + self.voltageClamp = [] + else: + self.voltageClamp = voltageClamp + self.voltageClamp_nsprefix_ = None + if voltageClampTriple is None: + self.voltageClampTriple = [] + else: + self.voltageClampTriple = voltageClampTriple + self.voltageClampTriple_nsprefix_ = None + if spikeArray is None: + self.spikeArray = [] + else: + self.spikeArray = spikeArray + self.spikeArray_nsprefix_ = None + if timedSynapticInput is None: + self.timedSynapticInput = [] + else: + self.timedSynapticInput = timedSynapticInput + self.timedSynapticInput_nsprefix_ = None + if spikeGenerator is None: + self.spikeGenerator = [] + else: + self.spikeGenerator = spikeGenerator + self.spikeGenerator_nsprefix_ = None + if spikeGeneratorRandom is None: + self.spikeGeneratorRandom = [] + else: + self.spikeGeneratorRandom = spikeGeneratorRandom + self.spikeGeneratorRandom_nsprefix_ = None + if spikeGeneratorPoisson is None: + self.spikeGeneratorPoisson = [] + else: + self.spikeGeneratorPoisson = spikeGeneratorPoisson + self.spikeGeneratorPoisson_nsprefix_ = None + if spikeGeneratorRefPoisson is None: + self.spikeGeneratorRefPoisson = [] + else: + self.spikeGeneratorRefPoisson = spikeGeneratorRefPoisson + self.spikeGeneratorRefPoisson_nsprefix_ = None + if poissonFiringSynapse is None: + self.poissonFiringSynapse = [] + else: + self.poissonFiringSynapse = poissonFiringSynapse + self.poissonFiringSynapse_nsprefix_ = None + if transientPoissonFiringSynapse is None: + self.transientPoissonFiringSynapse = [] + else: + self.transientPoissonFiringSynapse = transientPoissonFiringSynapse + self.transientPoissonFiringSynapse_nsprefix_ = None if IF_curr_alpha is None: self.IF_curr_alpha = [] else: self.IF_curr_alpha = IF_curr_alpha + self.IF_curr_alpha_nsprefix_ = None if IF_curr_exp is None: self.IF_curr_exp = [] else: self.IF_curr_exp = IF_curr_exp + self.IF_curr_exp_nsprefix_ = None if IF_cond_alpha is None: self.IF_cond_alpha = [] else: self.IF_cond_alpha = IF_cond_alpha + self.IF_cond_alpha_nsprefix_ = None if IF_cond_exp is None: self.IF_cond_exp = [] else: self.IF_cond_exp = IF_cond_exp + self.IF_cond_exp_nsprefix_ = None if EIF_cond_exp_isfa_ista is None: self.EIF_cond_exp_isfa_ista = [] else: self.EIF_cond_exp_isfa_ista = EIF_cond_exp_isfa_ista + self.EIF_cond_exp_isfa_ista_nsprefix_ = None if EIF_cond_alpha_isfa_ista is None: self.EIF_cond_alpha_isfa_ista = [] else: self.EIF_cond_alpha_isfa_ista = EIF_cond_alpha_isfa_ista + self.EIF_cond_alpha_isfa_ista_nsprefix_ = None if HH_cond_exp is None: self.HH_cond_exp = [] else: self.HH_cond_exp = HH_cond_exp - if exp_cond_synapses is None: - self.exp_cond_synapses = [] - else: - self.exp_cond_synapses = exp_cond_synapses - if alpha_cond_synapses is None: - self.alpha_cond_synapses = [] - else: - self.alpha_cond_synapses = alpha_cond_synapses - if exp_curr_synapses is None: - self.exp_curr_synapses = [] - else: - self.exp_curr_synapses = exp_curr_synapses - if alpha_curr_synapses is None: - self.alpha_curr_synapses = [] - else: - self.alpha_curr_synapses = alpha_curr_synapses + self.HH_cond_exp_nsprefix_ = None + if expCondSynapse is None: + self.expCondSynapse = [] + else: + self.expCondSynapse = expCondSynapse + self.expCondSynapse_nsprefix_ = None + if alphaCondSynapse is None: + self.alphaCondSynapse = [] + else: + self.alphaCondSynapse = alphaCondSynapse + self.alphaCondSynapse_nsprefix_ = None + if expCurrSynapse is None: + self.expCurrSynapse = [] + else: + self.expCurrSynapse = expCurrSynapse + self.expCurrSynapse_nsprefix_ = None + if alphaCurrSynapse is None: + self.alphaCurrSynapse = [] + else: + self.alphaCurrSynapse = alphaCurrSynapse + self.alphaCurrSynapse_nsprefix_ = None if SpikeSourcePoisson is None: self.SpikeSourcePoisson = [] else: self.SpikeSourcePoisson = SpikeSourcePoisson - if networks is None: - self.networks = [] + self.SpikeSourcePoisson_nsprefix_ = None + if network is None: + self.network = [] else: - self.networks = networks + self.network = network + self.network_nsprefix_ = None if ComponentType is None: self.ComponentType = [] else: self.ComponentType = ComponentType + self.ComponentType_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15497,59 +18119,59 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.includes or - self.extracellular_properties or - self.intracellular_properties or + self.include or + self.extracellularProperties or + self.intracellularProperties or self.morphology or - self.ion_channel or - self.ion_channel_hhs or - self.ion_channel_v_shifts or - self.ion_channel_kses or - self.decaying_pool_concentration_models or - self.fixed_factor_concentration_models or - self.alpha_current_synapses or - self.alpha_synapses or - self.exp_one_synapses or - self.exp_two_synapses or - self.exp_three_synapses or - self.blocking_plastic_synapses or - self.double_synapses or - self.gap_junctions or - self.silent_synapses or - self.linear_graded_synapses or - self.graded_synapses or - self.biophysical_properties or - self.cells or - self.cell2_ca_poolses or - self.base_cells or - self.iaf_tau_cells or - self.iaf_tau_ref_cells or - self.iaf_cells or - self.iaf_ref_cells or - self.izhikevich_cells or - self.izhikevich2007_cells or - self.ad_ex_ia_f_cells or - self.fitz_hugh_nagumo_cells or - self.fitz_hugh_nagumo1969_cells or - self.pinsky_rinzel_ca3_cells or - self.pulse_generators or - self.pulse_generator_dls or - self.sine_generators or - self.sine_generator_dls or - self.ramp_generators or - self.ramp_generator_dls or - self.compound_inputs or - self.compound_input_dls or - self.voltage_clamps or - self.voltage_clamp_triples or - self.spike_arrays or - self.timed_synaptic_inputs or - self.spike_generators or - self.spike_generator_randoms or - self.spike_generator_poissons or - self.spike_generator_ref_poissons or - self.poisson_firing_synapses or - self.transient_poisson_firing_synapses or + self.ionChannel or + self.ionChannelHH or + self.ionChannelVShift or + self.ionChannelKS or + self.decayingPoolConcentrationModel or + self.fixedFactorConcentrationModel or + self.alphaCurrentSynapse or + self.alphaSynapse or + self.expOneSynapse or + self.expTwoSynapse or + self.expThreeSynapse or + self.blockingPlasticSynapse or + self.doubleSynapse or + self.gapJunction or + self.silentSynapse or + self.linearGradedSynapse or + self.gradedSynapse or + self.biophysicalProperties or + self.cell or + self.cell2CaPools or + self.baseCell or + self.iafTauCell or + self.iafTauRefCell or + self.iafCell or + self.iafRefCell or + self.izhikevichCell or + self.izhikevich2007Cell or + self.adExIaFCell or + self.fitzHughNagumoCell or + self.fitzHughNagumo1969Cell or + self.pinskyRinzelCA3Cell or + self.pulseGenerator or + self.pulseGeneratorDL or + self.sineGenerator or + self.sineGeneratorDL or + self.rampGenerator or + self.rampGeneratorDL or + self.compoundInput or + self.compoundInputDL or + self.voltageClamp or + self.voltageClampTriple or + self.spikeArray or + self.timedSynapticInput or + self.spikeGenerator or + self.spikeGeneratorRandom or + self.spikeGeneratorPoisson or + self.spikeGeneratorRefPoisson or + self.poissonFiringSynapse or + self.transientPoissonFiringSynapse or self.IF_curr_alpha or self.IF_curr_exp or self.IF_cond_alpha or @@ -15557,12 +18179,12 @@ def hasContent_(self): self.EIF_cond_exp_isfa_ista or self.EIF_cond_alpha_isfa_ista or self.HH_cond_exp or - self.exp_cond_synapses or - self.alpha_cond_synapses or - self.exp_curr_synapses or - self.alpha_curr_synapses or + self.expCondSynapse or + self.alphaCondSynapse or + self.expCurrSynapse or + self.alphaCurrSynapse or self.SpikeSourcePoisson or - self.networks or + self.network or self.ComponentType or super(NeuroMLDocument, self).hasContent_() ): @@ -15579,6 +18201,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15593,498 +18217,569 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NeuroMLDocument'): super(NeuroMLDocument, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NeuroMLDocument') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NeuroMLDocument', fromsubclass_=False, pretty_print=True): - super(NeuroMLDocument, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(NeuroMLDocument, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for include_ in self.includes: + for include_ in self.include: + namespaceprefix_ = self.include_nsprefix_ + ':' if (UseCapturedNS_ and self.include_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) - for extracellularProperties_ in self.extracellular_properties: + for extracellularProperties_ in self.extracellularProperties: + namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - for intracellularProperties_ in self.intracellular_properties: + for intracellularProperties_ in self.intracellularProperties: + namespaceprefix_ = self.intracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties_nsprefix_) else '' intracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) for morphology_ in self.morphology: + namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' morphology_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) - for ionChannel_ in self.ion_channel: + for ionChannel_ in self.ionChannel: + namespaceprefix_ = self.ionChannel_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannel_nsprefix_) else '' ionChannel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannel', pretty_print=pretty_print) - for ionChannelHH_ in self.ion_channel_hhs: + for ionChannelHH_ in self.ionChannelHH: + namespaceprefix_ = self.ionChannelHH_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelHH_nsprefix_) else '' ionChannelHH_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelHH', pretty_print=pretty_print) - for ionChannelVShift_ in self.ion_channel_v_shifts: + for ionChannelVShift_ in self.ionChannelVShift: + namespaceprefix_ = self.ionChannelVShift_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelVShift_nsprefix_) else '' ionChannelVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelVShift', pretty_print=pretty_print) - for ionChannelKS_ in self.ion_channel_kses: + for ionChannelKS_ in self.ionChannelKS: + namespaceprefix_ = self.ionChannelKS_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelKS_nsprefix_) else '' ionChannelKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelKS', pretty_print=pretty_print) - for decayingPoolConcentrationModel_ in self.decaying_pool_concentration_models: + for decayingPoolConcentrationModel_ in self.decayingPoolConcentrationModel: + namespaceprefix_ = self.decayingPoolConcentrationModel_nsprefix_ + ':' if (UseCapturedNS_ and self.decayingPoolConcentrationModel_nsprefix_) else '' decayingPoolConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='decayingPoolConcentrationModel', pretty_print=pretty_print) - for fixedFactorConcentrationModel_ in self.fixed_factor_concentration_models: + for fixedFactorConcentrationModel_ in self.fixedFactorConcentrationModel: + namespaceprefix_ = self.fixedFactorConcentrationModel_nsprefix_ + ':' if (UseCapturedNS_ and self.fixedFactorConcentrationModel_nsprefix_) else '' fixedFactorConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fixedFactorConcentrationModel', pretty_print=pretty_print) - for alphaCurrentSynapse_ in self.alpha_current_synapses: + for alphaCurrentSynapse_ in self.alphaCurrentSynapse: + namespaceprefix_ = self.alphaCurrentSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCurrentSynapse_nsprefix_) else '' alphaCurrentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrentSynapse', pretty_print=pretty_print) - for alphaSynapse_ in self.alpha_synapses: + for alphaSynapse_ in self.alphaSynapse: + namespaceprefix_ = self.alphaSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaSynapse_nsprefix_) else '' alphaSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaSynapse', pretty_print=pretty_print) - for expOneSynapse_ in self.exp_one_synapses: + for expOneSynapse_ in self.expOneSynapse: + namespaceprefix_ = self.expOneSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expOneSynapse_nsprefix_) else '' expOneSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expOneSynapse', pretty_print=pretty_print) - for expTwoSynapse_ in self.exp_two_synapses: + for expTwoSynapse_ in self.expTwoSynapse: + namespaceprefix_ = self.expTwoSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expTwoSynapse_nsprefix_) else '' expTwoSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expTwoSynapse', pretty_print=pretty_print) - for expThreeSynapse_ in self.exp_three_synapses: + for expThreeSynapse_ in self.expThreeSynapse: + namespaceprefix_ = self.expThreeSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expThreeSynapse_nsprefix_) else '' expThreeSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expThreeSynapse', pretty_print=pretty_print) - for blockingPlasticSynapse_ in self.blocking_plastic_synapses: + for blockingPlasticSynapse_ in self.blockingPlasticSynapse: + namespaceprefix_ = self.blockingPlasticSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.blockingPlasticSynapse_nsprefix_) else '' blockingPlasticSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockingPlasticSynapse', pretty_print=pretty_print) - for doubleSynapse_ in self.double_synapses: + for doubleSynapse_ in self.doubleSynapse: + namespaceprefix_ = self.doubleSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.doubleSynapse_nsprefix_) else '' doubleSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='doubleSynapse', pretty_print=pretty_print) - for gapJunction_ in self.gap_junctions: + for gapJunction_ in self.gapJunction: + namespaceprefix_ = self.gapJunction_nsprefix_ + ':' if (UseCapturedNS_ and self.gapJunction_nsprefix_) else '' gapJunction_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gapJunction', pretty_print=pretty_print) - for silentSynapse_ in self.silent_synapses: + for silentSynapse_ in self.silentSynapse: + namespaceprefix_ = self.silentSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.silentSynapse_nsprefix_) else '' silentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='silentSynapse', pretty_print=pretty_print) - for linearGradedSynapse_ in self.linear_graded_synapses: + for linearGradedSynapse_ in self.linearGradedSynapse: + namespaceprefix_ = self.linearGradedSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.linearGradedSynapse_nsprefix_) else '' linearGradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linearGradedSynapse', pretty_print=pretty_print) - for gradedSynapse_ in self.graded_synapses: + for gradedSynapse_ in self.gradedSynapse: + namespaceprefix_ = self.gradedSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.gradedSynapse_nsprefix_) else '' gradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gradedSynapse', pretty_print=pretty_print) - for biophysicalProperties_ in self.biophysical_properties: + for biophysicalProperties_ in self.biophysicalProperties: + namespaceprefix_ = self.biophysicalProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties_nsprefix_) else '' biophysicalProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) - for cell_ in self.cells: + for cell_ in self.cell: + namespaceprefix_ = self.cell_nsprefix_ + ':' if (UseCapturedNS_ and self.cell_nsprefix_) else '' cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell', pretty_print=pretty_print) - for cell2CaPools_ in self.cell2_ca_poolses: + for cell2CaPools_ in self.cell2CaPools: + namespaceprefix_ = self.cell2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.cell2CaPools_nsprefix_) else '' cell2CaPools_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell2CaPools', pretty_print=pretty_print) - for baseCell_ in self.base_cells: + for baseCell_ in self.baseCell: + namespaceprefix_ = self.baseCell_nsprefix_ + ':' if (UseCapturedNS_ and self.baseCell_nsprefix_) else '' baseCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='baseCell', pretty_print=pretty_print) - for iafTauCell_ in self.iaf_tau_cells: + for iafTauCell_ in self.iafTauCell: + namespaceprefix_ = self.iafTauCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafTauCell_nsprefix_) else '' iafTauCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauCell', pretty_print=pretty_print) - for iafTauRefCell_ in self.iaf_tau_ref_cells: + for iafTauRefCell_ in self.iafTauRefCell: + namespaceprefix_ = self.iafTauRefCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafTauRefCell_nsprefix_) else '' iafTauRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauRefCell', pretty_print=pretty_print) - for iafCell_ in self.iaf_cells: + for iafCell_ in self.iafCell: + namespaceprefix_ = self.iafCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafCell_nsprefix_) else '' iafCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafCell', pretty_print=pretty_print) - for iafRefCell_ in self.iaf_ref_cells: + for iafRefCell_ in self.iafRefCell: + namespaceprefix_ = self.iafRefCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafRefCell_nsprefix_) else '' iafRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafRefCell', pretty_print=pretty_print) - for izhikevichCell_ in self.izhikevich_cells: + for izhikevichCell_ in self.izhikevichCell: + namespaceprefix_ = self.izhikevichCell_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevichCell_nsprefix_) else '' izhikevichCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevichCell', pretty_print=pretty_print) - for izhikevich2007Cell_ in self.izhikevich2007_cells: + for izhikevich2007Cell_ in self.izhikevich2007Cell: + namespaceprefix_ = self.izhikevich2007Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich2007Cell_nsprefix_) else '' izhikevich2007Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevich2007Cell', pretty_print=pretty_print) - for adExIaFCell_ in self.ad_ex_ia_f_cells: + for adExIaFCell_ in self.adExIaFCell: + namespaceprefix_ = self.adExIaFCell_nsprefix_ + ':' if (UseCapturedNS_ and self.adExIaFCell_nsprefix_) else '' adExIaFCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='adExIaFCell', pretty_print=pretty_print) - for fitzHughNagumoCell_ in self.fitz_hugh_nagumo_cells: + for fitzHughNagumoCell_ in self.fitzHughNagumoCell: + namespaceprefix_ = self.fitzHughNagumoCell_nsprefix_ + ':' if (UseCapturedNS_ and self.fitzHughNagumoCell_nsprefix_) else '' fitzHughNagumoCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumoCell', pretty_print=pretty_print) - for fitzHughNagumo1969Cell_ in self.fitz_hugh_nagumo1969_cells: + for fitzHughNagumo1969Cell_ in self.fitzHughNagumo1969Cell: + namespaceprefix_ = self.fitzHughNagumo1969Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.fitzHughNagumo1969Cell_nsprefix_) else '' fitzHughNagumo1969Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumo1969Cell', pretty_print=pretty_print) - for pinskyRinzelCA3Cell_ in self.pinsky_rinzel_ca3_cells: + for pinskyRinzelCA3Cell_ in self.pinskyRinzelCA3Cell: + namespaceprefix_ = self.pinskyRinzelCA3Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.pinskyRinzelCA3Cell_nsprefix_) else '' pinskyRinzelCA3Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pinskyRinzelCA3Cell', pretty_print=pretty_print) - for pulseGenerator_ in self.pulse_generators: + for pulseGenerator_ in self.pulseGenerator: + namespaceprefix_ = self.pulseGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGenerator_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) - for pulseGeneratorDL_ in self.pulse_generator_dls: + for pulseGeneratorDL_ in self.pulseGeneratorDL: + namespaceprefix_ = self.pulseGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGeneratorDL_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) - for sineGenerator_ in self.sine_generators: + for sineGenerator_ in self.sineGenerator: + namespaceprefix_ = self.sineGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGenerator_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) - for sineGeneratorDL_ in self.sine_generator_dls: + for sineGeneratorDL_ in self.sineGeneratorDL: + namespaceprefix_ = self.sineGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGeneratorDL_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) - for rampGenerator_ in self.ramp_generators: + for rampGenerator_ in self.rampGenerator: + namespaceprefix_ = self.rampGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGenerator_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) - for rampGeneratorDL_ in self.ramp_generator_dls: + for rampGeneratorDL_ in self.rampGeneratorDL: + namespaceprefix_ = self.rampGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGeneratorDL_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) - for compoundInput_ in self.compound_inputs: + for compoundInput_ in self.compoundInput: + namespaceprefix_ = self.compoundInput_nsprefix_ + ':' if (UseCapturedNS_ and self.compoundInput_nsprefix_) else '' compoundInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInput', pretty_print=pretty_print) - for compoundInputDL_ in self.compound_input_dls: + for compoundInputDL_ in self.compoundInputDL: + namespaceprefix_ = self.compoundInputDL_nsprefix_ + ':' if (UseCapturedNS_ and self.compoundInputDL_nsprefix_) else '' compoundInputDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInputDL', pretty_print=pretty_print) - for voltageClamp_ in self.voltage_clamps: + for voltageClamp_ in self.voltageClamp: + namespaceprefix_ = self.voltageClamp_nsprefix_ + ':' if (UseCapturedNS_ and self.voltageClamp_nsprefix_) else '' voltageClamp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClamp', pretty_print=pretty_print) - for voltageClampTriple_ in self.voltage_clamp_triples: + for voltageClampTriple_ in self.voltageClampTriple: + namespaceprefix_ = self.voltageClampTriple_nsprefix_ + ':' if (UseCapturedNS_ and self.voltageClampTriple_nsprefix_) else '' voltageClampTriple_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClampTriple', pretty_print=pretty_print) - for spikeArray_ in self.spike_arrays: + for spikeArray_ in self.spikeArray: + namespaceprefix_ = self.spikeArray_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeArray_nsprefix_) else '' spikeArray_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeArray', pretty_print=pretty_print) - for timedSynapticInput_ in self.timed_synaptic_inputs: + for timedSynapticInput_ in self.timedSynapticInput: + namespaceprefix_ = self.timedSynapticInput_nsprefix_ + ':' if (UseCapturedNS_ and self.timedSynapticInput_nsprefix_) else '' timedSynapticInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timedSynapticInput', pretty_print=pretty_print) - for spikeGenerator_ in self.spike_generators: + for spikeGenerator_ in self.spikeGenerator: + namespaceprefix_ = self.spikeGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGenerator_nsprefix_) else '' spikeGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGenerator', pretty_print=pretty_print) - for spikeGeneratorRandom_ in self.spike_generator_randoms: + for spikeGeneratorRandom_ in self.spikeGeneratorRandom: + namespaceprefix_ = self.spikeGeneratorRandom_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorRandom_nsprefix_) else '' spikeGeneratorRandom_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRandom', pretty_print=pretty_print) - for spikeGeneratorPoisson_ in self.spike_generator_poissons: + for spikeGeneratorPoisson_ in self.spikeGeneratorPoisson: + namespaceprefix_ = self.spikeGeneratorPoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorPoisson_nsprefix_) else '' spikeGeneratorPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorPoisson', pretty_print=pretty_print) - for spikeGeneratorRefPoisson_ in self.spike_generator_ref_poissons: + for spikeGeneratorRefPoisson_ in self.spikeGeneratorRefPoisson: + namespaceprefix_ = self.spikeGeneratorRefPoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorRefPoisson_nsprefix_) else '' spikeGeneratorRefPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRefPoisson', pretty_print=pretty_print) - for poissonFiringSynapse_ in self.poisson_firing_synapses: + for poissonFiringSynapse_ in self.poissonFiringSynapse: + namespaceprefix_ = self.poissonFiringSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.poissonFiringSynapse_nsprefix_) else '' poissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='poissonFiringSynapse', pretty_print=pretty_print) - for transientPoissonFiringSynapse_ in self.transient_poisson_firing_synapses: + for transientPoissonFiringSynapse_ in self.transientPoissonFiringSynapse: + namespaceprefix_ = self.transientPoissonFiringSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.transientPoissonFiringSynapse_nsprefix_) else '' transientPoissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='transientPoissonFiringSynapse', pretty_print=pretty_print) for IF_curr_alpha_ in self.IF_curr_alpha: + namespaceprefix_ = self.IF_curr_alpha_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_curr_alpha_nsprefix_) else '' IF_curr_alpha_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_curr_alpha', pretty_print=pretty_print) for IF_curr_exp_ in self.IF_curr_exp: + namespaceprefix_ = self.IF_curr_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_curr_exp_nsprefix_) else '' IF_curr_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_curr_exp', pretty_print=pretty_print) for IF_cond_alpha_ in self.IF_cond_alpha: + namespaceprefix_ = self.IF_cond_alpha_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_cond_alpha_nsprefix_) else '' IF_cond_alpha_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_cond_alpha', pretty_print=pretty_print) for IF_cond_exp_ in self.IF_cond_exp: + namespaceprefix_ = self.IF_cond_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_cond_exp_nsprefix_) else '' IF_cond_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_cond_exp', pretty_print=pretty_print) for EIF_cond_exp_isfa_ista_ in self.EIF_cond_exp_isfa_ista: + namespaceprefix_ = self.EIF_cond_exp_isfa_ista_nsprefix_ + ':' if (UseCapturedNS_ and self.EIF_cond_exp_isfa_ista_nsprefix_) else '' EIF_cond_exp_isfa_ista_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EIF_cond_exp_isfa_ista', pretty_print=pretty_print) for EIF_cond_alpha_isfa_ista_ in self.EIF_cond_alpha_isfa_ista: + namespaceprefix_ = self.EIF_cond_alpha_isfa_ista_nsprefix_ + ':' if (UseCapturedNS_ and self.EIF_cond_alpha_isfa_ista_nsprefix_) else '' EIF_cond_alpha_isfa_ista_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EIF_cond_alpha_isfa_ista', pretty_print=pretty_print) for HH_cond_exp_ in self.HH_cond_exp: + namespaceprefix_ = self.HH_cond_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.HH_cond_exp_nsprefix_) else '' HH_cond_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='HH_cond_exp', pretty_print=pretty_print) - for expCondSynapse_ in self.exp_cond_synapses: + for expCondSynapse_ in self.expCondSynapse: + namespaceprefix_ = self.expCondSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expCondSynapse_nsprefix_) else '' expCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCondSynapse', pretty_print=pretty_print) - for alphaCondSynapse_ in self.alpha_cond_synapses: + for alphaCondSynapse_ in self.alphaCondSynapse: + namespaceprefix_ = self.alphaCondSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCondSynapse_nsprefix_) else '' alphaCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCondSynapse', pretty_print=pretty_print) - for expCurrSynapse_ in self.exp_curr_synapses: + for expCurrSynapse_ in self.expCurrSynapse: + namespaceprefix_ = self.expCurrSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expCurrSynapse_nsprefix_) else '' expCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCurrSynapse', pretty_print=pretty_print) - for alphaCurrSynapse_ in self.alpha_curr_synapses: + for alphaCurrSynapse_ in self.alphaCurrSynapse: + namespaceprefix_ = self.alphaCurrSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCurrSynapse_nsprefix_) else '' alphaCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrSynapse', pretty_print=pretty_print) for SpikeSourcePoisson_ in self.SpikeSourcePoisson: + namespaceprefix_ = self.SpikeSourcePoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.SpikeSourcePoisson_nsprefix_) else '' SpikeSourcePoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpikeSourcePoisson', pretty_print=pretty_print) - for network_ in self.networks: + for network_ in self.network: + namespaceprefix_ = self.network_nsprefix_ + ':' if (UseCapturedNS_ and self.network_nsprefix_) else '' network_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='network', pretty_print=pretty_print) for ComponentType_ in self.ComponentType: + namespaceprefix_ = self.ComponentType_nsprefix_ + ':' if (UseCapturedNS_ and self.ComponentType_nsprefix_) else '' ComponentType_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ComponentType', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(NeuroMLDocument, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'include': obj_ = IncludeType.factory(parent_object_=self) - obj_.build(child_) - self.includes.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.include.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_) - self.extracellular_properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.extracellularProperties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.intracellular_properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.intracellularProperties.append(obj_) obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'morphology': obj_ = Morphology.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.morphology.append(obj_) obj_.original_tagname_ = 'morphology' elif nodeName_ == 'ionChannel': class_obj_ = self.get_class_obj_(child_, IonChannel) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.ion_channel.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.ionChannel.append(obj_) obj_.original_tagname_ = 'ionChannel' elif nodeName_ == 'ionChannelHH': obj_ = IonChannelHH.factory(parent_object_=self) - obj_.build(child_) - self.ion_channel_hhs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.ionChannelHH.append(obj_) obj_.original_tagname_ = 'ionChannelHH' elif nodeName_ == 'ionChannelVShift': obj_ = IonChannelVShift.factory(parent_object_=self) - obj_.build(child_) - self.ion_channel_v_shifts.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.ionChannelVShift.append(obj_) obj_.original_tagname_ = 'ionChannelVShift' elif nodeName_ == 'ionChannelKS': obj_ = IonChannelKS.factory(parent_object_=self) - obj_.build(child_) - self.ion_channel_kses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.ionChannelKS.append(obj_) obj_.original_tagname_ = 'ionChannelKS' elif nodeName_ == 'decayingPoolConcentrationModel': class_obj_ = self.get_class_obj_(child_, DecayingPoolConcentrationModel) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.decaying_pool_concentration_models.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.decayingPoolConcentrationModel.append(obj_) obj_.original_tagname_ = 'decayingPoolConcentrationModel' elif nodeName_ == 'fixedFactorConcentrationModel': obj_ = FixedFactorConcentrationModel.factory(parent_object_=self) - obj_.build(child_) - self.fixed_factor_concentration_models.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.fixedFactorConcentrationModel.append(obj_) obj_.original_tagname_ = 'fixedFactorConcentrationModel' elif nodeName_ == 'alphaCurrentSynapse': obj_ = AlphaCurrentSynapse.factory(parent_object_=self) - obj_.build(child_) - self.alpha_current_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.alphaCurrentSynapse.append(obj_) obj_.original_tagname_ = 'alphaCurrentSynapse' elif nodeName_ == 'alphaSynapse': obj_ = AlphaSynapse.factory(parent_object_=self) - obj_.build(child_) - self.alpha_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.alphaSynapse.append(obj_) obj_.original_tagname_ = 'alphaSynapse' elif nodeName_ == 'expOneSynapse': obj_ = ExpOneSynapse.factory(parent_object_=self) - obj_.build(child_) - self.exp_one_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.expOneSynapse.append(obj_) obj_.original_tagname_ = 'expOneSynapse' elif nodeName_ == 'expTwoSynapse': class_obj_ = self.get_class_obj_(child_, ExpTwoSynapse) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.exp_two_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.expTwoSynapse.append(obj_) obj_.original_tagname_ = 'expTwoSynapse' elif nodeName_ == 'expThreeSynapse': obj_ = ExpThreeSynapse.factory(parent_object_=self) - obj_.build(child_) - self.exp_three_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.expThreeSynapse.append(obj_) obj_.original_tagname_ = 'expThreeSynapse' elif nodeName_ == 'blockingPlasticSynapse': obj_ = BlockingPlasticSynapse.factory(parent_object_=self) - obj_.build(child_) - self.blocking_plastic_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.blockingPlasticSynapse.append(obj_) obj_.original_tagname_ = 'blockingPlasticSynapse' elif nodeName_ == 'doubleSynapse': obj_ = DoubleSynapse.factory(parent_object_=self) - obj_.build(child_) - self.double_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.doubleSynapse.append(obj_) obj_.original_tagname_ = 'doubleSynapse' elif nodeName_ == 'gapJunction': obj_ = GapJunction.factory(parent_object_=self) - obj_.build(child_) - self.gap_junctions.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gapJunction.append(obj_) obj_.original_tagname_ = 'gapJunction' elif nodeName_ == 'silentSynapse': obj_ = SilentSynapse.factory(parent_object_=self) - obj_.build(child_) - self.silent_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.silentSynapse.append(obj_) obj_.original_tagname_ = 'silentSynapse' elif nodeName_ == 'linearGradedSynapse': obj_ = LinearGradedSynapse.factory(parent_object_=self) - obj_.build(child_) - self.linear_graded_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.linearGradedSynapse.append(obj_) obj_.original_tagname_ = 'linearGradedSynapse' elif nodeName_ == 'gradedSynapse': obj_ = GradedSynapse.factory(parent_object_=self) - obj_.build(child_) - self.graded_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gradedSynapse.append(obj_) obj_.original_tagname_ = 'gradedSynapse' elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) - obj_.build(child_) - self.biophysical_properties.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.biophysicalProperties.append(obj_) obj_.original_tagname_ = 'biophysicalProperties' elif nodeName_ == 'cell': class_obj_ = self.get_class_obj_(child_, Cell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.cell.append(obj_) obj_.original_tagname_ = 'cell' elif nodeName_ == 'cell2CaPools': obj_ = Cell2CaPools.factory(parent_object_=self) - obj_.build(child_) - self.cell2_ca_poolses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.cell2CaPools.append(obj_) obj_.original_tagname_ = 'cell2CaPools' elif nodeName_ == 'baseCell': class_obj_ = self.get_class_obj_(child_, BaseCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.base_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.baseCell.append(obj_) obj_.original_tagname_ = 'baseCell' elif nodeName_ == 'iafTauCell': class_obj_ = self.get_class_obj_(child_, IafTauCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.iaf_tau_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.iafTauCell.append(obj_) obj_.original_tagname_ = 'iafTauCell' elif nodeName_ == 'iafTauRefCell': obj_ = IafTauRefCell.factory(parent_object_=self) - obj_.build(child_) - self.iaf_tau_ref_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.iafTauRefCell.append(obj_) obj_.original_tagname_ = 'iafTauRefCell' elif nodeName_ == 'iafCell': class_obj_ = self.get_class_obj_(child_, IafCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.iaf_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.iafCell.append(obj_) obj_.original_tagname_ = 'iafCell' elif nodeName_ == 'iafRefCell': obj_ = IafRefCell.factory(parent_object_=self) - obj_.build(child_) - self.iaf_ref_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.iafRefCell.append(obj_) obj_.original_tagname_ = 'iafRefCell' elif nodeName_ == 'izhikevichCell': obj_ = IzhikevichCell.factory(parent_object_=self) - obj_.build(child_) - self.izhikevich_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.izhikevichCell.append(obj_) obj_.original_tagname_ = 'izhikevichCell' elif nodeName_ == 'izhikevich2007Cell': obj_ = Izhikevich2007Cell.factory(parent_object_=self) - obj_.build(child_) - self.izhikevich2007_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.izhikevich2007Cell.append(obj_) obj_.original_tagname_ = 'izhikevich2007Cell' elif nodeName_ == 'adExIaFCell': obj_ = AdExIaFCell.factory(parent_object_=self) - obj_.build(child_) - self.ad_ex_ia_f_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.adExIaFCell.append(obj_) obj_.original_tagname_ = 'adExIaFCell' elif nodeName_ == 'fitzHughNagumoCell': obj_ = FitzHughNagumoCell.factory(parent_object_=self) - obj_.build(child_) - self.fitz_hugh_nagumo_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.fitzHughNagumoCell.append(obj_) obj_.original_tagname_ = 'fitzHughNagumoCell' elif nodeName_ == 'fitzHughNagumo1969Cell': obj_ = FitzHughNagumo1969Cell.factory(parent_object_=self) - obj_.build(child_) - self.fitz_hugh_nagumo1969_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.fitzHughNagumo1969Cell.append(obj_) obj_.original_tagname_ = 'fitzHughNagumo1969Cell' elif nodeName_ == 'pinskyRinzelCA3Cell': obj_ = PinskyRinzelCA3Cell.factory(parent_object_=self) - obj_.build(child_) - self.pinsky_rinzel_ca3_cells.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.pinskyRinzelCA3Cell.append(obj_) obj_.original_tagname_ = 'pinskyRinzelCA3Cell' elif nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) - obj_.build(child_) - self.pulse_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.pulseGenerator.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.pulse_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.pulseGeneratorDL.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) - obj_.build(child_) - self.sine_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.sineGenerator.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.sine_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.sineGeneratorDL.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) - obj_.build(child_) - self.ramp_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.rampGenerator.append(obj_) obj_.original_tagname_ = 'rampGenerator' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) - obj_.build(child_) - self.ramp_generator_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.rampGeneratorDL.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' elif nodeName_ == 'compoundInput': obj_ = CompoundInput.factory(parent_object_=self) - obj_.build(child_) - self.compound_inputs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.compoundInput.append(obj_) obj_.original_tagname_ = 'compoundInput' elif nodeName_ == 'compoundInputDL': obj_ = CompoundInputDL.factory(parent_object_=self) - obj_.build(child_) - self.compound_input_dls.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.compoundInputDL.append(obj_) obj_.original_tagname_ = 'compoundInputDL' elif nodeName_ == 'voltageClamp': obj_ = VoltageClamp.factory(parent_object_=self) - obj_.build(child_) - self.voltage_clamps.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.voltageClamp.append(obj_) obj_.original_tagname_ = 'voltageClamp' elif nodeName_ == 'voltageClampTriple': obj_ = VoltageClampTriple.factory(parent_object_=self) - obj_.build(child_) - self.voltage_clamp_triples.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.voltageClampTriple.append(obj_) obj_.original_tagname_ = 'voltageClampTriple' elif nodeName_ == 'spikeArray': obj_ = SpikeArray.factory(parent_object_=self) - obj_.build(child_) - self.spike_arrays.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeArray.append(obj_) obj_.original_tagname_ = 'spikeArray' elif nodeName_ == 'timedSynapticInput': obj_ = TimedSynapticInput.factory(parent_object_=self) - obj_.build(child_) - self.timed_synaptic_inputs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.timedSynapticInput.append(obj_) obj_.original_tagname_ = 'timedSynapticInput' elif nodeName_ == 'spikeGenerator': obj_ = SpikeGenerator.factory(parent_object_=self) - obj_.build(child_) - self.spike_generators.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeGenerator.append(obj_) obj_.original_tagname_ = 'spikeGenerator' elif nodeName_ == 'spikeGeneratorRandom': obj_ = SpikeGeneratorRandom.factory(parent_object_=self) - obj_.build(child_) - self.spike_generator_randoms.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeGeneratorRandom.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRandom' elif nodeName_ == 'spikeGeneratorPoisson': class_obj_ = self.get_class_obj_(child_, SpikeGeneratorPoisson) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.spike_generator_poissons.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeGeneratorPoisson.append(obj_) obj_.original_tagname_ = 'spikeGeneratorPoisson' elif nodeName_ == 'spikeGeneratorRefPoisson': obj_ = SpikeGeneratorRefPoisson.factory(parent_object_=self) - obj_.build(child_) - self.spike_generator_ref_poissons.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.spikeGeneratorRefPoisson.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRefPoisson' elif nodeName_ == 'poissonFiringSynapse': obj_ = PoissonFiringSynapse.factory(parent_object_=self) - obj_.build(child_) - self.poisson_firing_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.poissonFiringSynapse.append(obj_) obj_.original_tagname_ = 'poissonFiringSynapse' elif nodeName_ == 'transientPoissonFiringSynapse': obj_ = TransientPoissonFiringSynapse.factory(parent_object_=self) - obj_.build(child_) - self.transient_poisson_firing_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.transientPoissonFiringSynapse.append(obj_) obj_.original_tagname_ = 'transientPoissonFiringSynapse' elif nodeName_ == 'IF_curr_alpha': obj_ = IF_curr_alpha.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.IF_curr_alpha.append(obj_) obj_.original_tagname_ = 'IF_curr_alpha' elif nodeName_ == 'IF_curr_exp': obj_ = IF_curr_exp.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.IF_curr_exp.append(obj_) obj_.original_tagname_ = 'IF_curr_exp' elif nodeName_ == 'IF_cond_alpha': obj_ = IF_cond_alpha.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.IF_cond_alpha.append(obj_) obj_.original_tagname_ = 'IF_cond_alpha' elif nodeName_ == 'IF_cond_exp': obj_ = IF_cond_exp.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.IF_cond_exp.append(obj_) obj_.original_tagname_ = 'IF_cond_exp' elif nodeName_ == 'EIF_cond_exp_isfa_ista': class_obj_ = self.get_class_obj_(child_, EIF_cond_exp_isfa_ista) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.EIF_cond_exp_isfa_ista.append(obj_) obj_.original_tagname_ = 'EIF_cond_exp_isfa_ista' elif nodeName_ == 'EIF_cond_alpha_isfa_ista': obj_ = EIF_cond_alpha_isfa_ista.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.EIF_cond_alpha_isfa_ista.append(obj_) obj_.original_tagname_ = 'EIF_cond_alpha_isfa_ista' elif nodeName_ == 'HH_cond_exp': obj_ = HH_cond_exp.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.HH_cond_exp.append(obj_) obj_.original_tagname_ = 'HH_cond_exp' elif nodeName_ == 'expCondSynapse': obj_ = ExpCondSynapse.factory(parent_object_=self) - obj_.build(child_) - self.exp_cond_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.expCondSynapse.append(obj_) obj_.original_tagname_ = 'expCondSynapse' elif nodeName_ == 'alphaCondSynapse': obj_ = AlphaCondSynapse.factory(parent_object_=self) - obj_.build(child_) - self.alpha_cond_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.alphaCondSynapse.append(obj_) obj_.original_tagname_ = 'alphaCondSynapse' elif nodeName_ == 'expCurrSynapse': obj_ = ExpCurrSynapse.factory(parent_object_=self) - obj_.build(child_) - self.exp_curr_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.expCurrSynapse.append(obj_) obj_.original_tagname_ = 'expCurrSynapse' elif nodeName_ == 'alphaCurrSynapse': obj_ = AlphaCurrSynapse.factory(parent_object_=self) - obj_.build(child_) - self.alpha_curr_synapses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.alphaCurrSynapse.append(obj_) obj_.original_tagname_ = 'alphaCurrSynapse' elif nodeName_ == 'SpikeSourcePoisson': obj_ = SpikeSourcePoisson.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.SpikeSourcePoisson.append(obj_) obj_.original_tagname_ = 'SpikeSourcePoisson' elif nodeName_ == 'network': obj_ = Network.factory(parent_object_=self) - obj_.build(child_) - self.networks.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.network.append(obj_) obj_.original_tagname_ = 'network' elif nodeName_ == 'ComponentType': obj_ = ComponentType.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.ComponentType.append(obj_) obj_.original_tagname_ = 'ComponentType' super(NeuroMLDocument, self).buildChildren(child_, node, nodeName_, True) @@ -16248,16 +18943,21 @@ def append(self,element): class BasePynnSynapse(BaseSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_syn', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_syn', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BasePynnSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BasePynnSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.tau_syn = _cast(float, tau_syn) + self.tau_syn_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -16287,6 +18987,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16306,54 +19008,69 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BasePynnSynapse', fromsubclass_=False, pretty_print=True): - super(BasePynnSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BasePynnSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau_syn', node) if value is not None and 'tau_syn' not in already_processed: already_processed.add('tau_syn') - try: - self.tau_syn = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_syn): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_syn') + self.tau_syn = value value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BasePynnSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BasePynnSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BasePynnSynapse class basePyNNCell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('cm', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('i_offset', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('tau_syn_E', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('tau_syn_I', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('v_init', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('cm', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('i_offset', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_syn_E', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_syn_I', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_init', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(basePyNNCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(basePyNNCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.cm = _cast(float, cm) + self.cm_nsprefix_ = None self.i_offset = _cast(float, i_offset) + self.i_offset_nsprefix_ = None self.tau_syn_E = _cast(float, tau_syn_E) + self.tau_syn_E_nsprefix_ = None self.tau_syn_I = _cast(float, tau_syn_I) + self.tau_syn_I_nsprefix_ = None self.v_init = _cast(float, v_init) + self.v_init_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -16383,6 +19100,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16414,58 +19133,56 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNCell', fromsubclass_=False, pretty_print=True): - super(basePyNNCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(basePyNNCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('cm', node) if value is not None and 'cm' not in already_processed: already_processed.add('cm') - try: - self.cm = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (cm): %s' % exp) + value = self.gds_parse_float(value, node, 'cm') + self.cm = value value = find_attr_value_('i_offset', node) if value is not None and 'i_offset' not in already_processed: already_processed.add('i_offset') - try: - self.i_offset = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (i_offset): %s' % exp) + value = self.gds_parse_float(value, node, 'i_offset') + self.i_offset = value value = find_attr_value_('tau_syn_E', node) if value is not None and 'tau_syn_E' not in already_processed: already_processed.add('tau_syn_E') - try: - self.tau_syn_E = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_syn_E): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_syn_E') + self.tau_syn_E = value value = find_attr_value_('tau_syn_I', node) if value is not None and 'tau_syn_I' not in already_processed: already_processed.add('tau_syn_I') - try: - self.tau_syn_I = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_syn_I): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_syn_I') + self.tau_syn_I = value value = find_attr_value_('v_init', node) if value is not None and 'v_init' not in already_processed: already_processed.add('v_init') - try: - self.v_init = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_init): %s' % exp) + value = self.gds_parse_float(value, node, 'v_init') + self.v_init = value value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(basePyNNCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNCell @@ -16474,29 +19191,36 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ContinuousProjection(BaseProjection): """Projection between two populations consisting of analog connections (e.g. graded synapses)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('continuous_connections', 'ContinuousConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnection', u'name': u'continuousConnection', u'minOccurs': u'0'}, None), - MemberSpec_('continuous_connection_instances', 'ContinuousConnectionInstance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnectionInstance', u'name': u'continuousConnectionInstance', u'minOccurs': u'0'}, None), - MemberSpec_('continuous_connection_instance_ws', 'ContinuousConnectionInstanceW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnectionInstanceW', u'name': u'continuousConnectionInstanceW', u'minOccurs': u'0'}, None), + MemberSpec_('continuousConnection', 'ContinuousConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnection', 'type': 'ContinuousConnection'}, None), + MemberSpec_('continuousConnectionInstance', 'ContinuousConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstance', 'type': 'ContinuousConnectionInstance'}, None), + MemberSpec_('continuousConnectionInstanceW', 'ContinuousConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstanceW', 'type': 'ContinuousConnectionInstanceW'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, continuous_connections=None, continuous_connection_instances=None, continuous_connection_instance_ws=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, continuousConnection=None, continuousConnectionInstance=None, continuousConnectionInstanceW=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ContinuousProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) - if continuous_connections is None: - self.continuous_connections = [] - else: - self.continuous_connections = continuous_connections - if continuous_connection_instances is None: - self.continuous_connection_instances = [] - else: - self.continuous_connection_instances = continuous_connection_instances - if continuous_connection_instance_ws is None: - self.continuous_connection_instance_ws = [] - else: - self.continuous_connection_instance_ws = continuous_connection_instance_ws + self.ns_prefix_ = None + super(ContinuousProjection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) + if continuousConnection is None: + self.continuousConnection = [] + else: + self.continuousConnection = continuousConnection + self.continuousConnection_nsprefix_ = None + if continuousConnectionInstance is None: + self.continuousConnectionInstance = [] + else: + self.continuousConnectionInstance = continuousConnectionInstance + self.continuousConnectionInstance_nsprefix_ = None + if continuousConnectionInstanceW is None: + self.continuousConnectionInstanceW = [] + else: + self.continuousConnectionInstanceW = continuousConnectionInstanceW + self.continuousConnectionInstanceW_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16510,9 +19234,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.continuous_connections or - self.continuous_connection_instances or - self.continuous_connection_instance_ws or + self.continuousConnection or + self.continuousConnectionInstance or + self.continuousConnectionInstanceW or super(ContinuousProjection, self).hasContent_() ): return True @@ -16528,6 +19252,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16542,43 +19268,50 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ContinuousProjection'): super(ContinuousProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContinuousProjection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousProjection', fromsubclass_=False, pretty_print=True): - super(ContinuousProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ContinuousProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for continuousConnection_ in self.continuous_connections: + for continuousConnection_ in self.continuousConnection: + namespaceprefix_ = self.continuousConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnection_nsprefix_) else '' continuousConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnection', pretty_print=pretty_print) - for continuousConnectionInstance_ in self.continuous_connection_instances: + for continuousConnectionInstance_ in self.continuousConnectionInstance: + namespaceprefix_ = self.continuousConnectionInstance_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnectionInstance_nsprefix_) else '' continuousConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstance', pretty_print=pretty_print) - for continuousConnectionInstanceW_ in self.continuous_connection_instance_ws: + for continuousConnectionInstanceW_ in self.continuousConnectionInstanceW: + namespaceprefix_ = self.continuousConnectionInstanceW_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnectionInstanceW_nsprefix_) else '' continuousConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstanceW', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ContinuousProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'continuousConnection': class_obj_ = self.get_class_obj_(child_, ContinuousConnection) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.continuous_connections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.continuousConnection.append(obj_) obj_.original_tagname_ = 'continuousConnection' elif nodeName_ == 'continuousConnectionInstance': class_obj_ = self.get_class_obj_(child_, ContinuousConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.continuous_connection_instances.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.continuousConnectionInstance.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstance' elif nodeName_ == 'continuousConnectionInstanceW': obj_ = ContinuousConnectionInstanceW.factory(parent_object_=self) - obj_.build(child_) - self.continuous_connection_instance_ws.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.continuousConnectionInstanceW.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstanceW' super(ContinuousProjection, self).buildChildren(child_, node, nodeName_, True) @@ -16665,31 +19398,38 @@ def exportHdf5(self, h5file, h5Group): class ElectricalProjection(BaseProjection): - """Projection between two populations consisting of electrical - connections (gap junctions)""" + """Projection between two populations consisting of electrical connections + (gap junctions)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('electrical_connections', 'ElectricalConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnection', u'name': u'electricalConnection', u'minOccurs': u'0'}, None), - MemberSpec_('electrical_connection_instances', 'ElectricalConnectionInstance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnectionInstance', u'name': u'electricalConnectionInstance', u'minOccurs': u'0'}, None), - MemberSpec_('electrical_connection_instance_ws', 'ElectricalConnectionInstanceW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnectionInstanceW', u'name': u'electricalConnectionInstanceW', u'minOccurs': u'0'}, None), + MemberSpec_('electricalConnection', 'ElectricalConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnection', 'type': 'ElectricalConnection'}, None), + MemberSpec_('electricalConnectionInstance', 'ElectricalConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstance', 'type': 'ElectricalConnectionInstance'}, None), + MemberSpec_('electricalConnectionInstanceW', 'ElectricalConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstanceW', 'type': 'ElectricalConnectionInstanceW'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, electrical_connections=None, electrical_connection_instances=None, electrical_connection_instance_ws=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, electricalConnection=None, electricalConnectionInstance=None, electricalConnectionInstanceW=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ElectricalProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) - if electrical_connections is None: - self.electrical_connections = [] - else: - self.electrical_connections = electrical_connections - if electrical_connection_instances is None: - self.electrical_connection_instances = [] - else: - self.electrical_connection_instances = electrical_connection_instances - if electrical_connection_instance_ws is None: - self.electrical_connection_instance_ws = [] - else: - self.electrical_connection_instance_ws = electrical_connection_instance_ws + self.ns_prefix_ = None + super(ElectricalProjection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) + if electricalConnection is None: + self.electricalConnection = [] + else: + self.electricalConnection = electricalConnection + self.electricalConnection_nsprefix_ = None + if electricalConnectionInstance is None: + self.electricalConnectionInstance = [] + else: + self.electricalConnectionInstance = electricalConnectionInstance + self.electricalConnectionInstance_nsprefix_ = None + if electricalConnectionInstanceW is None: + self.electricalConnectionInstanceW = [] + else: + self.electricalConnectionInstanceW = electricalConnectionInstanceW + self.electricalConnectionInstanceW_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16703,9 +19443,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.electrical_connections or - self.electrical_connection_instances or - self.electrical_connection_instance_ws or + self.electricalConnection or + self.electricalConnectionInstance or + self.electricalConnectionInstanceW or super(ElectricalProjection, self).hasContent_() ): return True @@ -16721,6 +19461,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16735,43 +19477,50 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ElectricalProjection'): super(ElectricalProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ElectricalProjection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalProjection', fromsubclass_=False, pretty_print=True): - super(ElectricalProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ElectricalProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for electricalConnection_ in self.electrical_connections: + for electricalConnection_ in self.electricalConnection: + namespaceprefix_ = self.electricalConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnection_nsprefix_) else '' electricalConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnection', pretty_print=pretty_print) - for electricalConnectionInstance_ in self.electrical_connection_instances: + for electricalConnectionInstance_ in self.electricalConnectionInstance: + namespaceprefix_ = self.electricalConnectionInstance_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnectionInstance_nsprefix_) else '' electricalConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstance', pretty_print=pretty_print) - for electricalConnectionInstanceW_ in self.electrical_connection_instance_ws: + for electricalConnectionInstanceW_ in self.electricalConnectionInstanceW: + namespaceprefix_ = self.electricalConnectionInstanceW_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnectionInstanceW_nsprefix_) else '' electricalConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstanceW', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ElectricalProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'electricalConnection': class_obj_ = self.get_class_obj_(child_, ElectricalConnection) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.electrical_connections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.electricalConnection.append(obj_) obj_.original_tagname_ = 'electricalConnection' elif nodeName_ == 'electricalConnectionInstance': class_obj_ = self.get_class_obj_(child_, ElectricalConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_) - self.electrical_connection_instances.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.electricalConnectionInstance.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstance' elif nodeName_ == 'electricalConnectionInstanceW': obj_ = ElectricalConnectionInstanceW.factory(parent_object_=self) - obj_.build(child_) - self.electrical_connection_instance_ws.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.electricalConnectionInstanceW.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstanceW' super(ElectricalProjection, self).buildChildren(child_, node, nodeName_, True) @@ -16853,28 +19602,38 @@ def exportHdf5(self, h5file, h5Group): class BaseConnectionNewFormat(BaseConnection): - """Base of all synaptic connections with preCell, postSegment, etc. See - BaseConnectionOldFormat""" + """Base of all synaptic connections with preCell, postSegment, etc. + See BaseConnectionOldFormat""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pre_cell', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('pre_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('post_cell', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('post_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('preCell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('preSegment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('preFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('postCell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('postSegment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('postFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseConnectionNewFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) - self.pre_cell = _cast(None, pre_cell) - self.pre_segment = _cast(int, pre_segment) - self.pre_fraction_along = _cast(float, pre_fraction_along) - self.post_cell = _cast(None, post_cell) - self.post_segment = _cast(int, post_segment) - self.post_fraction_along = _cast(float, post_fraction_along) + self.ns_prefix_ = None + super(BaseConnectionNewFormat, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + self.preCell = _cast(None, preCell) + self.preCell_nsprefix_ = None + self.preSegment = _cast(int, preSegment) + self.preSegment_nsprefix_ = None + self.preFractionAlong = _cast(float, preFractionAlong) + self.preFractionAlong_nsprefix_ = None + self.postCell = _cast(None, postCell) + self.postCell_nsprefix_ = None + self.postSegment = _cast(int, postSegment) + self.postSegment_nsprefix_ = None + self.postFractionAlong = _cast(float, postFractionAlong) + self.postFractionAlong_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -16889,15 +19648,27 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value < 0: - warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False if value > 1: - warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False def hasContent_(self): if ( super(BaseConnectionNewFormat, self).hasContent_() @@ -16915,6 +19686,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16927,89 +19700,87 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseConnectionNewFormat'): super(BaseConnectionNewFormat, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConnectionNewFormat') - if self.pre_cell is not None and 'pre_cell' not in already_processed: - already_processed.add('pre_cell') - outfile.write(' preCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell), input_name='preCell')), )) - if self.pre_segment != 0 and 'pre_segment' not in already_processed: - already_processed.add('pre_segment') - outfile.write(' preSegment=%s' % (quote_attrib(self.pre_segment), )) - if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: - already_processed.add('pre_fraction_along') - outfile.write(' preFractionAlong=%s' % (quote_attrib(self.pre_fraction_along), )) - if self.post_cell is not None and 'post_cell' not in already_processed: - already_processed.add('post_cell') - outfile.write(' postCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell), input_name='postCell')), )) - if self.post_segment != 0 and 'post_segment' not in already_processed: - already_processed.add('post_segment') - outfile.write(' postSegment=%s' % (quote_attrib(self.post_segment), )) - if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: - already_processed.add('post_fraction_along') - outfile.write(' postFractionAlong=%s' % (quote_attrib(self.post_fraction_along), )) + if self.preCell is not None and 'preCell' not in already_processed: + already_processed.add('preCell') + outfile.write(' preCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preCell), input_name='preCell')), )) + if self.preSegment != 0 and 'preSegment' not in already_processed: + already_processed.add('preSegment') + outfile.write(' preSegment="%s"' % self.gds_format_integer(self.preSegment, input_name='preSegment')) + if self.preFractionAlong != 0.5 and 'preFractionAlong' not in already_processed: + already_processed.add('preFractionAlong') + outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.preFractionAlong, input_name='preFractionAlong')) + if self.postCell is not None and 'postCell' not in already_processed: + already_processed.add('postCell') + outfile.write(' postCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postCell), input_name='postCell')), )) + if self.postSegment != 0 and 'postSegment' not in already_processed: + already_processed.add('postSegment') + outfile.write(' postSegment="%s"' % self.gds_format_integer(self.postSegment, input_name='postSegment')) + if self.postFractionAlong != 0.5 and 'postFractionAlong' not in already_processed: + already_processed.add('postFractionAlong') + outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.postFractionAlong, input_name='postFractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnectionNewFormat', fromsubclass_=False, pretty_print=True): - super(BaseConnectionNewFormat, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BaseConnectionNewFormat, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCell', node) if value is not None and 'preCell' not in already_processed: already_processed.add('preCell') - self.pre_cell = value + self.preCell = value value = find_attr_value_('preSegment', node) if value is not None and 'preSegment' not in already_processed: already_processed.add('preSegment') - try: - self.pre_segment = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.pre_segment < 0: + self.preSegment = self.gds_parse_integer(value, node, 'preSegment') + if self.preSegment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.pre_segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.preSegment) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') - try: - self.pre_fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (preFractionAlong): %s' % exp) - self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'preFractionAlong') + self.preFractionAlong = value + self.validate_ZeroToOne(self.preFractionAlong) # validate type ZeroToOne value = find_attr_value_('postCell', node) if value is not None and 'postCell' not in already_processed: already_processed.add('postCell') - self.post_cell = value + self.postCell = value value = find_attr_value_('postSegment', node) if value is not None and 'postSegment' not in already_processed: already_processed.add('postSegment') - try: - self.post_segment = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.post_segment < 0: + self.postSegment = self.gds_parse_integer(value, node, 'postSegment') + if self.postSegment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.post_segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.postSegment) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') - try: - self.post_fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (postFractionAlong): %s' % exp) - self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'postFractionAlong') + self.postFractionAlong = value + self.validate_ZeroToOne(self.postFractionAlong) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnectionNewFormat, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseConnectionNewFormat, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnectionNewFormat @@ -17017,28 +19788,38 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class BaseConnectionOldFormat(BaseConnection): """Base of all synaptic connections with preCellId, postSegmentId, etc. - Note: this is not the best name for these attributes, since Id - is superfluous, hence BaseConnectionNewFormat""" + Note: this is not the best name for these attributes, since Id is + superfluous, hence BaseConnectionNewFormat""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pre_cell_id', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('pre_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('post_cell_id', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('post_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('preCellId', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('preSegmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('preFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('postCellId', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('postSegmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('postFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseConnectionOldFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) - self.pre_cell_id = _cast(None, pre_cell_id) - self.pre_segment_id = _cast(int, pre_segment_id) - self.pre_fraction_along = _cast(float, pre_fraction_along) - self.post_cell_id = _cast(None, post_cell_id) - self.post_segment_id = _cast(int, post_segment_id) - self.post_fraction_along = _cast(float, post_fraction_along) + self.ns_prefix_ = None + super(BaseConnectionOldFormat, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + self.preCellId = _cast(None, preCellId) + self.preCellId_nsprefix_ = None + self.preSegmentId = _cast(int, preSegmentId) + self.preSegmentId_nsprefix_ = None + self.preFractionAlong = _cast(float, preFractionAlong) + self.preFractionAlong_nsprefix_ = None + self.postCellId = _cast(None, postCellId) + self.postCellId_nsprefix_ = None + self.postSegmentId = _cast(int, postSegmentId) + self.postSegmentId_nsprefix_ = None + self.postFractionAlong = _cast(float, postFractionAlong) + self.postFractionAlong_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -17053,15 +19834,27 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, int): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) + return False pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, float): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) + return False if value < 0: - warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False if value > 1: - warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) + result = False def hasContent_(self): if ( super(BaseConnectionOldFormat, self).hasContent_() @@ -17079,6 +19872,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17091,89 +19886,87 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseConnectionOldFormat'): super(BaseConnectionOldFormat, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConnectionOldFormat') - if self.pre_cell_id is not None and 'pre_cell_id' not in already_processed: - already_processed.add('pre_cell_id') - outfile.write(' preCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell_id), input_name='preCellId')), )) - if self.pre_segment_id != 0 and 'pre_segment_id' not in already_processed: - already_processed.add('pre_segment_id') - outfile.write(' preSegmentId=%s' % (quote_attrib(self.pre_segment_id), )) - if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: - already_processed.add('pre_fraction_along') - outfile.write(' preFractionAlong=%s' % (quote_attrib(self.pre_fraction_along), )) - if self.post_cell_id is not None and 'post_cell_id' not in already_processed: - already_processed.add('post_cell_id') - outfile.write(' postCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell_id), input_name='postCellId')), )) - if self.post_segment_id != 0 and 'post_segment_id' not in already_processed: - already_processed.add('post_segment_id') - outfile.write(' postSegmentId=%s' % (quote_attrib(self.post_segment_id), )) - if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: - already_processed.add('post_fraction_along') - outfile.write(' postFractionAlong=%s' % (quote_attrib(self.post_fraction_along), )) + if self.preCellId is not None and 'preCellId' not in already_processed: + already_processed.add('preCellId') + outfile.write(' preCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preCellId), input_name='preCellId')), )) + if self.preSegmentId != 0 and 'preSegmentId' not in already_processed: + already_processed.add('preSegmentId') + outfile.write(' preSegmentId="%s"' % self.gds_format_integer(self.preSegmentId, input_name='preSegmentId')) + if self.preFractionAlong != 0.5 and 'preFractionAlong' not in already_processed: + already_processed.add('preFractionAlong') + outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.preFractionAlong, input_name='preFractionAlong')) + if self.postCellId is not None and 'postCellId' not in already_processed: + already_processed.add('postCellId') + outfile.write(' postCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postCellId), input_name='postCellId')), )) + if self.postSegmentId != 0 and 'postSegmentId' not in already_processed: + already_processed.add('postSegmentId') + outfile.write(' postSegmentId="%s"' % self.gds_format_integer(self.postSegmentId, input_name='postSegmentId')) + if self.postFractionAlong != 0.5 and 'postFractionAlong' not in already_processed: + already_processed.add('postFractionAlong') + outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.postFractionAlong, input_name='postFractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnectionOldFormat', fromsubclass_=False, pretty_print=True): - super(BaseConnectionOldFormat, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BaseConnectionOldFormat, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCellId', node) if value is not None and 'preCellId' not in already_processed: already_processed.add('preCellId') - self.pre_cell_id = value + self.preCellId = value value = find_attr_value_('preSegmentId', node) if value is not None and 'preSegmentId' not in already_processed: already_processed.add('preSegmentId') - try: - self.pre_segment_id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.pre_segment_id < 0: + self.preSegmentId = self.gds_parse_integer(value, node, 'preSegmentId') + if self.preSegmentId < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.pre_segment_id) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.preSegmentId) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') - try: - self.pre_fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (preFractionAlong): %s' % exp) - self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'preFractionAlong') + self.preFractionAlong = value + self.validate_ZeroToOne(self.preFractionAlong) # validate type ZeroToOne value = find_attr_value_('postCellId', node) if value is not None and 'postCellId' not in already_processed: already_processed.add('postCellId') - self.post_cell_id = value + self.postCellId = value value = find_attr_value_('postSegmentId', node) if value is not None and 'postSegmentId' not in already_processed: already_processed.add('postSegmentId') - try: - self.post_segment_id = int(value) - except ValueError as exp: - raise_parse_error(node, 'Bad integer attribute: %s' % exp) - if self.post_segment_id < 0: + self.postSegmentId = self.gds_parse_integer(value, node, 'postSegmentId') + if self.postSegmentId < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.post_segment_id) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.postSegmentId) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') - try: - self.post_fraction_along = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (postFractionAlong): %s' % exp) - self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne + value = self.gds_parse_float(value, node, 'postFractionAlong') + self.postFractionAlong = value + self.validate_ZeroToOne(self.postFractionAlong) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnectionOldFormat, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseConnectionOldFormat, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnectionOldFormat @@ -17182,26 +19975,33 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class Projection(BaseProjection): """Projection (set of synaptic connections) between two populations. Chemical/event based synaptic transmission""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('connections', 'Connection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Connection', u'name': u'connection', u'minOccurs': u'0'}, None), - MemberSpec_('connection_wds', 'ConnectionWD', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ConnectionWD', u'name': u'connectionWD', u'minOccurs': u'0'}, None), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('connection', 'Connection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connection', 'type': 'Connection'}, None), + MemberSpec_('connectionWD', 'ConnectionWD', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connectionWD', 'type': 'ConnectionWD'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, synapse=None, connections=None, connection_wds=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, synapse=None, connection=None, connectionWD=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Projection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + self.ns_prefix_ = None + super(Projection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) self.synapse = _cast(None, synapse) - if connections is None: - self.connections = [] + self.synapse_nsprefix_ = None + if connection is None: + self.connection = [] else: - self.connections = connections - if connection_wds is None: - self.connection_wds = [] + self.connection = connection + self.connection_nsprefix_ = None + if connectionWD is None: + self.connectionWD = [] else: - self.connection_wds = connection_wds + self.connectionWD = connectionWD + self.connectionWD_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17215,15 +20015,19 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.connections or - self.connection_wds or + self.connection or + self.connectionWD or super(Projection, self).hasContent_() ): return True @@ -17239,6 +20043,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17254,23 +20060,29 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Projection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Projection') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) + outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Projection', fromsubclass_=False, pretty_print=True): - super(Projection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Projection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for connection_ in self.connections: + for connection_ in self.connection: + namespaceprefix_ = self.connection_nsprefix_ + ':' if (UseCapturedNS_ and self.connection_nsprefix_) else '' connection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connection', pretty_print=pretty_print) - for connectionWD_ in self.connection_wds: + for connectionWD_ in self.connectionWD: + namespaceprefix_ = self.connectionWD_nsprefix_ + ':' if (UseCapturedNS_ and self.connectionWD_nsprefix_) else '' connectionWD_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connectionWD', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -17279,16 +20091,16 @@ def buildAttributes(self, node, attrs, already_processed): self.synapse = value self.validate_NmlId(self.synapse) # validate type NmlId super(Projection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'connection': obj_ = Connection.factory(parent_object_=self) - obj_.build(child_) - self.connections.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.connection.append(obj_) obj_.original_tagname_ = 'connection' elif nodeName_ == 'connectionWD': obj_ = ConnectionWD.factory(parent_object_=self) - obj_.build(child_) - self.connection_wds.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.connectionWD.append(obj_) obj_.original_tagname_ = 'connectionWD' super(Projection, self).buildChildren(child_, node, nodeName_, True) @@ -17388,16 +20200,21 @@ def __str__(self): class SpikeGeneratorRefPoisson(SpikeGeneratorPoisson): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('minimum_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('minimumISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = SpikeGeneratorPoisson - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, minimum_isi=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, minimumISI=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SpikeGeneratorRefPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) - self.minimum_isi = _cast(None, minimum_isi) + self.ns_prefix_ = None + super(SpikeGeneratorRefPoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, averageRate, **kwargs_) + self.minimumISI = _cast(None, minimumISI) + self.minimumISI_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17411,11 +20228,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(SpikeGeneratorRefPoisson, self).hasContent_() @@ -17433,6 +20254,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17446,42 +20269,51 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorRefPoisson'): super(SpikeGeneratorRefPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRefPoisson') - if self.minimum_isi is not None and 'minimum_isi' not in already_processed: - already_processed.add('minimum_isi') - outfile.write(' minimumISI=%s' % (quote_attrib(self.minimum_isi), )) + if self.minimumISI is not None and 'minimumISI' not in already_processed: + already_processed.add('minimumISI') + outfile.write(' minimumISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minimumISI), input_name='minimumISI')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRefPoisson', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorRefPoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SpikeGeneratorRefPoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('minimumISI', node) if value is not None and 'minimumISI' not in already_processed: already_processed.add('minimumISI') - self.minimum_isi = value - self.validate_Nml2Quantity_time(self.minimum_isi) # validate type Nml2Quantity_time + self.minimumISI = value + self.validate_Nml2Quantity_time(self.minimumISI) # validate type Nml2Quantity_time super(SpikeGeneratorRefPoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGeneratorRefPoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorRefPoisson class ConcentrationModel_D(DecayingPoolConcentrationModel): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = DecayingPoolConcentrationModel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, type='decayingPoolConcentrationModel', **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, shellThickness=None, type_='decayingPoolConcentrationModel', gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ConcentrationModel_D, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) - self.type = _cast(None, type) + self.ns_prefix_ = None + super(ConcentrationModel_D, self).__init__(neuroLexId, id, metaid, notes, property, annotation, ion, restingConc, decayConstant, shellThickness, **kwargs_) + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17510,6 +20342,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17523,39 +20357,47 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConcentrationModel_D'): super(ConcentrationModel_D, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConcentrationModel_D') - if self.type != "decayingPoolConcentrationModel" and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConcentrationModel_D', fromsubclass_=False, pretty_print=True): - super(ConcentrationModel_D, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ConcentrationModel_D, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value + self.type_ = value super(ConcentrationModel_D, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ConcentrationModel_D, self).buildChildren(child_, node, nodeName_, True) pass # end class ConcentrationModel_D class ChannelDensityNernstCa2(ChannelDensityNernst): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ChannelDensityNernst - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityNernstCa2, self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) + self.ns_prefix_ = None + super(ChannelDensityNernstCa2, self).__init__(neuroLexId, id, ionChannel, condDensity, segmentGroup, segment, ion, variableParameter, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17584,6 +20426,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17598,33 +20442,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNernstCa2'): super(ChannelDensityNernstCa2, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNernstCa2') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNernstCa2', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNernstCa2, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ChannelDensityNernstCa2, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ChannelDensityNernstCa2, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ChannelDensityNernstCa2, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityNernstCa2 class ChannelDensityVShift(ChannelDensity): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('vShift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = ChannelDensity - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, v_shift=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, vShift=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ChannelDensityVShift, self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) - self.v_shift = _cast(None, v_shift) + self.ns_prefix_ = None + super(ChannelDensityVShift, self).__init__(neuroLexId, id, ionChannel, condDensity, erev, segmentGroup, segment, ion, variableParameter, **kwargs_) + self.vShift = _cast(None, vShift) + self.vShift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17638,11 +20491,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( super(ChannelDensityVShift, self).hasContent_() @@ -17660,6 +20517,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17673,52 +20532,64 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityVShift'): super(ChannelDensityVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityVShift') - if self.v_shift is not None and 'v_shift' not in already_processed: - already_processed.add('v_shift') - outfile.write(' vShift=%s' % (quote_attrib(self.v_shift), )) + if self.vShift is not None and 'vShift' not in already_processed: + already_processed.add('vShift') + outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vShift), input_name='vShift')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityVShift', fromsubclass_=False, pretty_print=True): - super(ChannelDensityVShift, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ChannelDensityVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) if value is not None and 'vShift' not in already_processed: already_processed.add('vShift') - self.v_shift = value - self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage + self.vShift = value + self.validate_Nml2Quantity_voltage(self.vShift) # validate type Nml2Quantity_voltage super(ChannelDensityVShift, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ChannelDensityVShift, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityVShift class Cell(BaseCell): - """Should only be used if morphology element is outside the cell. This - points to the id of the morphology Should only be used if - biophysicalProperties element is outside the cell. This points - to the id of the biophysicalProperties""" + """Should only be used if morphology element is outside the cell. + This points to the id of the morphology + Should only be used if biophysicalProperties element is outside the cell. + This points to the id of the biophysicalProperties""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('morphology_attr', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('biophysical_properties_attr', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('morphology', 'Morphology', 0, 1, {u'type': u'Morphology', u'name': u'morphology', u'minOccurs': u'0'}, None), - MemberSpec_('biophysical_properties', 'BiophysicalProperties', 0, 1, {u'type': u'BiophysicalProperties', u'name': u'biophysicalProperties', u'minOccurs': u'0'}, None), + MemberSpec_('morphology_attr', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('biophysicalProperties_attr', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('morphology', 'Morphology', 0, 1, {'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), + MemberSpec_('biophysicalProperties', 'BiophysicalProperties', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, morphology_attr=None, biophysicalProperties_attr=None, morphology=None, biophysicalProperties=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.morphology_attr = _cast(None, morphology_attr) - self.biophysical_properties_attr = _cast(None, biophysical_properties_attr) + self.morphology_attr_nsprefix_ = None + self.biophysicalProperties_attr = _cast(None, biophysicalProperties_attr) + self.biophysicalProperties_attr_nsprefix_ = None self.morphology = morphology - self.biophysical_properties = biophysical_properties + self.morphology_nsprefix_ = None + self.biophysicalProperties = biophysicalProperties + self.biophysicalProperties_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -17731,10 +20602,21 @@ def factory(*args_, **kwargs_): else: return Cell(*args_, **kwargs_) factory = staticmethod(factory) + def validate_NmlId(self, value): + # Validate type NmlId, a restriction on xs:string. + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + if not self.gds_validate_simple_patterns( + self.validate_NmlId_patterns_, value): + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.morphology is not None or - self.biophysical_properties is not None or + self.biophysicalProperties is not None or super(Cell, self).hasContent_() ): return True @@ -17750,6 +20632,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17766,60 +20650,79 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.morphology_attr is not None and 'morphology_attr' not in already_processed: already_processed.add('morphology_attr') outfile.write(' morphology=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.morphology_attr), input_name='morphology_attr')), )) - if self.biophysical_properties_attr is not None and 'biophysical_properties_attr' not in already_processed: - already_processed.add('biophysical_properties_attr') - outfile.write(' biophysicalProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.biophysical_properties_attr), input_name='biophysical_properties_attr')), )) + if self.biophysicalProperties_attr is not None and 'biophysicalProperties_attr' not in already_processed: + already_processed.add('biophysicalProperties_attr') + outfile.write(' biophysicalProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.biophysicalProperties_attr), input_name='biophysicalProperties_attr')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Cell', fromsubclass_=False, pretty_print=True): - super(Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.morphology is not None: + namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' self.morphology.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) - if self.biophysical_properties is not None: - self.biophysical_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.biophysicalProperties is not None: + namespaceprefix_ = self.biophysicalProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties_nsprefix_) else '' + self.biophysicalProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('morphology', node) if value is not None and 'morphology_attr' not in already_processed: already_processed.add('morphology_attr') self.morphology_attr = value + self.validate_NmlId(self.morphology_attr) # validate type NmlId value = find_attr_value_('biophysicalProperties', node) - if value is not None and 'biophysical_properties_attr' not in already_processed: - already_processed.add('biophysical_properties_attr') - self.biophysical_properties_attr = value + if value is not None and 'biophysicalProperties_attr' not in already_processed: + already_processed.add('biophysicalProperties_attr') + self.biophysicalProperties_attr = value + self.validate_NmlId(self.biophysicalProperties_attr) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'morphology': obj_ = Morphology.factory(parent_object_=self) - obj_.build(child_) + obj_.build(child_, gds_collector_=gds_collector_) self.morphology = obj_ obj_.original_tagname_ = 'morphology' elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) - obj_.build(child_) - self.biophysical_properties = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.biophysicalProperties = obj_ obj_.original_tagname_ = 'biophysicalProperties' super(Cell, self).buildChildren(child_, node, nodeName_, True) # Get segment object by its id def get_segment(self, segment_id): + """Get segment object by its id + + :param segment_id: ID of segment + :return: segment + + :raises Exception: if the segment is not found in the cell + """ for segment in self.morphology.segments: if segment.id == segment_id: @@ -17831,6 +20734,16 @@ def get_segment(self, segment_id): # so the proximal point is on the parent (at a point set by fraction_along) def get_actual_proximal(self, segment_id): + """Get the proximal point of a segment. + + Get the proximal point of a segment, even the proximal field is None + and so the proximal point is on the parent (at a point set by + fraction_along). + + :param segment_id: ID of segment + :return: proximal point + """ + segment = self.get_segment(segment_id) if segment.proximal: return segment.proximal @@ -17850,6 +20763,11 @@ def get_actual_proximal(self, segment_id): return p def get_segment_length(self, segment_id): + """Get the length of the segment. + + :param segment_id: ID of segment + :return: length of segment + """ segment = self.get_segment(segment_id) if segment.proximal: @@ -17862,6 +20780,11 @@ def get_segment_length(self, segment_id): return length def get_segment_surface_area(self, segment_id): + """Get the surface area of the segment. + + :param segment_id: ID of the segment + :return: surface area of segment + """ segment = self.get_segment(segment_id) if segment.proximal: @@ -17874,7 +20797,11 @@ def get_segment_surface_area(self, segment_id): return temp_seg.surface_area def get_segment_volume(self, segment_id): + """Get volume of segment + :param segment_id: ID of the segment + :return: volume of the segment + """ segment = self.get_segment(segment_id) if segment.proximal: return segment.volume @@ -17886,6 +20813,10 @@ def get_segment_volume(self, segment_id): return temp_seg.volume def get_segment_ids_vs_segments(self): + """Get a dictionary of segment IDs and the segments in the cell. + + :return: dictionary with segment ID as key, and segment as value + """ segments = {} for segment in self.morphology.segments: @@ -17896,6 +20827,18 @@ def get_segment_ids_vs_segments(self): def get_all_segments_in_group(self, segment_group, assume_all_means_all=True): + """Get all the segments in a segment group of the cell. + + :param segment_group: segment group to get all segments of + :param assume_all_means_all: return all segments if the segment group + wasn't explicitly defined + + :todo: check docstring + + :return: list of segments + + :raises Exception: if no segment group is found in the cell. + """ if isinstance(segment_group, str): for sg in self.morphology.segment_groups: @@ -17930,6 +20873,20 @@ def get_ordered_segments_in_groups(self, include_cumulative_lengths=False, include_path_lengths=False, path_length_metric="Path Length from root"): # Only option supported + """ + Get ordered list of segments in specified groups + + :param group_list: list of groups to get segments from + :param check_parentage: verify parentage + :param include_commulative_lengths: also include cummulative lengths + :param include_path_lengths: also include path lengths + :param path_length_metric: + + :return: dictionary of segments with additional information depending + on what parameters were used: + + :raises: Exception if check_parentage is True and parentage cannot be verified + """ unord_segs = {} other_segs = {} @@ -18040,6 +20997,7 @@ def get_ordered_segments_in_groups(self, def summary(self): + """Print cell summary.""" print("*******************************************************") print("* Cell: "+str(self.id)) print("* Notes: "+str(self.notes)) @@ -18051,56 +21009,81 @@ def summary(self): class PinskyRinzelCA3Cell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('i_soma', 'Nml2Quantity_currentDensity', 0, 0, {'use': u'required'}), - MemberSpec_('i_dend', 'Nml2Quantity_currentDensity', 0, 0, {'use': u'required'}), - MemberSpec_('gc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_ls', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_ld', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_na', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_kdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_ca', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_kahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_kc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_nmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('g_ampa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), - MemberSpec_('e_na', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('e_ca', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('e_k', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('e_l', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('qd0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('pp', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('alphac', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('betac', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('cm', 'Nml2Quantity_specificCapacitance', 0, 0, {'use': u'required'}), + MemberSpec_('iSoma', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), + MemberSpec_('iDend', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gLs', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gLd', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gNa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gKdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gCa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gKahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gKC', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gNmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('gAmpa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('eNa', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('eCa', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('eK', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('eL', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('qd0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('pp', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('alphac', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('betac', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('cm', 'Nml2Quantity_specificCapacitance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, i_soma=None, i_dend=None, gc=None, g_ls=None, g_ld=None, g_na=None, g_kdr=None, g_ca=None, g_kahp=None, g_kc=None, g_nmda=None, g_ampa=None, e_na=None, e_ca=None, e_k=None, e_l=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, iSoma=None, iDend=None, gc=None, gLs=None, gLd=None, gNa=None, gKdr=None, gCa=None, gKahp=None, gKC=None, gNmda=None, gAmpa=None, eNa=None, eCa=None, eK=None, eL=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(PinskyRinzelCA3Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) - self.i_soma = _cast(None, i_soma) - self.i_dend = _cast(None, i_dend) + self.ns_prefix_ = None + super(PinskyRinzelCA3Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + self.iSoma = _cast(None, iSoma) + self.iSoma_nsprefix_ = None + self.iDend = _cast(None, iDend) + self.iDend_nsprefix_ = None self.gc = _cast(None, gc) - self.g_ls = _cast(None, g_ls) - self.g_ld = _cast(None, g_ld) - self.g_na = _cast(None, g_na) - self.g_kdr = _cast(None, g_kdr) - self.g_ca = _cast(None, g_ca) - self.g_kahp = _cast(None, g_kahp) - self.g_kc = _cast(None, g_kc) - self.g_nmda = _cast(None, g_nmda) - self.g_ampa = _cast(None, g_ampa) - self.e_na = _cast(None, e_na) - self.e_ca = _cast(None, e_ca) - self.e_k = _cast(None, e_k) - self.e_l = _cast(None, e_l) + self.gc_nsprefix_ = None + self.gLs = _cast(None, gLs) + self.gLs_nsprefix_ = None + self.gLd = _cast(None, gLd) + self.gLd_nsprefix_ = None + self.gNa = _cast(None, gNa) + self.gNa_nsprefix_ = None + self.gKdr = _cast(None, gKdr) + self.gKdr_nsprefix_ = None + self.gCa = _cast(None, gCa) + self.gCa_nsprefix_ = None + self.gKahp = _cast(None, gKahp) + self.gKahp_nsprefix_ = None + self.gKC = _cast(None, gKC) + self.gKC_nsprefix_ = None + self.gNmda = _cast(None, gNmda) + self.gNmda_nsprefix_ = None + self.gAmpa = _cast(None, gAmpa) + self.gAmpa_nsprefix_ = None + self.eNa = _cast(None, eNa) + self.eNa_nsprefix_ = None + self.eCa = _cast(None, eCa) + self.eCa_nsprefix_ = None + self.eK = _cast(None, eK) + self.eK_nsprefix_ = None + self.eL = _cast(None, eL) + self.eL_nsprefix_ = None self.qd0 = _cast(None, qd0) + self.qd0_nsprefix_ = None self.pp = _cast(None, pp) + self.pp_nsprefix_ = None self.alphac = _cast(None, alphac) + self.alphac_nsprefix_ = None self.betac = _cast(None, betac) + self.betac_nsprefix_ = None self.cm = _cast(None, cm) + self.cm_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18114,39 +21097,59 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_currentDensity(self, value): # Validate type Nml2Quantity_currentDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_currentDensity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_currentDensity_patterns_, )) - validate_Nml2Quantity_currentDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A_per_m2|uA_per_cm2|mA_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_currentDensity_patterns_, )) + validate_Nml2Quantity_currentDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A_per_m2|uA_per_cm2|mA_per_cm2))$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def validate_Nml2Quantity_specificCapacitance(self, value): # Validate type Nml2Quantity_specificCapacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_specificCapacitance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_specificCapacitance_patterns_, )) - validate_Nml2Quantity_specificCapacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F_per_m2|uF_per_cm2)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_specificCapacitance_patterns_, )) + validate_Nml2Quantity_specificCapacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F_per_m2|uF_per_cm2))$']] def hasContent_(self): if ( super(PinskyRinzelCA3Cell, self).hasContent_() @@ -18164,6 +21167,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18177,89 +21182,93 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PinskyRinzelCA3Cell'): super(PinskyRinzelCA3Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PinskyRinzelCA3Cell') - if self.i_soma is not None and 'i_soma' not in already_processed: - already_processed.add('i_soma') - outfile.write(' iSoma=%s' % (quote_attrib(self.i_soma), )) - if self.i_dend is not None and 'i_dend' not in already_processed: - already_processed.add('i_dend') - outfile.write(' iDend=%s' % (quote_attrib(self.i_dend), )) + if self.iSoma is not None and 'iSoma' not in already_processed: + already_processed.add('iSoma') + outfile.write(' iSoma=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.iSoma), input_name='iSoma')), )) + if self.iDend is not None and 'iDend' not in already_processed: + already_processed.add('iDend') + outfile.write(' iDend=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.iDend), input_name='iDend')), )) if self.gc is not None and 'gc' not in already_processed: already_processed.add('gc') - outfile.write(' gc=%s' % (quote_attrib(self.gc), )) - if self.g_ls is not None and 'g_ls' not in already_processed: - already_processed.add('g_ls') - outfile.write(' gLs=%s' % (quote_attrib(self.g_ls), )) - if self.g_ld is not None and 'g_ld' not in already_processed: - already_processed.add('g_ld') - outfile.write(' gLd=%s' % (quote_attrib(self.g_ld), )) - if self.g_na is not None and 'g_na' not in already_processed: - already_processed.add('g_na') - outfile.write(' gNa=%s' % (quote_attrib(self.g_na), )) - if self.g_kdr is not None and 'g_kdr' not in already_processed: - already_processed.add('g_kdr') - outfile.write(' gKdr=%s' % (quote_attrib(self.g_kdr), )) - if self.g_ca is not None and 'g_ca' not in already_processed: - already_processed.add('g_ca') - outfile.write(' gCa=%s' % (quote_attrib(self.g_ca), )) - if self.g_kahp is not None and 'g_kahp' not in already_processed: - already_processed.add('g_kahp') - outfile.write(' gKahp=%s' % (quote_attrib(self.g_kahp), )) - if self.g_kc is not None and 'g_kc' not in already_processed: - already_processed.add('g_kc') - outfile.write(' gKC=%s' % (quote_attrib(self.g_kc), )) - if self.g_nmda is not None and 'g_nmda' not in already_processed: - already_processed.add('g_nmda') - outfile.write(' gNmda=%s' % (quote_attrib(self.g_nmda), )) - if self.g_ampa is not None and 'g_ampa' not in already_processed: - already_processed.add('g_ampa') - outfile.write(' gAmpa=%s' % (quote_attrib(self.g_ampa), )) - if self.e_na is not None and 'e_na' not in already_processed: - already_processed.add('e_na') - outfile.write(' eNa=%s' % (quote_attrib(self.e_na), )) - if self.e_ca is not None and 'e_ca' not in already_processed: - already_processed.add('e_ca') - outfile.write(' eCa=%s' % (quote_attrib(self.e_ca), )) - if self.e_k is not None and 'e_k' not in already_processed: - already_processed.add('e_k') - outfile.write(' eK=%s' % (quote_attrib(self.e_k), )) - if self.e_l is not None and 'e_l' not in already_processed: - already_processed.add('e_l') - outfile.write(' eL=%s' % (quote_attrib(self.e_l), )) + outfile.write(' gc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gc), input_name='gc')), )) + if self.gLs is not None and 'gLs' not in already_processed: + already_processed.add('gLs') + outfile.write(' gLs=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gLs), input_name='gLs')), )) + if self.gLd is not None and 'gLd' not in already_processed: + already_processed.add('gLd') + outfile.write(' gLd=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gLd), input_name='gLd')), )) + if self.gNa is not None and 'gNa' not in already_processed: + already_processed.add('gNa') + outfile.write(' gNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gNa), input_name='gNa')), )) + if self.gKdr is not None and 'gKdr' not in already_processed: + already_processed.add('gKdr') + outfile.write(' gKdr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKdr), input_name='gKdr')), )) + if self.gCa is not None and 'gCa' not in already_processed: + already_processed.add('gCa') + outfile.write(' gCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gCa), input_name='gCa')), )) + if self.gKahp is not None and 'gKahp' not in already_processed: + already_processed.add('gKahp') + outfile.write(' gKahp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKahp), input_name='gKahp')), )) + if self.gKC is not None and 'gKC' not in already_processed: + already_processed.add('gKC') + outfile.write(' gKC=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKC), input_name='gKC')), )) + if self.gNmda is not None and 'gNmda' not in already_processed: + already_processed.add('gNmda') + outfile.write(' gNmda=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gNmda), input_name='gNmda')), )) + if self.gAmpa is not None and 'gAmpa' not in already_processed: + already_processed.add('gAmpa') + outfile.write(' gAmpa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gAmpa), input_name='gAmpa')), )) + if self.eNa is not None and 'eNa' not in already_processed: + already_processed.add('eNa') + outfile.write(' eNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eNa), input_name='eNa')), )) + if self.eCa is not None and 'eCa' not in already_processed: + already_processed.add('eCa') + outfile.write(' eCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eCa), input_name='eCa')), )) + if self.eK is not None and 'eK' not in already_processed: + already_processed.add('eK') + outfile.write(' eK=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eK), input_name='eK')), )) + if self.eL is not None and 'eL' not in already_processed: + already_processed.add('eL') + outfile.write(' eL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eL), input_name='eL')), )) if self.qd0 is not None and 'qd0' not in already_processed: already_processed.add('qd0') - outfile.write(' qd0=%s' % (quote_attrib(self.qd0), )) + outfile.write(' qd0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.qd0), input_name='qd0')), )) if self.pp is not None and 'pp' not in already_processed: already_processed.add('pp') - outfile.write(' pp=%s' % (quote_attrib(self.pp), )) + outfile.write(' pp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pp), input_name='pp')), )) if self.alphac is not None and 'alphac' not in already_processed: already_processed.add('alphac') - outfile.write(' alphac=%s' % (quote_attrib(self.alphac), )) + outfile.write(' alphac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.alphac), input_name='alphac')), )) if self.betac is not None and 'betac' not in already_processed: already_processed.add('betac') - outfile.write(' betac=%s' % (quote_attrib(self.betac), )) + outfile.write(' betac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.betac), input_name='betac')), )) if self.cm is not None and 'cm' not in already_processed: already_processed.add('cm') - outfile.write(' cm=%s' % (quote_attrib(self.cm), )) + outfile.write(' cm=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cm), input_name='cm')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PinskyRinzelCA3Cell', fromsubclass_=False, pretty_print=True): - super(PinskyRinzelCA3Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(PinskyRinzelCA3Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('iSoma', node) if value is not None and 'iSoma' not in already_processed: already_processed.add('iSoma') - self.i_soma = value - self.validate_Nml2Quantity_currentDensity(self.i_soma) # validate type Nml2Quantity_currentDensity + self.iSoma = value + self.validate_Nml2Quantity_currentDensity(self.iSoma) # validate type Nml2Quantity_currentDensity value = find_attr_value_('iDend', node) if value is not None and 'iDend' not in already_processed: already_processed.add('iDend') - self.i_dend = value - self.validate_Nml2Quantity_currentDensity(self.i_dend) # validate type Nml2Quantity_currentDensity + self.iDend = value + self.validate_Nml2Quantity_currentDensity(self.iDend) # validate type Nml2Quantity_currentDensity value = find_attr_value_('gc', node) if value is not None and 'gc' not in already_processed: already_processed.add('gc') @@ -18268,68 +21277,68 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gLs', node) if value is not None and 'gLs' not in already_processed: already_processed.add('gLs') - self.g_ls = value - self.validate_Nml2Quantity_conductanceDensity(self.g_ls) # validate type Nml2Quantity_conductanceDensity + self.gLs = value + self.validate_Nml2Quantity_conductanceDensity(self.gLs) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gLd', node) if value is not None and 'gLd' not in already_processed: already_processed.add('gLd') - self.g_ld = value - self.validate_Nml2Quantity_conductanceDensity(self.g_ld) # validate type Nml2Quantity_conductanceDensity + self.gLd = value + self.validate_Nml2Quantity_conductanceDensity(self.gLd) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gNa', node) if value is not None and 'gNa' not in already_processed: already_processed.add('gNa') - self.g_na = value - self.validate_Nml2Quantity_conductanceDensity(self.g_na) # validate type Nml2Quantity_conductanceDensity + self.gNa = value + self.validate_Nml2Quantity_conductanceDensity(self.gNa) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKdr', node) if value is not None and 'gKdr' not in already_processed: already_processed.add('gKdr') - self.g_kdr = value - self.validate_Nml2Quantity_conductanceDensity(self.g_kdr) # validate type Nml2Quantity_conductanceDensity + self.gKdr = value + self.validate_Nml2Quantity_conductanceDensity(self.gKdr) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gCa', node) if value is not None and 'gCa' not in already_processed: already_processed.add('gCa') - self.g_ca = value - self.validate_Nml2Quantity_conductanceDensity(self.g_ca) # validate type Nml2Quantity_conductanceDensity + self.gCa = value + self.validate_Nml2Quantity_conductanceDensity(self.gCa) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKahp', node) if value is not None and 'gKahp' not in already_processed: already_processed.add('gKahp') - self.g_kahp = value - self.validate_Nml2Quantity_conductanceDensity(self.g_kahp) # validate type Nml2Quantity_conductanceDensity + self.gKahp = value + self.validate_Nml2Quantity_conductanceDensity(self.gKahp) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKC', node) if value is not None and 'gKC' not in already_processed: already_processed.add('gKC') - self.g_kc = value - self.validate_Nml2Quantity_conductanceDensity(self.g_kc) # validate type Nml2Quantity_conductanceDensity + self.gKC = value + self.validate_Nml2Quantity_conductanceDensity(self.gKC) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gNmda', node) if value is not None and 'gNmda' not in already_processed: already_processed.add('gNmda') - self.g_nmda = value - self.validate_Nml2Quantity_conductanceDensity(self.g_nmda) # validate type Nml2Quantity_conductanceDensity + self.gNmda = value + self.validate_Nml2Quantity_conductanceDensity(self.gNmda) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gAmpa', node) if value is not None and 'gAmpa' not in already_processed: already_processed.add('gAmpa') - self.g_ampa = value - self.validate_Nml2Quantity_conductanceDensity(self.g_ampa) # validate type Nml2Quantity_conductanceDensity + self.gAmpa = value + self.validate_Nml2Quantity_conductanceDensity(self.gAmpa) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('eNa', node) if value is not None and 'eNa' not in already_processed: already_processed.add('eNa') - self.e_na = value - self.validate_Nml2Quantity_voltage(self.e_na) # validate type Nml2Quantity_voltage + self.eNa = value + self.validate_Nml2Quantity_voltage(self.eNa) # validate type Nml2Quantity_voltage value = find_attr_value_('eCa', node) if value is not None and 'eCa' not in already_processed: already_processed.add('eCa') - self.e_ca = value - self.validate_Nml2Quantity_voltage(self.e_ca) # validate type Nml2Quantity_voltage + self.eCa = value + self.validate_Nml2Quantity_voltage(self.eCa) # validate type Nml2Quantity_voltage value = find_attr_value_('eK', node) if value is not None and 'eK' not in already_processed: already_processed.add('eK') - self.e_k = value - self.validate_Nml2Quantity_voltage(self.e_k) # validate type Nml2Quantity_voltage + self.eK = value + self.validate_Nml2Quantity_voltage(self.eK) # validate type Nml2Quantity_voltage value = find_attr_value_('eL', node) if value is not None and 'eL' not in already_processed: already_processed.add('eL') - self.e_l = value - self.validate_Nml2Quantity_voltage(self.e_l) # validate type Nml2Quantity_voltage + self.eL = value + self.validate_Nml2Quantity_voltage(self.eL) # validate type Nml2Quantity_voltage value = find_attr_value_('qd0', node) if value is not None and 'qd0' not in already_processed: already_processed.add('qd0') @@ -18356,33 +21365,43 @@ def buildAttributes(self, node, attrs, already_processed): self.cm = value self.validate_Nml2Quantity_specificCapacitance(self.cm) # validate type Nml2Quantity_specificCapacitance super(PinskyRinzelCA3Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(PinskyRinzelCA3Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class PinskyRinzelCA3Cell class FitzHughNagumo1969Cell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('phi', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('V0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('W0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('phi', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('V0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('W0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(FitzHughNagumo1969Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(FitzHughNagumo1969Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.a = _cast(None, a) + self.a_nsprefix_ = None self.b = _cast(None, b) + self.b_nsprefix_ = None self.I = _cast(None, I) + self.I_nsprefix_ = None self.phi = _cast(None, phi) + self.phi_nsprefix_ = None self.V0 = _cast(None, V0) + self.V0_nsprefix_ = None self.W0 = _cast(None, W0) + self.W0_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18396,11 +21415,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(FitzHughNagumo1969Cell, self).hasContent_() @@ -18418,6 +21441,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18433,30 +21458,34 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FitzHughNagumo1969Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FitzHughNagumo1969Cell') if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (quote_attrib(self.a), )) + outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (quote_attrib(self.b), )) + outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) if self.I is not None and 'I' not in already_processed: already_processed.add('I') - outfile.write(' I=%s' % (quote_attrib(self.I), )) + outfile.write(' I=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.I), input_name='I')), )) if self.phi is not None and 'phi' not in already_processed: already_processed.add('phi') - outfile.write(' phi=%s' % (quote_attrib(self.phi), )) + outfile.write(' phi=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phi), input_name='phi')), )) if self.V0 is not None and 'V0' not in already_processed: already_processed.add('V0') - outfile.write(' V0=%s' % (quote_attrib(self.V0), )) + outfile.write(' V0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.V0), input_name='V0')), )) if self.W0 is not None and 'W0' not in already_processed: already_processed.add('W0') - outfile.write(' W0=%s' % (quote_attrib(self.W0), )) + outfile.write(' W0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.W0), input_name='W0')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FitzHughNagumo1969Cell', fromsubclass_=False, pretty_print=True): - super(FitzHughNagumo1969Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(FitzHughNagumo1969Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('a', node) @@ -18490,23 +21519,28 @@ def buildAttributes(self, node, attrs, already_processed): self.W0 = value self.validate_Nml2Quantity_none(self.W0) # validate type Nml2Quantity_none super(FitzHughNagumo1969Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(FitzHughNagumo1969Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class FitzHughNagumo1969Cell class FitzHughNagumoCell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, I=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, I=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(FitzHughNagumoCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(FitzHughNagumoCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.I = _cast(None, I) + self.I_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18520,11 +21554,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(FitzHughNagumoCell, self).hasContent_() @@ -18542,6 +21580,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18557,15 +21597,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FitzHughNagumoCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FitzHughNagumoCell') if self.I is not None and 'I' not in already_processed: already_processed.add('I') - outfile.write(' I=%s' % (quote_attrib(self.I), )) + outfile.write(' I=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.I), input_name='I')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FitzHughNagumoCell', fromsubclass_=False, pretty_print=True): - super(FitzHughNagumoCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(FitzHughNagumoCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('I', node) @@ -18574,25 +21618,30 @@ def buildAttributes(self, node, attrs, already_processed): self.I = value self.validate_Nml2Quantity_none(self.I) # validate type Nml2Quantity_none super(FitzHughNagumoCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(FitzHughNagumoCell, self).buildChildren(child_, node, nodeName_, True) pass # end class FitzHughNagumoCell class BaseCellMembPotCap(BaseCell): - """This is to prevent it conflicting with attribute c (lowercase) e.g. - in izhikevichCell2007""" + """This is to prevent it conflicting with attribute c (lowercase) e.g. in + izhikevichCell2007""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': u'required'}), + MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseCellMembPotCap, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseCellMembPotCap, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.C = _cast(None, C) + self.C_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -18607,11 +21656,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_capacitance(self, value): # Validate type Nml2Quantity_capacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_capacitance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_capacitance_patterns_, )) - validate_Nml2Quantity_capacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_capacitance_patterns_, )) + validate_Nml2Quantity_capacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF))$']] def hasContent_(self): if ( super(BaseCellMembPotCap, self).hasContent_() @@ -18629,6 +21682,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18644,19 +21699,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseCellMembPotCap, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseCellMembPotCap') if self.C is not None and 'C' not in already_processed: already_processed.add('C') - outfile.write(' C=%s' % (quote_attrib(self.C), )) + outfile.write(' C=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.C), input_name='C')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCellMembPotCap', fromsubclass_=False, pretty_print=True): - super(BaseCellMembPotCap, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseCellMembPotCap, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('C', node) @@ -18669,33 +21732,43 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCellMembPotCap, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseCellMembPotCap, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCellMembPotCap class IzhikevichCell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('c', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), - MemberSpec_('d', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('c', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('d', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IzhikevichCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(IzhikevichCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.v0 = _cast(None, v0) + self.v0_nsprefix_ = None self.thresh = _cast(None, thresh) + self.thresh_nsprefix_ = None self.a = _cast(None, a) + self.a_nsprefix_ = None self.b = _cast(None, b) + self.b_nsprefix_ = None self.c = _cast(None, c) + self.c_nsprefix_ = None self.d = _cast(None, d) + self.d_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18709,18 +21782,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] def hasContent_(self): if ( super(IzhikevichCell, self).hasContent_() @@ -18738,6 +21819,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18753,30 +21836,34 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IzhikevichCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IzhikevichCell') if self.v0 is not None and 'v0' not in already_processed: already_processed.add('v0') - outfile.write(' v0=%s' % (quote_attrib(self.v0), )) + outfile.write(' v0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v0), input_name='v0')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) + outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (quote_attrib(self.a), )) + outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (quote_attrib(self.b), )) + outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) if self.c is not None and 'c' not in already_processed: already_processed.add('c') - outfile.write(' c=%s' % (quote_attrib(self.c), )) + outfile.write(' c=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.c), input_name='c')), )) if self.d is not None and 'd' not in already_processed: already_processed.add('d') - outfile.write(' d=%s' % (quote_attrib(self.d), )) + outfile.write(' d=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.d), input_name='d')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IzhikevichCell', fromsubclass_=False, pretty_print=True): - super(IzhikevichCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IzhikevichCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v0', node) @@ -18810,31 +21897,40 @@ def buildAttributes(self, node, attrs, already_processed): self.d = value self.validate_Nml2Quantity_none(self.d) # validate type Nml2Quantity_none super(IzhikevichCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IzhikevichCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IzhikevichCell class IafCell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': u'required'}), - MemberSpec_('leak_conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('leakReversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': 'required'}), + MemberSpec_('leakConductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, C=None, leakConductance=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IafCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) - self.leak_reversal = _cast(None, leak_reversal) + self.ns_prefix_ = None + super(IafCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + self.leakReversal = _cast(None, leakReversal) + self.leakReversal_nsprefix_ = None self.thresh = _cast(None, thresh) + self.thresh_nsprefix_ = None self.reset = _cast(None, reset) + self.reset_nsprefix_ = None self.C = _cast(None, C) - self.leak_conductance = _cast(None, leak_conductance) + self.C_nsprefix_ = None + self.leakConductance = _cast(None, leakConductance) + self.leakConductance_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -18849,25 +21945,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_capacitance(self, value): # Validate type Nml2Quantity_capacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_capacitance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_capacitance_patterns_, )) - validate_Nml2Quantity_capacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_capacitance_patterns_, )) + validate_Nml2Quantity_capacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF))$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( super(IafCell, self).hasContent_() @@ -18885,6 +21993,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18898,40 +22008,48 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IafCell'): super(IafCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafCell') - if self.leak_reversal is not None and 'leak_reversal' not in already_processed: - already_processed.add('leak_reversal') - outfile.write(' leakReversal=%s' % (quote_attrib(self.leak_reversal), )) + if self.leakReversal is not None and 'leakReversal' not in already_processed: + already_processed.add('leakReversal') + outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakReversal), input_name='leakReversal')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) + outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (quote_attrib(self.reset), )) + outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) if self.C is not None and 'C' not in already_processed: already_processed.add('C') - outfile.write(' C=%s' % (quote_attrib(self.C), )) - if self.leak_conductance is not None and 'leak_conductance' not in already_processed: - already_processed.add('leak_conductance') - outfile.write(' leakConductance=%s' % (quote_attrib(self.leak_conductance), )) + outfile.write(' C=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.C), input_name='C')), )) + if self.leakConductance is not None and 'leakConductance' not in already_processed: + already_processed.add('leakConductance') + outfile.write(' leakConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakConductance), input_name='leakConductance')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafCell', fromsubclass_=False, pretty_print=True): - super(IafCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IafCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) if value is not None and 'leakReversal' not in already_processed: already_processed.add('leakReversal') - self.leak_reversal = value - self.validate_Nml2Quantity_voltage(self.leak_reversal) # validate type Nml2Quantity_voltage + self.leakReversal = value + self.validate_Nml2Quantity_voltage(self.leakReversal) # validate type Nml2Quantity_voltage value = find_attr_value_('thresh', node) if value is not None and 'thresh' not in already_processed: already_processed.add('thresh') @@ -18950,36 +22068,44 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakConductance', node) if value is not None and 'leakConductance' not in already_processed: already_processed.add('leakConductance') - self.leak_conductance = value - self.validate_Nml2Quantity_conductance(self.leak_conductance) # validate type Nml2Quantity_conductance + self.leakConductance = value + self.validate_Nml2Quantity_conductance(self.leakConductance) # validate type Nml2Quantity_conductance value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(IafCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IafCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafCell class IafTauCell(BaseCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('leakReversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IafTauCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) - self.leak_reversal = _cast(None, leak_reversal) + self.ns_prefix_ = None + super(IafTauCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + self.leakReversal = _cast(None, leakReversal) + self.leakReversal_nsprefix_ = None self.thresh = _cast(None, thresh) + self.thresh_nsprefix_ = None self.reset = _cast(None, reset) + self.reset_nsprefix_ = None self.tau = _cast(None, tau) + self.tau_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -18994,18 +22120,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(IafTauCell, self).hasContent_() @@ -19023,6 +22157,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19036,37 +22172,45 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IafTauCell'): super(IafTauCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafTauCell') - if self.leak_reversal is not None and 'leak_reversal' not in already_processed: - already_processed.add('leak_reversal') - outfile.write(' leakReversal=%s' % (quote_attrib(self.leak_reversal), )) + if self.leakReversal is not None and 'leakReversal' not in already_processed: + already_processed.add('leakReversal') + outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakReversal), input_name='leakReversal')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) + outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (quote_attrib(self.reset), )) + outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (quote_attrib(self.tau), )) + outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafTauCell', fromsubclass_=False, pretty_print=True): - super(IafTauCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IafTauCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) if value is not None and 'leakReversal' not in already_processed: already_processed.add('leakReversal') - self.leak_reversal = value - self.validate_Nml2Quantity_voltage(self.leak_reversal) # validate type Nml2Quantity_voltage + self.leakReversal = value + self.validate_Nml2Quantity_voltage(self.leakReversal) # validate type Nml2Quantity_voltage value = find_attr_value_('thresh', node) if value is not None and 'thresh' not in already_processed: already_processed.add('thresh') @@ -19087,7 +22231,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IafTauCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IafTauCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafTauCell @@ -19096,24 +22240,33 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class GradedSynapse(BaseSynapse): """Based on synapse in Methods of http://www.nature.com/neuro/journal/v7/n12/abs/nn1352.html.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('delta', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('Vth', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('k', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('delta', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('Vth', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('k', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(GradedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.conductance = _cast(None, conductance) + self.conductance_nsprefix_ = None self.delta = _cast(None, delta) + self.delta_nsprefix_ = None self.Vth = _cast(None, Vth) + self.Vth_nsprefix_ = None self.k = _cast(None, k) + self.k_nsprefix_ = None self.erev = _cast(None, erev) + self.erev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19127,25 +22280,37 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def hasContent_(self): if ( super(GradedSynapse, self).hasContent_() @@ -19163,6 +22328,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19178,27 +22345,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GradedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GradedSynapse') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) + outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) if self.delta is not None and 'delta' not in already_processed: already_processed.add('delta') - outfile.write(' delta=%s' % (quote_attrib(self.delta), )) + outfile.write(' delta=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delta), input_name='delta')), )) if self.Vth is not None and 'Vth' not in already_processed: already_processed.add('Vth') - outfile.write(' Vth=%s' % (quote_attrib(self.Vth), )) + outfile.write(' Vth=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Vth), input_name='Vth')), )) if self.k is not None and 'k' not in already_processed: already_processed.add('k') - outfile.write(' k=%s' % (quote_attrib(self.k), )) + outfile.write(' k=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.k), input_name='k')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GradedSynapse', fromsubclass_=False, pretty_print=True): - super(GradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(GradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -19227,7 +22398,7 @@ def buildAttributes(self, node, attrs, already_processed): self.erev = value self.validate_Nml2Quantity_voltage(self.erev) # validate type Nml2Quantity_voltage super(GradedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(GradedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class GradedSynapse @@ -19235,16 +22406,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class LinearGradedSynapse(BaseSynapse): """Behaves just like a one way gap junction.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(LinearGradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(LinearGradedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.conductance = _cast(None, conductance) + self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19258,11 +22434,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( super(LinearGradedSynapse, self).hasContent_() @@ -19280,6 +22460,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19295,15 +22477,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(LinearGradedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='LinearGradedSynapse') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) + outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='LinearGradedSynapse', fromsubclass_=False, pretty_print=True): - super(LinearGradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(LinearGradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -19312,23 +22498,27 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(LinearGradedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(LinearGradedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class LinearGradedSynapse class SilentSynapse(BaseSynapse): - """Dummy synapse which emits no current. Used as presynaptic endpoint - for analog synaptic connection (continuousConnection).""" + """Dummy synapse which emits no current. Used as presynaptic endpoint for + analog synaptic connection (continuousConnection).""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(SilentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(SilentSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19357,6 +22547,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19371,17 +22563,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SilentSynapse'): super(SilentSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SilentSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SilentSynapse', fromsubclass_=False, pretty_print=True): - super(SilentSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(SilentSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(SilentSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SilentSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class SilentSynapse @@ -19389,16 +22585,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class GapJunction(BaseSynapse): """Gap junction/single electrical connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(GapJunction, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(GapJunction, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.conductance = _cast(None, conductance) + self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19412,11 +22613,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( super(GapJunction, self).hasContent_() @@ -19434,6 +22639,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19449,15 +22656,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GapJunction, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GapJunction') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) + outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GapJunction', fromsubclass_=False, pretty_print=True): - super(GapJunction, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(GapJunction, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -19466,21 +22677,25 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(GapJunction, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(GapJunction, self).buildChildren(child_, node, nodeName_, True) pass # end class GapJunction class BaseCurrentBasedSynapse(BaseSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseCurrentBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseCurrentBasedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -19510,6 +22725,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19526,15 +22743,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCurrentBasedSynapse', fromsubclass_=False, pretty_print=True): - super(BaseCurrentBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseCurrentBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -19542,21 +22767,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCurrentBasedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseCurrentBasedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCurrentBasedSynapse class BaseVoltageDepSynapse(BaseSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseVoltageDepSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseVoltageDepSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -19586,6 +22815,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19602,15 +22833,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseVoltageDepSynapse', fromsubclass_=False, pretty_print=True): - super(BaseVoltageDepSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseVoltageDepSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -19618,71 +22857,86 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseVoltageDepSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseVoltageDepSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseVoltageDepSynapse class IonChannel(IonChannelScalable): - """Note ionChannel and ionChannelHH are currently functionally - identical. This is needed since many existing examples use - ionChannel, some use ionChannelHH. NeuroML v2beta4 should remove - one of these, probably ionChannelHH.""" + """Note ionChannel and ionChannelHH are currently functionally identical. + This is needed since many existing examples use ionChannel, some use + ionChannelHH. + NeuroML v2beta4 should remove one of these, probably ionChannelHH.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'NmlId', 0, 1, {'use': u'optional'}), - MemberSpec_('type', 'channelTypes', 0, 1, {'use': u'optional'}), - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': u'optional'}), - MemberSpec_('gates', 'GateHHUndetermined', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHUndetermined', u'name': u'gate', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_hh_rates', 'GateHHRates', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRates', u'name': u'gateHHrates', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_h_hrates_taus', 'GateHHRatesTau', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesTau', u'name': u'gateHHratesTau', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_hh_tau_infs', 'GateHHTauInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHTauInf', u'name': u'gateHHtauInf', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_h_hrates_infs', 'GateHHRatesInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesInf', u'name': u'gateHHratesInf', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_h_hrates_tau_infs', 'GateHHRatesTauInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesTauInf', u'name': u'gateHHratesTauInf', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_hh_instantaneouses', 'GateHHInstantaneous', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHInstantaneous', u'name': u'gateHHInstantaneous', u'minOccurs': u'0'}, 1), - MemberSpec_('gate_fractionals', 'GateFractional', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateFractional', u'name': u'gateFractional', u'minOccurs': u'0'}, 1), + MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('type_', 'channelTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), + MemberSpec_('gate', 'GateHHUndetermined', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gate', 'type': 'GateHHUndetermined'}, 1), + MemberSpec_('gateHHrates', 'GateHHRates', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHrates', 'type': 'GateHHRates'}, 1), + MemberSpec_('gateHHratesTau', 'GateHHRatesTau', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTau', 'type': 'GateHHRatesTau'}, 1), + MemberSpec_('gateHHtauInf', 'GateHHTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHtauInf', 'type': 'GateHHTauInf'}, 1), + MemberSpec_('gateHHratesInf', 'GateHHRatesInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesInf', 'type': 'GateHHRatesInf'}, 1), + MemberSpec_('gateHHratesTauInf', 'GateHHRatesTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTauInf', 'type': 'GateHHRatesTauInf'}, 1), + MemberSpec_('gateHHInstantaneous', 'GateHHInstantaneous', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHInstantaneous', 'type': 'GateHHInstantaneous'}, 1), + MemberSpec_('gateFractional', 'GateFractional', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateFractional', 'type': 'GateFractional'}, 1), ] subclass = None superclass = IonChannelScalable - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IonChannel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(IonChannel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, extensiontype_, **kwargs_) self.species = _cast(None, species) - self.type = _cast(None, type) + self.species_nsprefix_ = None + self.type_ = _cast(None, type_) + self.type__nsprefix_ = None self.conductance = _cast(None, conductance) - if gates is None: - self.gates = [] - else: - self.gates = gates - if gate_hh_rates is None: - self.gate_hh_rates = [] - else: - self.gate_hh_rates = gate_hh_rates - if gate_h_hrates_taus is None: - self.gate_h_hrates_taus = [] - else: - self.gate_h_hrates_taus = gate_h_hrates_taus - if gate_hh_tau_infs is None: - self.gate_hh_tau_infs = [] - else: - self.gate_hh_tau_infs = gate_hh_tau_infs - if gate_h_hrates_infs is None: - self.gate_h_hrates_infs = [] - else: - self.gate_h_hrates_infs = gate_h_hrates_infs - if gate_h_hrates_tau_infs is None: - self.gate_h_hrates_tau_infs = [] - else: - self.gate_h_hrates_tau_infs = gate_h_hrates_tau_infs - if gate_hh_instantaneouses is None: - self.gate_hh_instantaneouses = [] - else: - self.gate_hh_instantaneouses = gate_hh_instantaneouses - if gate_fractionals is None: - self.gate_fractionals = [] - else: - self.gate_fractionals = gate_fractionals + self.conductance_nsprefix_ = None + if gate is None: + self.gate = [] + else: + self.gate = gate + self.gate_nsprefix_ = None + if gateHHrates is None: + self.gateHHrates = [] + else: + self.gateHHrates = gateHHrates + self.gateHHrates_nsprefix_ = None + if gateHHratesTau is None: + self.gateHHratesTau = [] + else: + self.gateHHratesTau = gateHHratesTau + self.gateHHratesTau_nsprefix_ = None + if gateHHtauInf is None: + self.gateHHtauInf = [] + else: + self.gateHHtauInf = gateHHtauInf + self.gateHHtauInf_nsprefix_ = None + if gateHHratesInf is None: + self.gateHHratesInf = [] + else: + self.gateHHratesInf = gateHHratesInf + self.gateHHratesInf_nsprefix_ = None + if gateHHratesTauInf is None: + self.gateHHratesTauInf = [] + else: + self.gateHHratesTauInf = gateHHratesTauInf + self.gateHHratesTauInf_nsprefix_ = None + if gateHHInstantaneous is None: + self.gateHHInstantaneous = [] + else: + self.gateHHInstantaneous = gateHHInstantaneous + self.gateHHInstantaneous_nsprefix_ = None + if gateFractional is None: + self.gateFractional = [] + else: + self.gateFractional = gateFractional + self.gateFractional_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -19697,40 +22951,49 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def validate_channelTypes(self, value): # Validate type channelTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_: - value = str(value) + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False + value = value enumerations = ['ionChannelPassive', 'ionChannelHH'] - enumeration_respectee = False - for enum in enumerations: - if value == enum: - enumeration_respectee = True - break - if not enumeration_respectee: - warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on channelTypes' % {"value" : value.encode("utf-8")} ) + if value not in enumerations: + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on channelTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) + result = False def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( - self.gates or - self.gate_hh_rates or - self.gate_h_hrates_taus or - self.gate_hh_tau_infs or - self.gate_h_hrates_infs or - self.gate_h_hrates_tau_infs or - self.gate_hh_instantaneouses or - self.gate_fractionals or + self.gate or + self.gateHHrates or + self.gateHHratesTau or + self.gateHHtauInf or + self.gateHHratesInf or + self.gateHHratesTauInf or + self.gateHHInstantaneous or + self.gateFractional or super(IonChannel, self).hasContent_() ): return True @@ -19746,6 +23009,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19761,45 +23026,61 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IonChannel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannel') if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (quote_attrib(self.species), )) - if self.type is not None and 'type' not in already_processed: - already_processed.add('type') - outfile.write(' type=%s' % (quote_attrib(self.type), )) + outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) + if self.type_ is not None and 'type_' not in already_processed: + already_processed.add('type_') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) + outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannel', fromsubclass_=False, pretty_print=True): - super(IonChannel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(IonChannel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for gate_ in self.gates: + for gate_ in self.gate: + namespaceprefix_ = self.gate_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_nsprefix_) else '' gate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gate', pretty_print=pretty_print) - for gateHHrates_ in self.gate_hh_rates: + for gateHHrates_ in self.gateHHrates: + namespaceprefix_ = self.gateHHrates_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHrates_nsprefix_) else '' gateHHrates_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHrates', pretty_print=pretty_print) - for gateHHratesTau_ in self.gate_h_hrates_taus: + for gateHHratesTau_ in self.gateHHratesTau: + namespaceprefix_ = self.gateHHratesTau_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesTau_nsprefix_) else '' gateHHratesTau_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTau', pretty_print=pretty_print) - for gateHHtauInf_ in self.gate_hh_tau_infs: + for gateHHtauInf_ in self.gateHHtauInf: + namespaceprefix_ = self.gateHHtauInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHtauInf_nsprefix_) else '' gateHHtauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHtauInf', pretty_print=pretty_print) - for gateHHratesInf_ in self.gate_h_hrates_infs: + for gateHHratesInf_ in self.gateHHratesInf: + namespaceprefix_ = self.gateHHratesInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesInf_nsprefix_) else '' gateHHratesInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesInf', pretty_print=pretty_print) - for gateHHratesTauInf_ in self.gate_h_hrates_tau_infs: + for gateHHratesTauInf_ in self.gateHHratesTauInf: + namespaceprefix_ = self.gateHHratesTauInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesTauInf_nsprefix_) else '' gateHHratesTauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTauInf', pretty_print=pretty_print) - for gateHHInstantaneous_ in self.gate_hh_instantaneouses: + for gateHHInstantaneous_ in self.gateHHInstantaneous: + namespaceprefix_ = self.gateHHInstantaneous_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHInstantaneous_nsprefix_) else '' gateHHInstantaneous_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHInstantaneous', pretty_print=pretty_print) - for gateFractional_ in self.gate_fractionals: + for gateFractional_ in self.gateFractional: + namespaceprefix_ = self.gateFractional_nsprefix_ + ':' if (UseCapturedNS_ and self.gateFractional_nsprefix_) else '' gateFractional_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateFractional', pretty_print=pretty_print) - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('species', node) @@ -19810,8 +23091,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type = value - self.validate_channelTypes(self.type) # validate type channelTypes + self.type_ = value + self.validate_channelTypes(self.type_) # validate type channelTypes value = find_attr_value_('conductance', node) if value is not None and 'conductance' not in already_processed: already_processed.add('conductance') @@ -19822,60 +23103,64 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IonChannel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'gate': obj_ = GateHHUndetermined.factory(parent_object_=self) - obj_.build(child_) - self.gates.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gate.append(obj_) obj_.original_tagname_ = 'gate' elif nodeName_ == 'gateHHrates': obj_ = GateHHRates.factory(parent_object_=self) - obj_.build(child_) - self.gate_hh_rates.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHrates.append(obj_) obj_.original_tagname_ = 'gateHHrates' elif nodeName_ == 'gateHHratesTau': obj_ = GateHHRatesTau.factory(parent_object_=self) - obj_.build(child_) - self.gate_h_hrates_taus.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHratesTau.append(obj_) obj_.original_tagname_ = 'gateHHratesTau' elif nodeName_ == 'gateHHtauInf': obj_ = GateHHTauInf.factory(parent_object_=self) - obj_.build(child_) - self.gate_hh_tau_infs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHtauInf.append(obj_) obj_.original_tagname_ = 'gateHHtauInf' elif nodeName_ == 'gateHHratesInf': obj_ = GateHHRatesInf.factory(parent_object_=self) - obj_.build(child_) - self.gate_h_hrates_infs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHratesInf.append(obj_) obj_.original_tagname_ = 'gateHHratesInf' elif nodeName_ == 'gateHHratesTauInf': obj_ = GateHHRatesTauInf.factory(parent_object_=self) - obj_.build(child_) - self.gate_h_hrates_tau_infs.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHratesTauInf.append(obj_) obj_.original_tagname_ = 'gateHHratesTauInf' elif nodeName_ == 'gateHHInstantaneous': obj_ = GateHHInstantaneous.factory(parent_object_=self) - obj_.build(child_) - self.gate_hh_instantaneouses.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateHHInstantaneous.append(obj_) obj_.original_tagname_ = 'gateHHInstantaneous' elif nodeName_ == 'gateFractional': obj_ = GateFractional.factory(parent_object_=self) - obj_.build(child_) - self.gate_fractionals.append(obj_) + obj_.build(child_, gds_collector_=gds_collector_) + self.gateFractional.append(obj_) obj_.original_tagname_ = 'gateFractional' super(IonChannel, self).buildChildren(child_, node, nodeName_, True) # end class IonChannel class AlphaCurrSynapse(BasePynnSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(AlphaCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + self.ns_prefix_ = None + super(AlphaCurrSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19904,6 +23189,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19918,31 +23205,39 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AlphaCurrSynapse'): super(AlphaCurrSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaCurrSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCurrSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(AlphaCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(AlphaCurrSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(AlphaCurrSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCurrSynapse class ExpCurrSynapse(BasePynnSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExpCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + self.ns_prefix_ = None + super(ExpCurrSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19971,6 +23266,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19985,33 +23282,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpCurrSynapse'): super(ExpCurrSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpCurrSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpCurrSynapse', fromsubclass_=False, pretty_print=True): - super(ExpCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ExpCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(ExpCurrSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpCurrSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpCurrSynapse class AlphaCondSynapse(BasePynnSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(AlphaCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + self.ns_prefix_ = None + super(AlphaCondSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) + self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20040,6 +23346,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20057,40 +23365,47 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('e_rev') outfile.write(' e_rev="%s"' % self.gds_format_float(self.e_rev, input_name='e_rev')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCondSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(AlphaCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev', node) if value is not None and 'e_rev' not in already_processed: already_processed.add('e_rev') - try: - self.e_rev = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev') + self.e_rev = value super(AlphaCondSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(AlphaCondSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCondSynapse class ExpCondSynapse(BasePynnSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExpCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + self.ns_prefix_ = None + super(ExpCondSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) + self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20119,6 +23434,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20136,56 +23453,71 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('e_rev') outfile.write(' e_rev="%s"' % self.gds_format_float(self.e_rev, input_name='e_rev')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpCondSynapse', fromsubclass_=False, pretty_print=True): - super(ExpCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ExpCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev', node) if value is not None and 'e_rev' not in already_processed: already_processed.add('e_rev') - try: - self.e_rev = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev') + self.e_rev = value super(ExpCondSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpCondSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpCondSynapse class HH_cond_exp(basePyNNCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v_offset', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_K', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_Na', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_leak', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('g_leak', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('gbar_K', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('gbar_Na', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_offset', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_K', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_Na', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_leak', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('g_leak', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('gbar_K', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('gbar_Na', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = basePyNNCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(HH_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) + self.ns_prefix_ = None + super(HH_cond_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) self.v_offset = _cast(float, v_offset) + self.v_offset_nsprefix_ = None self.e_rev_E = _cast(float, e_rev_E) + self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) + self.e_rev_I_nsprefix_ = None self.e_rev_K = _cast(float, e_rev_K) + self.e_rev_K_nsprefix_ = None self.e_rev_Na = _cast(float, e_rev_Na) + self.e_rev_Na_nsprefix_ = None self.e_rev_leak = _cast(float, e_rev_leak) + self.e_rev_leak_nsprefix_ = None self.g_leak = _cast(float, g_leak) + self.g_leak_nsprefix_ = None self.gbar_K = _cast(float, gbar_K) + self.gbar_K_nsprefix_ = None self.gbar_Na = _cast(float, gbar_Na) + self.gbar_Na_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20214,6 +23546,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20255,104 +23589,99 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('gbar_Na') outfile.write(' gbar_Na="%s"' % self.gds_format_float(self.gbar_Na, input_name='gbar_Na')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HH_cond_exp', fromsubclass_=False, pretty_print=True): - super(HH_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(HH_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v_offset', node) if value is not None and 'v_offset' not in already_processed: already_processed.add('v_offset') - try: - self.v_offset = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_offset): %s' % exp) + value = self.gds_parse_float(value, node, 'v_offset') + self.v_offset = value value = find_attr_value_('e_rev_E', node) if value is not None and 'e_rev_E' not in already_processed: already_processed.add('e_rev_E') - try: - self.e_rev_E = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_E): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_E') + self.e_rev_E = value value = find_attr_value_('e_rev_I', node) if value is not None and 'e_rev_I' not in already_processed: already_processed.add('e_rev_I') - try: - self.e_rev_I = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_I): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_I') + self.e_rev_I = value value = find_attr_value_('e_rev_K', node) if value is not None and 'e_rev_K' not in already_processed: already_processed.add('e_rev_K') - try: - self.e_rev_K = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_K): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_K') + self.e_rev_K = value value = find_attr_value_('e_rev_Na', node) if value is not None and 'e_rev_Na' not in already_processed: already_processed.add('e_rev_Na') - try: - self.e_rev_Na = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_Na): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_Na') + self.e_rev_Na = value value = find_attr_value_('e_rev_leak', node) if value is not None and 'e_rev_leak' not in already_processed: already_processed.add('e_rev_leak') - try: - self.e_rev_leak = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_leak): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_leak') + self.e_rev_leak = value value = find_attr_value_('g_leak', node) if value is not None and 'g_leak' not in already_processed: already_processed.add('g_leak') - try: - self.g_leak = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (g_leak): %s' % exp) + value = self.gds_parse_float(value, node, 'g_leak') + self.g_leak = value value = find_attr_value_('gbar_K', node) if value is not None and 'gbar_K' not in already_processed: already_processed.add('gbar_K') - try: - self.gbar_K = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (gbar_K): %s' % exp) + value = self.gds_parse_float(value, node, 'gbar_K') + self.gbar_K = value value = find_attr_value_('gbar_Na', node) if value is not None and 'gbar_Na' not in already_processed: already_processed.add('gbar_Na') - try: - self.gbar_Na = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (gbar_Na): %s' % exp) + value = self.gds_parse_float(value, node, 'gbar_Na') + self.gbar_Na = value super(HH_cond_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(HH_cond_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class HH_cond_exp class basePyNNIaFCell(basePyNNCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_m', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('tau_refrac', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('v_reset', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('v_rest', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('v_thresh', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_m', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_refrac', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_reset', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_rest', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_thresh', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = basePyNNCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(basePyNNIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(basePyNNIaFCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) self.tau_m = _cast(float, tau_m) + self.tau_m_nsprefix_ = None self.tau_refrac = _cast(float, tau_refrac) + self.tau_refrac_nsprefix_ = None self.v_reset = _cast(float, v_reset) + self.v_reset_nsprefix_ = None self.v_rest = _cast(float, v_rest) + self.v_rest_nsprefix_ = None self.v_thresh = _cast(float, v_thresh) + self.v_thresh_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -20382,6 +23711,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20413,58 +23744,56 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNIaFCell', fromsubclass_=False, pretty_print=True): - super(basePyNNIaFCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(basePyNNIaFCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau_m', node) if value is not None and 'tau_m' not in already_processed: already_processed.add('tau_m') - try: - self.tau_m = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_m): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_m') + self.tau_m = value value = find_attr_value_('tau_refrac', node) if value is not None and 'tau_refrac' not in already_processed: already_processed.add('tau_refrac') - try: - self.tau_refrac = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_refrac): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_refrac') + self.tau_refrac = value value = find_attr_value_('v_reset', node) if value is not None and 'v_reset' not in already_processed: already_processed.add('v_reset') - try: - self.v_reset = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_reset): %s' % exp) + value = self.gds_parse_float(value, node, 'v_reset') + self.v_reset = value value = find_attr_value_('v_rest', node) if value is not None and 'v_rest' not in already_processed: already_processed.add('v_rest') - try: - self.v_rest = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_rest): %s' % exp) + value = self.gds_parse_float(value, node, 'v_rest') + self.v_rest = value value = find_attr_value_('v_thresh', node) if value is not None and 'v_thresh' not in already_processed: already_processed.add('v_thresh') - try: - self.v_thresh = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_thresh): %s' % exp) + value = self.gds_parse_float(value, node, 'v_thresh') + self.v_thresh = value value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNIaFCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(basePyNNIaFCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNIaFCell @@ -20472,18 +23801,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ContinuousConnection(BaseConnectionNewFormat): """Individual continuous/analog synaptic connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pre_component', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('post_component', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('preComponent', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('postComponent', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ContinuousConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) - self.pre_component = _cast(None, pre_component) - self.post_component = _cast(None, post_component) + self.ns_prefix_ = None + super(ContinuousConnection, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, extensiontype_, **kwargs_) + self.preComponent = _cast(None, preComponent) + self.preComponent_nsprefix_ = None + self.postComponent = _cast(None, postComponent) + self.postComponent_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -20498,11 +23833,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( super(ContinuousConnection, self).hasContent_() @@ -20520,6 +23859,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20532,43 +23873,51 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ContinuousConnection'): super(ContinuousConnection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContinuousConnection') - if self.pre_component is not None and 'pre_component' not in already_processed: - already_processed.add('pre_component') - outfile.write(' preComponent=%s' % (quote_attrib(self.pre_component), )) - if self.post_component is not None and 'post_component' not in already_processed: - already_processed.add('post_component') - outfile.write(' postComponent=%s' % (quote_attrib(self.post_component), )) + if self.preComponent is not None and 'preComponent' not in already_processed: + already_processed.add('preComponent') + outfile.write(' preComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preComponent), input_name='preComponent')), )) + if self.postComponent is not None and 'postComponent' not in already_processed: + already_processed.add('postComponent') + outfile.write(' postComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postComponent), input_name='postComponent')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnection', fromsubclass_=False, pretty_print=True): - super(ContinuousConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ContinuousConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preComponent', node) if value is not None and 'preComponent' not in already_processed: already_processed.add('preComponent') - self.pre_component = value - self.validate_NmlId(self.pre_component) # validate type NmlId + self.preComponent = value + self.validate_NmlId(self.preComponent) # validate type NmlId value = find_attr_value_('postComponent', node) if value is not None and 'postComponent' not in already_processed: already_processed.add('postComponent') - self.post_component = value - self.validate_NmlId(self.post_component) # validate type NmlId + self.postComponent = value + self.validate_NmlId(self.postComponent) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(ContinuousConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ContinuousConnection, self).buildChildren(child_, node, nodeName_, True) pass @@ -20620,16 +23969,21 @@ def __str__(self): class ElectricalConnection(BaseConnectionNewFormat): """Individual electrical synaptic connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ElectricalConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(ElectricalConnection, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, extensiontype_, **kwargs_) self.synapse = _cast(None, synapse) + self.synapse_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -20644,11 +23998,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( super(ElectricalConnection, self).hasContent_() @@ -20666,6 +24024,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20680,20 +24040,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ElectricalConnection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ElectricalConnection') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) + outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnection', fromsubclass_=False, pretty_print=True): - super(ElectricalConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ElectricalConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -20706,7 +24074,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ElectricalConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ElectricalConnection, self).buildChildren(child_, node, nodeName_, True) pass @@ -20757,18 +24125,24 @@ def __str__(self): class ConnectionWD(BaseConnectionOldFormat): """Individual synaptic connection with weight and delay""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', weight=None, delay=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', weight=None, delay=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ConnectionWD, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + self.ns_prefix_ = None + super(ConnectionWD, self).__init__(neuroLexId, id, preCellId, preSegmentId, preFractionAlong, postCellId, postSegmentId, postFractionAlong, **kwargs_) self.weight = _cast(float, weight) + self.weight_nsprefix_ = None self.delay = _cast(None, delay) + self.delay_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20782,11 +24156,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(ConnectionWD, self).hasContent_() @@ -20804,6 +24182,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20821,32 +24201,34 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (quote_attrib(self.delay), )) + outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConnectionWD', fromsubclass_=False, pretty_print=True): - super(ConnectionWD, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ConnectionWD, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - try: - self.weight = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (weight): %s' % exp) + value = self.gds_parse_float(value, node, 'weight') + self.weight = value value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: already_processed.add('delay') self.delay = value self.validate_Nml2Quantity_time(self.delay) # validate type Nml2Quantity_time super(ConnectionWD, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ConnectionWD, self).buildChildren(child_, node, nodeName_, True) pass @@ -20908,16 +24290,20 @@ def get_delay_in_ms(self): class Connection(BaseConnectionOldFormat): - """Individual chemical (event based) synaptic connection, weight==1 and - no delay""" + """Individual chemical (event based) synaptic connection, weight==1 and no + delay""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Connection, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + self.ns_prefix_ = None + super(Connection, self).__init__(neuroLexId, id, preCellId, preSegmentId, preFractionAlong, postCellId, postSegmentId, postFractionAlong, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20946,6 +24332,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20959,18 +24347,22 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Connection'): super(Connection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Connection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Connection', fromsubclass_=False, pretty_print=True): - super(Connection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Connection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Connection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Connection, self).buildChildren(child_, node, nodeName_, True) pass @@ -21021,16 +24413,21 @@ def __str__(self): class Cell2CaPools(Cell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('biophysical_properties2_ca_pools', 'BiophysicalProperties2CaPools', 0, 1, {u'type': u'BiophysicalProperties2CaPools', u'name': u'biophysicalProperties2CaPools', u'minOccurs': u'0'}, None), + MemberSpec_('biophysicalProperties2CaPools', 'BiophysicalProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties2CaPools', 'type': 'BiophysicalProperties2CaPools'}, None), ] subclass = None superclass = Cell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, biophysical_properties2_ca_pools=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, morphology_attr=None, biophysicalProperties_attr=None, morphology=None, biophysicalProperties=None, biophysicalProperties2CaPools=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Cell2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) - self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools + self.ns_prefix_ = None + super(Cell2CaPools, self).__init__(neuroLexId, id, metaid, notes, property, annotation, morphology_attr, biophysicalProperties_attr, morphology, biophysicalProperties, **kwargs_) + self.biophysicalProperties2CaPools = biophysicalProperties2CaPools + self.biophysicalProperties2CaPools_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21044,7 +24441,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.biophysical_properties2_ca_pools is not None or + self.biophysicalProperties2CaPools is not None or super(Cell2CaPools, self).hasContent_() ): return True @@ -21060,6 +24457,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21074,61 +24473,80 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Cell2CaPools'): super(Cell2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Cell2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Cell2CaPools', fromsubclass_=False, pretty_print=True): - super(Cell2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(Cell2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if self.biophysical_properties2_ca_pools is not None: - self.biophysical_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties2CaPools', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.biophysicalProperties2CaPools is not None: + namespaceprefix_ = self.biophysicalProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties2CaPools_nsprefix_) else '' + self.biophysicalProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties2CaPools', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(Cell2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'biophysicalProperties2CaPools': obj_ = BiophysicalProperties2CaPools.factory(parent_object_=self) - obj_.build(child_) - self.biophysical_properties2_ca_pools = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.biophysicalProperties2CaPools = obj_ obj_.original_tagname_ = 'biophysicalProperties2CaPools' super(Cell2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class Cell2CaPools class AdExIaFCell(BaseCellMembPotCap): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('g_l', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('EL', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('VT', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('del_t', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('tauw', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('a', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('b', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('gL', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('EL', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('VT', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('delT', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('tauw', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('a', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('b', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, g_l=None, EL=None, reset=None, VT=None, thresh=None, del_t=None, tauw=None, refract=None, a=None, b=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, gL=None, EL=None, reset=None, VT=None, thresh=None, delT=None, tauw=None, refract=None, a=None, b=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(AdExIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) - self.g_l = _cast(None, g_l) + self.ns_prefix_ = None + super(AdExIaFCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, C, **kwargs_) + self.gL = _cast(None, gL) + self.gL_nsprefix_ = None self.EL = _cast(None, EL) + self.EL_nsprefix_ = None self.reset = _cast(None, reset) + self.reset_nsprefix_ = None self.VT = _cast(None, VT) + self.VT_nsprefix_ = None self.thresh = _cast(None, thresh) - self.del_t = _cast(None, del_t) + self.thresh_nsprefix_ = None + self.delT = _cast(None, delT) + self.delT_nsprefix_ = None self.tauw = _cast(None, tauw) + self.tauw_nsprefix_ = None self.refract = _cast(None, refract) + self.refract_nsprefix_ = None self.a = _cast(None, a) + self.a_nsprefix_ = None self.b = _cast(None, b) + self.b_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21142,32 +24560,48 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(AdExIaFCell, self).hasContent_() @@ -21185,6 +24619,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21198,51 +24634,55 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdExIaFCell'): super(AdExIaFCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdExIaFCell') - if self.g_l is not None and 'g_l' not in already_processed: - already_processed.add('g_l') - outfile.write(' gL=%s' % (quote_attrib(self.g_l), )) + if self.gL is not None and 'gL' not in already_processed: + already_processed.add('gL') + outfile.write(' gL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gL), input_name='gL')), )) if self.EL is not None and 'EL' not in already_processed: already_processed.add('EL') - outfile.write(' EL=%s' % (quote_attrib(self.EL), )) + outfile.write(' EL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EL), input_name='EL')), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (quote_attrib(self.reset), )) + outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) if self.VT is not None and 'VT' not in already_processed: already_processed.add('VT') - outfile.write(' VT=%s' % (quote_attrib(self.VT), )) + outfile.write(' VT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.VT), input_name='VT')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) - if self.del_t is not None and 'del_t' not in already_processed: - already_processed.add('del_t') - outfile.write(' delT=%s' % (quote_attrib(self.del_t), )) + outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) + if self.delT is not None and 'delT' not in already_processed: + already_processed.add('delT') + outfile.write(' delT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delT), input_name='delT')), )) if self.tauw is not None and 'tauw' not in already_processed: already_processed.add('tauw') - outfile.write(' tauw=%s' % (quote_attrib(self.tauw), )) + outfile.write(' tauw=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauw), input_name='tauw')), )) if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (quote_attrib(self.refract), )) + outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (quote_attrib(self.a), )) + outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (quote_attrib(self.b), )) + outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AdExIaFCell', fromsubclass_=False, pretty_print=True): - super(AdExIaFCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(AdExIaFCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gL', node) if value is not None and 'gL' not in already_processed: already_processed.add('gL') - self.g_l = value - self.validate_Nml2Quantity_conductance(self.g_l) # validate type Nml2Quantity_conductance + self.gL = value + self.validate_Nml2Quantity_conductance(self.gL) # validate type Nml2Quantity_conductance value = find_attr_value_('EL', node) if value is not None and 'EL' not in already_processed: already_processed.add('EL') @@ -21266,8 +24706,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delT', node) if value is not None and 'delT' not in already_processed: already_processed.add('delT') - self.del_t = value - self.validate_Nml2Quantity_voltage(self.del_t) # validate type Nml2Quantity_voltage + self.delT = value + self.validate_Nml2Quantity_voltage(self.delT) # validate type Nml2Quantity_voltage value = find_attr_value_('tauw', node) if value is not None and 'tauw' not in already_processed: already_processed.add('tauw') @@ -21289,39 +24729,52 @@ def buildAttributes(self, node, attrs, already_processed): self.b = value self.validate_Nml2Quantity_current(self.b) # validate type Nml2Quantity_current super(AdExIaFCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(AdExIaFCell, self).buildChildren(child_, node, nodeName_, True) pass # end class AdExIaFCell class Izhikevich2007Cell(BaseCellMembPotCap): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('k', 'Nml2Quantity_conductancePerVoltage', 0, 0, {'use': u'required'}), - MemberSpec_('vr', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('vt', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('vpeak', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('a', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), - MemberSpec_('b', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('c', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), - MemberSpec_('d', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('k', 'Nml2Quantity_conductancePerVoltage', 0, 0, {'use': 'required'}), + MemberSpec_('vr', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('vt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('vpeak', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('a', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('b', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('c', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('d', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(Izhikevich2007Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + self.ns_prefix_ = None + super(Izhikevich2007Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, C, **kwargs_) self.v0 = _cast(None, v0) + self.v0_nsprefix_ = None self.k = _cast(None, k) + self.k_nsprefix_ = None self.vr = _cast(None, vr) + self.vr_nsprefix_ = None self.vt = _cast(None, vt) + self.vt_nsprefix_ = None self.vpeak = _cast(None, vpeak) + self.vpeak_nsprefix_ = None self.a = _cast(None, a) + self.a_nsprefix_ = None self.b = _cast(None, b) + self.b_nsprefix_ = None self.c = _cast(None, c) + self.c_nsprefix_ = None self.d = _cast(None, d) + self.d_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21335,39 +24788,59 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def validate_Nml2Quantity_conductancePerVoltage(self, value): # Validate type Nml2Quantity_conductancePerVoltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductancePerVoltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductancePerVoltage_patterns_, )) - validate_Nml2Quantity_conductancePerVoltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_V|nS_per_mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductancePerVoltage_patterns_, )) + validate_Nml2Quantity_conductancePerVoltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_V|nS_per_mV))$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(Izhikevich2007Cell, self).hasContent_() @@ -21385,6 +24858,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21400,39 +24875,43 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Izhikevich2007Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Izhikevich2007Cell') if self.v0 is not None and 'v0' not in already_processed: already_processed.add('v0') - outfile.write(' v0=%s' % (quote_attrib(self.v0), )) + outfile.write(' v0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v0), input_name='v0')), )) if self.k is not None and 'k' not in already_processed: already_processed.add('k') - outfile.write(' k=%s' % (quote_attrib(self.k), )) + outfile.write(' k=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.k), input_name='k')), )) if self.vr is not None and 'vr' not in already_processed: already_processed.add('vr') - outfile.write(' vr=%s' % (quote_attrib(self.vr), )) + outfile.write(' vr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vr), input_name='vr')), )) if self.vt is not None and 'vt' not in already_processed: already_processed.add('vt') - outfile.write(' vt=%s' % (quote_attrib(self.vt), )) + outfile.write(' vt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vt), input_name='vt')), )) if self.vpeak is not None and 'vpeak' not in already_processed: already_processed.add('vpeak') - outfile.write(' vpeak=%s' % (quote_attrib(self.vpeak), )) + outfile.write(' vpeak=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vpeak), input_name='vpeak')), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (quote_attrib(self.a), )) + outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (quote_attrib(self.b), )) + outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) if self.c is not None and 'c' not in already_processed: already_processed.add('c') - outfile.write(' c=%s' % (quote_attrib(self.c), )) + outfile.write(' c=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.c), input_name='c')), )) if self.d is not None and 'd' not in already_processed: already_processed.add('d') - outfile.write(' d=%s' % (quote_attrib(self.d), )) + outfile.write(' d=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.d), input_name='d')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Izhikevich2007Cell', fromsubclass_=False, pretty_print=True): - super(Izhikevich2007Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(Izhikevich2007Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v0', node) @@ -21481,23 +24960,28 @@ def buildAttributes(self, node, attrs, already_processed): self.d = value self.validate_Nml2Quantity_current(self.d) # validate type Nml2Quantity_current super(Izhikevich2007Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Izhikevich2007Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class Izhikevich2007Cell class IafRefCell(IafCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = IafCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, refract=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, C=None, leakConductance=None, refract=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IafRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) + self.ns_prefix_ = None + super(IafRefCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, leakReversal, thresh, reset, C, leakConductance, **kwargs_) self.refract = _cast(None, refract) + self.refract_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21511,11 +24995,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(IafRefCell, self).hasContent_() @@ -21533,6 +25021,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21548,15 +25038,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafRefCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafRefCell') if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (quote_attrib(self.refract), )) + outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafRefCell', fromsubclass_=False, pretty_print=True): - super(IafRefCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IafRefCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('refract', node) @@ -21565,23 +25059,28 @@ def buildAttributes(self, node, attrs, already_processed): self.refract = value self.validate_Nml2Quantity_time(self.refract) # validate type Nml2Quantity_time super(IafRefCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IafRefCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafRefCell class IafTauRefCell(IafTauCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = IafTauCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, refract=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, tau=None, refract=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IafTauRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) + self.ns_prefix_ = None + super(IafTauRefCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, leakReversal, thresh, reset, tau, **kwargs_) self.refract = _cast(None, refract) + self.refract_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21595,11 +25094,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(IafTauRefCell, self).hasContent_() @@ -21617,6 +25120,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21632,15 +25137,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafTauRefCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafTauRefCell') if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (quote_attrib(self.refract), )) + outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafTauRefCell', fromsubclass_=False, pretty_print=True): - super(IafTauRefCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IafTauRefCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('refract', node) @@ -21649,29 +25158,37 @@ def buildAttributes(self, node, attrs, already_processed): self.refract = value self.validate_Nml2Quantity_time(self.refract) # validate type Nml2Quantity_time super(IafTauRefCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IafTauRefCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafTauRefCell class DoubleSynapse(BaseVoltageDepSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse1', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('synapse2', 'NmlId', 0, 0, {'use': u'required'}), - MemberSpec_('synapse1_path', 'xs:string', 0, 0, {'use': u'required'}), - MemberSpec_('synapse2_path', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('synapse1', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('synapse2', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('synapse1Path', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('synapse2Path', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse1=None, synapse2=None, synapse1_path=None, synapse2_path=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, synapse1=None, synapse2=None, synapse1Path=None, synapse2Path=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(DoubleSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(DoubleSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.synapse1 = _cast(None, synapse1) + self.synapse1_nsprefix_ = None self.synapse2 = _cast(None, synapse2) - self.synapse1_path = _cast(None, synapse1_path) - self.synapse2_path = _cast(None, synapse2_path) + self.synapse2_nsprefix_ = None + self.synapse1Path = _cast(None, synapse1Path) + self.synapse1Path_nsprefix_ = None + self.synapse2Path = _cast(None, synapse2Path) + self.synapse2Path_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21685,11 +25202,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( super(DoubleSynapse, self).hasContent_() @@ -21707,6 +25228,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21722,24 +25245,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(DoubleSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoubleSynapse') if self.synapse1 is not None and 'synapse1' not in already_processed: already_processed.add('synapse1') - outfile.write(' synapse1=%s' % (quote_attrib(self.synapse1), )) + outfile.write(' synapse1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1), input_name='synapse1')), )) if self.synapse2 is not None and 'synapse2' not in already_processed: already_processed.add('synapse2') - outfile.write(' synapse2=%s' % (quote_attrib(self.synapse2), )) - if self.synapse1_path is not None and 'synapse1_path' not in already_processed: - already_processed.add('synapse1_path') - outfile.write(' synapse1Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1_path), input_name='synapse1Path')), )) - if self.synapse2_path is not None and 'synapse2_path' not in already_processed: - already_processed.add('synapse2_path') - outfile.write(' synapse2Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2_path), input_name='synapse2Path')), )) + outfile.write(' synapse2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2), input_name='synapse2')), )) + if self.synapse1Path is not None and 'synapse1Path' not in already_processed: + already_processed.add('synapse1Path') + outfile.write(' synapse1Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1Path), input_name='synapse1Path')), )) + if self.synapse2Path is not None and 'synapse2Path' not in already_processed: + already_processed.add('synapse2Path') + outfile.write(' synapse2Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2Path), input_name='synapse2Path')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoubleSynapse', fromsubclass_=False, pretty_print=True): - super(DoubleSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(DoubleSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse1', node) @@ -21755,31 +25282,37 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse1Path', node) if value is not None and 'synapse1Path' not in already_processed: already_processed.add('synapse1Path') - self.synapse1_path = value + self.synapse1Path = value value = find_attr_value_('synapse2Path', node) if value is not None and 'synapse2Path' not in already_processed: already_processed.add('synapse2Path') - self.synapse2_path = value + self.synapse2Path = value super(DoubleSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(DoubleSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class DoubleSynapse class AlphaCurrentSynapse(BaseCurrentBasedSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('ibase', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('ibase', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCurrentBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau=None, ibase=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau=None, ibase=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(AlphaCurrentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.ns_prefix_ = None + super(AlphaCurrentSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) self.tau = _cast(None, tau) + self.tau_nsprefix_ = None self.ibase = _cast(None, ibase) + self.ibase_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -21793,18 +25326,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] def hasContent_(self): if ( super(AlphaCurrentSynapse, self).hasContent_() @@ -21822,6 +25363,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21837,18 +25380,22 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(AlphaCurrentSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaCurrentSynapse') if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (quote_attrib(self.tau), )) + outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) if self.ibase is not None and 'ibase' not in already_processed: already_processed.add('ibase') - outfile.write(' ibase=%s' % (quote_attrib(self.ibase), )) + outfile.write(' ibase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ibase), input_name='ibase')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCurrentSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCurrentSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(AlphaCurrentSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau', node) @@ -21862,27 +25409,34 @@ def buildAttributes(self, node, attrs, already_processed): self.ibase = value self.validate_Nml2Quantity_current(self.ibase) # validate type Nml2Quantity_current super(AlphaCurrentSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(AlphaCurrentSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCurrentSynapse class BaseConductanceBasedSynapseTwo(BaseVoltageDepSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('gbase1', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('gbase2', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('gbase1', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('gbase2', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseConductanceBasedSynapseTwo, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseConductanceBasedSynapseTwo, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.gbase1 = _cast(None, gbase1) + self.gbase1_nsprefix_ = None self.gbase2 = _cast(None, gbase2) + self.gbase2_nsprefix_ = None self.erev = _cast(None, erev) + self.erev_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -21897,18 +25451,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( super(BaseConductanceBasedSynapseTwo, self).hasContent_() @@ -21926,6 +25488,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21941,25 +25505,33 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseConductanceBasedSynapseTwo, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConductanceBasedSynapseTwo') if self.gbase1 is not None and 'gbase1' not in already_processed: already_processed.add('gbase1') - outfile.write(' gbase1=%s' % (quote_attrib(self.gbase1), )) + outfile.write(' gbase1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase1), input_name='gbase1')), )) if self.gbase2 is not None and 'gbase2' not in already_processed: already_processed.add('gbase2') - outfile.write(' gbase2=%s' % (quote_attrib(self.gbase2), )) + outfile.write(' gbase2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase2), input_name='gbase2')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConductanceBasedSynapseTwo', fromsubclass_=False, pretty_print=True): - super(BaseConductanceBasedSynapseTwo, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseConductanceBasedSynapseTwo, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gbase1', node) @@ -21982,25 +25554,31 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConductanceBasedSynapseTwo, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseConductanceBasedSynapseTwo, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConductanceBasedSynapseTwo class BaseConductanceBasedSynapse(BaseVoltageDepSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('gbase', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('gbase', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BaseConductanceBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(BaseConductanceBasedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) self.gbase = _cast(None, gbase) + self.gbase_nsprefix_ = None self.erev = _cast(None, erev) + self.erev_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22015,18 +25593,26 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( super(BaseConductanceBasedSynapse, self).hasContent_() @@ -22044,6 +25630,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22059,22 +25647,30 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseConductanceBasedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConductanceBasedSynapse') if self.gbase is not None and 'gbase' not in already_processed: already_processed.add('gbase') - outfile.write(' gbase=%s' % (quote_attrib(self.gbase), )) + outfile.write(' gbase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase), input_name='gbase')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (quote_attrib(self.erev), )) + outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConductanceBasedSynapse', fromsubclass_=False, pretty_print=True): - super(BaseConductanceBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(BaseConductanceBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gbase', node) @@ -22092,7 +25688,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConductanceBasedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(BaseConductanceBasedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConductanceBasedSynapse @@ -22100,18 +25696,23 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class IonChannelVShift(IonChannel): """Same as ionChannel, but with a vShift parameter to change voltage - activation of gates. The exact usage of vShift in expressions - for rates is determined by the individual gates.""" + activation of gates. The exact usage of vShift in expressions for rates + is determined by the individual gates.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('vShift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = IonChannel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, v_shift=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, vShift=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IonChannelVShift, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) - self.v_shift = _cast(None, v_shift) + self.ns_prefix_ = None + super(IonChannelVShift, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, species, type_, conductance, gate, gateHHrates, gateHHratesTau, gateHHtauInf, gateHHratesInf, gateHHratesTauInf, gateHHInstantaneous, gateFractional, **kwargs_) + self.vShift = _cast(None, vShift) + self.vShift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22125,11 +25726,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( super(IonChannelVShift, self).hasContent_() @@ -22147,6 +25752,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22160,44 +25767,52 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelVShift'): super(IonChannelVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelVShift') - if self.v_shift is not None and 'v_shift' not in already_processed: - already_processed.add('v_shift') - outfile.write(' vShift=%s' % (quote_attrib(self.v_shift), )) + if self.vShift is not None and 'vShift' not in already_processed: + already_processed.add('vShift') + outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vShift), input_name='vShift')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelVShift', fromsubclass_=False, pretty_print=True): - super(IonChannelVShift, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IonChannelVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) if value is not None and 'vShift' not in already_processed: already_processed.add('vShift') - self.v_shift = value - self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage + self.vShift = value + self.validate_Nml2Quantity_voltage(self.vShift) # validate type Nml2Quantity_voltage super(IonChannelVShift, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IonChannelVShift, self).buildChildren(child_, node, nodeName_, True) pass # end class IonChannelVShift class IonChannelHH(IonChannel): - """Note ionChannel and ionChannelHH are currently functionally - identical. This is needed since many existing examples use - ionChannel, some use ionChannelHH. NeuroML v2beta4 should remove - one of these, probably ionChannelHH.""" + """Note ionChannel and ionChannelHH are currently functionally identical. + This is needed since many existing examples use ionChannel, some use + ionChannelHH. + NeuroML v2beta4 should remove one of these, probably ionChannelHH.""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = IonChannel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IonChannelHH, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + self.ns_prefix_ = None + super(IonChannelHH, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, species, type_, conductance, gate, gateHHrates, gateHHratesTau, gateHHtauInf, gateHHratesInf, gateHHratesTauInf, gateHHInstantaneous, gateFractional, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22226,6 +25841,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22240,31 +25857,39 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelHH'): super(IonChannelHH, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelHH') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelHH', fromsubclass_=False, pretty_print=True): - super(IonChannelHH, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IonChannelHH, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IonChannelHH, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IonChannelHH, self).buildChildren(child_, node, nodeName_, True) pass # end class IonChannelHH class IF_curr_exp(basePyNNIaFCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IF_curr_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + self.ns_prefix_ = None + super(IF_curr_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22293,6 +25918,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22307,31 +25934,39 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_curr_exp'): super(IF_curr_exp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_curr_exp') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_curr_exp', fromsubclass_=False, pretty_print=True): - super(IF_curr_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IF_curr_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_curr_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IF_curr_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_curr_exp class IF_curr_alpha(basePyNNIaFCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IF_curr_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + self.ns_prefix_ = None + super(IF_curr_alpha, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22360,6 +25995,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22374,35 +26011,45 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_curr_alpha'): super(IF_curr_alpha, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_curr_alpha') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_curr_alpha', fromsubclass_=False, pretty_print=True): - super(IF_curr_alpha, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IF_curr_alpha, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_curr_alpha, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IF_curr_alpha, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_curr_alpha class basePyNNIaFCondCell(basePyNNIaFCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(basePyNNIaFCondCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(basePyNNIaFCondCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) self.e_rev_E = _cast(float, e_rev_E) + self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) + self.e_rev_I_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22432,6 +26079,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22454,37 +26103,41 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNIaFCondCell', fromsubclass_=False, pretty_print=True): - super(basePyNNIaFCondCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(basePyNNIaFCondCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev_E', node) if value is not None and 'e_rev_E' not in already_processed: already_processed.add('e_rev_E') - try: - self.e_rev_E = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_E): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_E') + self.e_rev_E = value value = find_attr_value_('e_rev_I', node) if value is not None and 'e_rev_I' not in already_processed: already_processed.add('e_rev_I') - try: - self.e_rev_I = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (e_rev_I): %s' % exp) + value = self.gds_parse_float(value, node, 'e_rev_I') + self.e_rev_I = value value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNIaFCondCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(basePyNNIaFCondCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNIaFCondCell @@ -22492,14 +26145,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ContinuousConnectionInstance(ContinuousConnection): """Individual continuous/analog synaptic connection - instance based""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ContinuousConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ContinuousConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(ContinuousConnectionInstance, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, preComponent, postComponent, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22529,6 +26186,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22544,16 +26203,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnectionInstance', fromsubclass_=False, pretty_print=True): - super(ContinuousConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ContinuousConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -22561,7 +26228,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ContinuousConnectionInstance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ContinuousConnectionInstance, self).buildChildren(child_, node, nodeName_, True) pass @@ -22583,14 +26250,18 @@ def __str__(self): class ElectricalConnectionInstance(ElectricalConnection): """Projection between two populations consisting of analog connections (e.g. graded synapses)""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ElectricalConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ElectricalConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(ElectricalConnectionInstance, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, synapse, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22620,6 +26291,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22635,16 +26308,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnectionInstance', fromsubclass_=False, pretty_print=True): - super(ElectricalConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ElectricalConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -22652,7 +26333,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ElectricalConnectionInstance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ElectricalConnectionInstance, self).buildChildren(child_, node, nodeName_, True) pass @@ -22671,20 +26352,27 @@ def __str__(self): class ExpThreeSynapse(BaseConductanceBasedSynapseTwo): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay1', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('tau_decay2', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tauDecay1', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tauDecay2', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tauRise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapseTwo - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, tau_decay1=None, tau_decay2=None, tau_rise=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase1=None, gbase2=None, erev=None, tauDecay1=None, tauDecay2=None, tauRise=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExpThreeSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) - self.tau_decay1 = _cast(None, tau_decay1) - self.tau_decay2 = _cast(None, tau_decay2) - self.tau_rise = _cast(None, tau_rise) + self.ns_prefix_ = None + super(ExpThreeSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase1, gbase2, erev, **kwargs_) + self.tauDecay1 = _cast(None, tauDecay1) + self.tauDecay1_nsprefix_ = None + self.tauDecay2 = _cast(None, tauDecay2) + self.tauDecay2_nsprefix_ = None + self.tauRise = _cast(None, tauRise) + self.tauRise_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22698,11 +26386,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(ExpThreeSynapse, self).hasContent_() @@ -22720,6 +26412,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22733,60 +26427,70 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpThreeSynapse'): super(ExpThreeSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpThreeSynapse') - if self.tau_decay1 is not None and 'tau_decay1' not in already_processed: - already_processed.add('tau_decay1') - outfile.write(' tauDecay1=%s' % (quote_attrib(self.tau_decay1), )) - if self.tau_decay2 is not None and 'tau_decay2' not in already_processed: - already_processed.add('tau_decay2') - outfile.write(' tauDecay2=%s' % (quote_attrib(self.tau_decay2), )) - if self.tau_rise is not None and 'tau_rise' not in already_processed: - already_processed.add('tau_rise') - outfile.write(' tauRise=%s' % (quote_attrib(self.tau_rise), )) + if self.tauDecay1 is not None and 'tauDecay1' not in already_processed: + already_processed.add('tauDecay1') + outfile.write(' tauDecay1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay1), input_name='tauDecay1')), )) + if self.tauDecay2 is not None and 'tauDecay2' not in already_processed: + already_processed.add('tauDecay2') + outfile.write(' tauDecay2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay2), input_name='tauDecay2')), )) + if self.tauRise is not None and 'tauRise' not in already_processed: + already_processed.add('tauRise') + outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRise), input_name='tauRise')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpThreeSynapse', fromsubclass_=False, pretty_print=True): - super(ExpThreeSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ExpThreeSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay1', node) if value is not None and 'tauDecay1' not in already_processed: already_processed.add('tauDecay1') - self.tau_decay1 = value - self.validate_Nml2Quantity_time(self.tau_decay1) # validate type Nml2Quantity_time + self.tauDecay1 = value + self.validate_Nml2Quantity_time(self.tauDecay1) # validate type Nml2Quantity_time value = find_attr_value_('tauDecay2', node) if value is not None and 'tauDecay2' not in already_processed: already_processed.add('tauDecay2') - self.tau_decay2 = value - self.validate_Nml2Quantity_time(self.tau_decay2) # validate type Nml2Quantity_time + self.tauDecay2 = value + self.validate_Nml2Quantity_time(self.tauDecay2) # validate type Nml2Quantity_time value = find_attr_value_('tauRise', node) if value is not None and 'tauRise' not in already_processed: already_processed.add('tauRise') - self.tau_rise = value - self.validate_Nml2Quantity_time(self.tau_rise) # validate type Nml2Quantity_time + self.tauRise = value + self.validate_Nml2Quantity_time(self.tauRise) # validate type Nml2Quantity_time super(ExpThreeSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpThreeSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpThreeSynapse class ExpTwoSynapse(BaseConductanceBasedSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), - MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tauDecay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tauRise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, tauRise=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExpTwoSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) - self.tau_decay = _cast(None, tau_decay) - self.tau_rise = _cast(None, tau_rise) + self.ns_prefix_ = None + super(ExpTwoSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, extensiontype_, **kwargs_) + self.tauDecay = _cast(None, tauDecay) + self.tauDecay_nsprefix_ = None + self.tauRise = _cast(None, tauRise) + self.tauRise_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22801,11 +26505,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(ExpTwoSynapse, self).hasContent_() @@ -22823,6 +26531,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22836,58 +26546,71 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpTwoSynapse'): super(ExpTwoSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpTwoSynapse') - if self.tau_decay is not None and 'tau_decay' not in already_processed: - already_processed.add('tau_decay') - outfile.write(' tauDecay=%s' % (quote_attrib(self.tau_decay), )) - if self.tau_rise is not None and 'tau_rise' not in already_processed: - already_processed.add('tau_rise') - outfile.write(' tauRise=%s' % (quote_attrib(self.tau_rise), )) + if self.tauDecay is not None and 'tauDecay' not in already_processed: + already_processed.add('tauDecay') + outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay), input_name='tauDecay')), )) + if self.tauRise is not None and 'tauRise' not in already_processed: + already_processed.add('tauRise') + outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRise), input_name='tauRise')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpTwoSynapse', fromsubclass_=False, pretty_print=True): - super(ExpTwoSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ExpTwoSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) if value is not None and 'tauDecay' not in already_processed: already_processed.add('tauDecay') - self.tau_decay = value - self.validate_Nml2Quantity_time(self.tau_decay) # validate type Nml2Quantity_time + self.tauDecay = value + self.validate_Nml2Quantity_time(self.tauDecay) # validate type Nml2Quantity_time value = find_attr_value_('tauRise', node) if value is not None and 'tauRise' not in already_processed: already_processed.add('tauRise') - self.tau_rise = value - self.validate_Nml2Quantity_time(self.tau_rise) # validate type Nml2Quantity_time + self.tauRise = value + self.validate_Nml2Quantity_time(self.tauRise) # validate type Nml2Quantity_time value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(ExpTwoSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpTwoSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpTwoSynapse class ExpOneSynapse(BaseConductanceBasedSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tauDecay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ExpOneSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) - self.tau_decay = _cast(None, tau_decay) + self.ns_prefix_ = None + super(ExpOneSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, **kwargs_) + self.tauDecay = _cast(None, tauDecay) + self.tauDecay_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22901,11 +26624,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(ExpOneSynapse, self).hasContent_() @@ -22923,6 +26650,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22936,42 +26665,51 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpOneSynapse'): super(ExpOneSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpOneSynapse') - if self.tau_decay is not None and 'tau_decay' not in already_processed: - already_processed.add('tau_decay') - outfile.write(' tauDecay=%s' % (quote_attrib(self.tau_decay), )) + if self.tauDecay is not None and 'tauDecay' not in already_processed: + already_processed.add('tauDecay') + outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay), input_name='tauDecay')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpOneSynapse', fromsubclass_=False, pretty_print=True): - super(ExpOneSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(ExpOneSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) if value is not None and 'tauDecay' not in already_processed: already_processed.add('tauDecay') - self.tau_decay = value - self.validate_Nml2Quantity_time(self.tau_decay) # validate type Nml2Quantity_time + self.tauDecay = value + self.validate_Nml2Quantity_time(self.tauDecay) # validate type Nml2Quantity_time super(ExpOneSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpOneSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpOneSynapse class AlphaSynapse(BaseConductanceBasedSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tau=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(AlphaSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + self.ns_prefix_ = None + super(AlphaSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, **kwargs_) self.tau = _cast(None, tau) + self.tau_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22985,11 +26723,15 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_: + if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: + if not isinstance(value, str): + lineno = self.gds_get_node_lineno_() + self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) + return False if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] + self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] def hasContent_(self): if ( super(AlphaSynapse, self).hasContent_() @@ -23007,6 +26749,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23022,15 +26766,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(AlphaSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaSynapse') if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (quote_attrib(self.tau), )) + outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(AlphaSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau', node) @@ -23039,31 +26787,40 @@ def buildAttributes(self, node, attrs, already_processed): self.tau = value self.validate_Nml2Quantity_time(self.tau) # validate type Nml2Quantity_time super(AlphaSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(AlphaSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaSynapse class EIF_cond_exp_isfa_ista(basePyNNIaFCondCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('a', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('b', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('delta_T', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('tau_w', 'xs:float', 0, 0, {'use': u'required'}), - MemberSpec_('v_spike', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('a', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('b', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('delta_T', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_w', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_spike', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(EIF_cond_exp_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) + self.ns_prefix_ = None + super(EIF_cond_exp_isfa_ista, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) self.a = _cast(float, a) + self.a_nsprefix_ = None self.b = _cast(float, b) + self.b_nsprefix_ = None self.delta_T = _cast(float, delta_T) + self.delta_T_nsprefix_ = None self.tau_w = _cast(float, tau_w) + self.tau_w_nsprefix_ = None self.v_spike = _cast(float, v_spike) + self.v_spike_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -23093,6 +26850,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23124,72 +26883,74 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - outfile.write(' xsi:type="%s"' % self.extensiontype_) + if ":" not in self.extensiontype_: + imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') + outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) + else: + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='EIF_cond_exp_isfa_ista', fromsubclass_=False, pretty_print=True): - super(EIF_cond_exp_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(EIF_cond_exp_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('a', node) if value is not None and 'a' not in already_processed: already_processed.add('a') - try: - self.a = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (a): %s' % exp) + value = self.gds_parse_float(value, node, 'a') + self.a = value value = find_attr_value_('b', node) if value is not None and 'b' not in already_processed: already_processed.add('b') - try: - self.b = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (b): %s' % exp) + value = self.gds_parse_float(value, node, 'b') + self.b = value value = find_attr_value_('delta_T', node) if value is not None and 'delta_T' not in already_processed: already_processed.add('delta_T') - try: - self.delta_T = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (delta_T): %s' % exp) + value = self.gds_parse_float(value, node, 'delta_T') + self.delta_T = value value = find_attr_value_('tau_w', node) if value is not None and 'tau_w' not in already_processed: already_processed.add('tau_w') - try: - self.tau_w = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (tau_w): %s' % exp) + value = self.gds_parse_float(value, node, 'tau_w') + self.tau_w = value value = find_attr_value_('v_spike', node) if value is not None and 'v_spike' not in already_processed: already_processed.add('v_spike') - try: - self.v_spike = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (v_spike): %s' % exp) + value = self.gds_parse_float(value, node, 'v_spike') + self.v_spike = value value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(EIF_cond_exp_isfa_ista, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(EIF_cond_exp_isfa_ista, self).buildChildren(child_, node, nodeName_, True) pass # end class EIF_cond_exp_isfa_ista class IF_cond_exp(basePyNNIaFCondCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IF_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + self.ns_prefix_ = None + super(IF_cond_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23218,6 +26979,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23232,31 +26995,39 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_cond_exp'): super(IF_cond_exp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_cond_exp') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_cond_exp', fromsubclass_=False, pretty_print=True): - super(IF_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IF_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_cond_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IF_cond_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_cond_exp class IF_cond_alpha(basePyNNIaFCondCell): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(IF_cond_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + self.ns_prefix_ = None + super(IF_cond_alpha, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23285,6 +27056,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23299,17 +27072,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_cond_alpha'): super(IF_cond_alpha, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_cond_alpha') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_cond_alpha', fromsubclass_=False, pretty_print=True): - super(IF_cond_alpha, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(IF_cond_alpha, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_cond_alpha, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IF_cond_alpha, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_cond_alpha @@ -23318,16 +27095,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): class ContinuousConnectionInstanceW(ContinuousConnectionInstance): """Individual continuous/analog synaptic connection - instance based. Includes setting of _weight for the connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = ContinuousConnectionInstance - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, weight=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, weight=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ContinuousConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) + self.ns_prefix_ = None + super(ContinuousConnectionInstanceW, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, preComponent, postComponent, **kwargs_) self.weight = _cast(float, weight) + self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23356,6 +27138,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23372,25 +27156,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnectionInstanceW', fromsubclass_=False, pretty_print=True): - super(ContinuousConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ContinuousConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - try: - self.weight = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (weight): %s' % exp) + value = self.gds_parse_float(value, node, 'weight') + self.weight = value super(ContinuousConnectionInstanceW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ContinuousConnectionInstanceW, self).buildChildren(child_, node, nodeName_, True) pass @@ -23410,16 +27196,21 @@ class ElectricalConnectionInstanceW(ElectricalConnectionInstance): """Projection between two populations consisting of analog connections (e.g. graded synapses). Includes setting of weight for the connection""" + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), ] subclass = None superclass = ElectricalConnectionInstance - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, weight=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, weight=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(ElectricalConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) + self.ns_prefix_ = None + super(ElectricalConnectionInstanceW, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, synapse, **kwargs_) self.weight = _cast(float, weight) + self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23448,6 +27239,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23464,25 +27257,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnectionInstanceW', fromsubclass_=False, pretty_print=True): - super(ElectricalConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(ElectricalConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass - def build(self, node): + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - try: - self.weight = float(value) - except ValueError as exp: - raise ValueError('Bad float/double attribute (weight): %s' % exp) + value = self.gds_parse_float(value, node, 'weight') + self.weight = value super(ElectricalConnectionInstanceW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ElectricalConnectionInstanceW, self).buildChildren(child_, node, nodeName_, True) pass @@ -23498,18 +27293,24 @@ def __str__(self): class BlockingPlasticSynapse(ExpTwoSynapse): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('plasticity_mechanism', 'PlasticityMechanism', 0, 1, {u'type': u'PlasticityMechanism', u'name': u'plasticityMechanism', u'minOccurs': u'0'}, None), - MemberSpec_('block_mechanism', 'BlockMechanism', 0, 1, {u'type': u'BlockMechanism', u'name': u'blockMechanism', u'minOccurs': u'0'}, None), + MemberSpec_('plasticityMechanism', 'PlasticityMechanism', 0, 1, {'minOccurs': '0', 'name': 'plasticityMechanism', 'type': 'PlasticityMechanism'}, None), + MemberSpec_('blockMechanism', 'BlockMechanism', 0, 1, {'minOccurs': '0', 'name': 'blockMechanism', 'type': 'BlockMechanism'}, None), ] subclass = None superclass = ExpTwoSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, plasticity_mechanism=None, block_mechanism=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, tauRise=None, plasticityMechanism=None, blockMechanism=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(BlockingPlasticSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) - self.plasticity_mechanism = plasticity_mechanism - self.block_mechanism = block_mechanism + self.ns_prefix_ = None + super(BlockingPlasticSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, tauDecay, tauRise, **kwargs_) + self.plasticityMechanism = plasticityMechanism + self.plasticityMechanism_nsprefix_ = None + self.blockMechanism = blockMechanism + self.blockMechanism_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23523,8 +27324,8 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.plasticity_mechanism is not None or - self.block_mechanism is not None or + self.plasticityMechanism is not None or + self.blockMechanism is not None or super(BlockingPlasticSynapse, self).hasContent_() ): return True @@ -23540,6 +27341,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23554,48 +27357,58 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BlockingPlasticSynapse'): super(BlockingPlasticSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BlockingPlasticSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BlockingPlasticSynapse', fromsubclass_=False, pretty_print=True): - super(BlockingPlasticSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + super(BlockingPlasticSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if self.plasticity_mechanism is not None: - self.plasticity_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plasticityMechanism', pretty_print=pretty_print) - if self.block_mechanism is not None: - self.block_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockMechanism', pretty_print=pretty_print) - def build(self, node): - already_processed = set() + if self.plasticityMechanism is not None: + namespaceprefix_ = self.plasticityMechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.plasticityMechanism_nsprefix_) else '' + self.plasticityMechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plasticityMechanism', pretty_print=pretty_print) + if self.blockMechanism is not None: + namespaceprefix_ = self.blockMechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.blockMechanism_nsprefix_) else '' + self.blockMechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockMechanism', pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node + already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(BlockingPlasticSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'plasticityMechanism': obj_ = PlasticityMechanism.factory(parent_object_=self) - obj_.build(child_) - self.plasticity_mechanism = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.plasticityMechanism = obj_ obj_.original_tagname_ = 'plasticityMechanism' elif nodeName_ == 'blockMechanism': obj_ = BlockMechanism.factory(parent_object_=self) - obj_.build(child_) - self.block_mechanism = obj_ + obj_.build(child_, gds_collector_=gds_collector_) + self.blockMechanism = obj_ obj_.original_tagname_ = 'blockMechanism' super(BlockingPlasticSynapse, self).buildChildren(child_, node, nodeName_, True) # end class BlockingPlasticSynapse class EIF_cond_alpha_isfa_ista(EIF_cond_exp_isfa_ista): + __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = EIF_cond_exp_isfa_ista - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, **kwargs_): + def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, gds_collector_=None, **kwargs_): + self.gds_collector_ = gds_collector_ + self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - super(EIF_cond_alpha_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) + self.ns_prefix_ = None + super(EIF_cond_alpha_isfa_ista, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23624,6 +27437,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '' if self.original_tagname_ is not None: name_ = self.original_tagname_ + if UseCapturedNS_ and self.ns_prefix_: + namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23638,17 +27453,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='EIF_cond_alpha_isfa_ista'): super(EIF_cond_alpha_isfa_ista, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='EIF_cond_alpha_isfa_ista') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='EIF_cond_alpha_isfa_ista', fromsubclass_=False, pretty_print=True): - super(EIF_cond_alpha_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) - def build(self, node): + super(EIF_cond_alpha_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def build(self, node, gds_collector_=None): + self.gds_collector_ = gds_collector_ + if SaveElementTreeNode: + self.gds_elementtree_node_ = node already_processed = set() + self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_) + self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) return self def buildAttributes(self, node, attrs, already_processed): super(EIF_cond_alpha_isfa_ista, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(EIF_cond_alpha_isfa_ista, self).buildChildren(child_, node, nodeName_, True) pass # end class EIF_cond_alpha_isfa_ista @@ -23677,7 +27496,26 @@ def get_root_tag(node): return tag, rootClass -def parse(inFileName, silence=False): +def get_required_ns_prefix_defs(rootNode): + '''Get all name space prefix definitions required in this XML doc. + Return a dictionary of definitions and a char string of definitions. + ''' + nsmap = { + prefix: uri + for node in rootNode.iter() + for (prefix, uri) in node.nsmap.items() + if prefix is not None + } + namespacedefs = ' '.join([ + 'xmlns:{}="{}"'.format(prefix, uri) + for prefix, uri in nsmap.items() + ]) + return nsmap, namespacedefs + + +def parse(inFileName, silence=False, print_warnings=True): + global CapturedNsmap_ + gds_collector = GdsCollector_() parser = None doc = parsexml_(inFileName, parser) rootNode = doc.getroot() @@ -23686,43 +27524,62 @@ def parse(inFileName, silence=False): rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode) - # Enable Python to collect the space used by the DOM. - doc = None + rootObj.build(rootNode, gds_collector_=gds_collector) + CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode) + if not SaveElementTreeNode: + doc = None + rootNode = None ## if not silence: ## sys.stdout.write('\n') ## rootObj.export( ## sys.stdout, 0, name_=rootTag, -## namespacedef_='', +## namespacedef_=namespacedefs, ## pretty_print=True) + if print_warnings and len(gds_collector.get_messages()) > 0: + separator = ('-' * 50) + '\n' + sys.stderr.write(separator) + sys.stderr.write('----- Warnings -- count: {} -----\n'.format( + len(gds_collector.get_messages()), )) + gds_collector.write_messages(sys.stderr) + sys.stderr.write(separator) return rootObj -def parseEtree(inFileName, silence=False): +def parseEtree(inFileName, silence=False, print_warnings=True): parser = None doc = parsexml_(inFileName, parser) + gds_collector = GdsCollector_() rootNode = doc.getroot() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode) + rootObj.build(rootNode, gds_collector_=gds_collector) # Enable Python to collect the space used by the DOM. - doc = None mapping = {} rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping) reverse_mapping = rootObj.gds_reverse_node_mapping(mapping) + if not SaveElementTreeNode: + doc = None + rootNode = None ## if not silence: ## content = etree_.tostring( ## rootElement, pretty_print=True, ## xml_declaration=True, encoding="utf-8") -## sys.stdout.write(content) +## sys.stdout.write(str(content)) ## sys.stdout.write('\n') + if print_warnings and len(gds_collector.get_messages()) > 0: + separator = ('-' * 50) + '\n' + sys.stderr.write(separator) + sys.stderr.write('----- Warnings -- count: {} -----\n'.format( + len(gds_collector.get_messages()), )) + gds_collector.write_messages(sys.stderr) + sys.stderr.write(separator) return rootObj, rootElement, mapping, reverse_mapping -def parseString(inString, silence=False): +def parseString(inString, silence=False, print_warnings=True): '''Parse a string, create the object tree, and export it. Arguments: @@ -23733,39 +27590,58 @@ def parseString(inString, silence=False): ''' parser = None rootNode= parsexmlstring_(inString, parser) + gds_collector = GdsCollector_() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode) - # Enable Python to collect the space used by the DOM. + rootObj.build(rootNode, gds_collector_=gds_collector) + if not SaveElementTreeNode: + rootNode = None ## if not silence: ## sys.stdout.write('\n') ## rootObj.export( ## sys.stdout, 0, name_=rootTag, ## namespacedef_='') + if print_warnings and len(gds_collector.get_messages()) > 0: + separator = ('-' * 50) + '\n' + sys.stderr.write(separator) + sys.stderr.write('----- Warnings -- count: {} -----\n'.format( + len(gds_collector.get_messages()), )) + gds_collector.write_messages(sys.stderr) + sys.stderr.write(separator) return rootObj -def parseLiteral(inFileName, silence=False): +def parseLiteral(inFileName, silence=False, print_warnings=True): parser = None doc = parsexml_(inFileName, parser) + gds_collector = GdsCollector_() rootNode = doc.getroot() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode) + rootObj.build(rootNode, gds_collector_=gds_collector) # Enable Python to collect the space used by the DOM. - doc = None + if not SaveElementTreeNode: + doc = None + rootNode = None ## if not silence: ## sys.stdout.write('#from nml import *\n\n') ## sys.stdout.write('import nml as model_\n\n') ## sys.stdout.write('rootObj = model_.rootClass(\n') ## rootObj.exportLiteral(sys.stdout, 0, name_=rootTag) ## sys.stdout.write(')\n') + if print_warnings and len(gds_collector.get_messages()) > 0: + separator = ('-' * 50) + '\n' + sys.stderr.write(separator) + sys.stderr.write('----- Warnings -- count: {} -----\n'.format( + len(gds_collector.get_messages()), )) + gds_collector.write_messages(sys.stderr) + sys.stderr.write(separator) return rootObj @@ -23781,6 +27657,8 @@ def main(): #import pdb; pdb.set_trace() main() +RenameMappings_ = { +} __all__ = [ "AdExIaFCell", From 1d2367ce1c49f86846d6e40d0ed4f36e8ea4d629 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 11:40:18 +0000 Subject: [PATCH 18/27] fix(nml.py): update generateds config script --- neuroml/nml/generateds_config.py | 87 ++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/neuroml/nml/generateds_config.py b/neuroml/nml/generateds_config.py index 83fc889d..1abc73c1 100644 --- a/neuroml/nml/generateds_config.py +++ b/neuroml/nml/generateds_config.py @@ -2,22 +2,28 @@ #The class names are essentially correct, the instance names need converting #also attributes need fixing -import lxml from lxml import objectify import re from config import variables import csv import sys +import io +import process_includes +import keyword + sys.setrecursionlimit(10000) + def remove_curlies(string): return re.sub("{.*}","",string) + def to_lowercase_with_underscores(string): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', string) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() + def to_camelback(string): string_list = list(string) i = 0 @@ -30,6 +36,7 @@ def to_camelback(string): return str(string) + def traverse_doc(queue,rename): """Recursive function to traverse the nodes of a tree in breadth-first order. @@ -47,20 +54,22 @@ def traverse_doc(queue,rename): else: return None -def pluralize(noun): - if re.search('[sxz]$', noun): - return re.sub('$', 'es', noun) + +def pluralize(noun): + if re.search('[sxz]$', noun): + return re.sub('$', 'es', noun) elif re.search('[^aeioudgkprt]h$', noun): - return re.sub('$', 'es', noun) - elif re.search('[^aeiou]y$', noun): - return re.sub('y$', 'ies', noun) - else: + return re.sub('$', 'es', noun) + elif re.search('[^aeiou]y$', noun): + return re.sub('y$', 'ies', noun) + else: return noun + 's' + def _node_to_python(node): pluralize_flag = 'maxOccurs' in node.attrib - + for attribute in node.attrib: nml_attribute = node.attrib.pop(attribute) if nml_attribute[0].islower(): @@ -69,16 +78,18 @@ def _node_to_python(node): renamed_attribute = pluralize(renamed_attribute) NameTable[nml_attribute] = renamed_attribute + +# Print out that this is running +# Otherwise generateds silently proceeds, and our nml.py file is all wrong +print("generateds_config.py is being processed") + filename = variables['schema_name'] -import StringIO -import process_includes -outfile = StringIO.StringIO() +outfile = io.StringIO() infile = open(filename, 'r') -process_includes.process_include_files(infile, outfile, - inpath=filename) +process_includes.process_include_files(infile, outfile, inpath=filename) infile.close() outfile.seek(0) doc = objectify.parse(outfile) @@ -89,28 +100,25 @@ def _node_to_python(node): traverse_doc(queue,_node_to_python) -#filtering routine, need to get a better way to extract these, asked on Stack Overflow -import keyword +# filtering routine, need to get a better way to extract these, asked on Stack Overflow disallowed_keywords = keyword.kwlist -for keyword in disallowed_keywords: +for kw in disallowed_keywords: try: - NameTable.pop(keyword) - except: + NameTable.pop(kw) + except Exception: pass -NameTable['morphology'] = 'morphology' #overriding change to -#"morphologies" because it only applies outside of a cell - not a very -#elegant solution +# overriding change to "morphologies" because it only applies outside of a cell +# - not a very elegant solution +NameTable['morphology'] = 'morphology' NameTable['gateHHtauInf'] = 'gate_hh_tau_infs' NameTable['ionChannelHH'] = 'ion_channel_hh' -NameTable['gateHHrates'] = 'gate_hh_rates' +NameTable['gateHHrates'] = 'gate_hh_rates' NameTable['gateHHtauInf'] = 'gate_hh_tau_infs' NameTable['ionChannel'] = 'ion_channel' NameTable['ionChannelHH'] = 'ion_channel_hhs' - - NameTable['basePyNNCell'] = 'basePyNNCell' NameTable['basePyNNIaFCell'] = 'basePyNNIaFCell' NameTable['basePyNNIaFCondCell'] = 'basePyNNIaFCondCell' @@ -136,17 +144,18 @@ def _node_to_python(node): NameTable['intracellularProperties'] = 'intracellular_properties' NameTable['biophysicalProperties'] = 'biophysical_properties' -print("NameTable is as follows:") -print(NameTable) - -print("Saving NameTable to csv file") -writer = csv.writer(open('name_table.csv', 'wb')) -for key, value in NameTable.items(): - writer.writerow([key, value]) - -print ("Saving name changes table to csv file") -changes_writer = csv.writer(open('changed_names.csv','wb')) -for key in NameTable: - value = NameTable[key] - if key != value: - changes_writer.writerow([key,value]) +nametable_fn = "name_table.csv" +print("Saving NameTable to csv file: {}".format(nametable_fn)) +with open(nametable_fn, 'w', newline='') as nametable_fh: + writer = csv.writer(nametable_fh) + for key, value in list(NameTable.items()): + writer.writerow([key, value]) + +changes_fn = "changed_names.csv" +print("Saving name changes table to csv file: {}".format(changes_fn)) +with open(changes_fn, 'w', newline='') as changes_fh: + changes_writer = csv.writer(changes_fh) + for key in NameTable: + value = NameTable[key] + if key != value: + changes_writer.writerow([key,value]) From 1723c5ebc2c606298c3da69f61329389a2464b96 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 11:40:41 +0000 Subject: [PATCH 19/27] chore(nml.py): regenerate with fixed generateds_config.py --- neuroml/nml/changed_names.csv | 416 +-- neuroml/nml/name_table.csv | 666 ++-- neuroml/nml/nml.py | 6323 ++++++++++++++++----------------- 3 files changed, 3702 insertions(+), 3703 deletions(-) diff --git a/neuroml/nml/changed_names.csv b/neuroml/nml/changed_names.csv index 57ff6704..7fc8e785 100644 --- a/neuroml/nml/changed_names.csv +++ b/neuroml/nml/changed_names.csv @@ -1,233 +1,233 @@ +http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd +property,properties +unbounded,unboundeds +neuroLexId,neuro_lex_id +fractionAlong,fraction_along +segmentId,segment_id +population,populations +inputW,input_ws +postComponent,post_component +preComponent,pre_component +continuousConnectionInstanceW,continuous_connection_instance_ws +continuousConnectionInstance,continuous_connection_instances +continuousConnection,continuous_connections +electricalConnectionInstanceW,electrical_connection_instance_ws +electricalConnectionInstance,electrical_connection_instances +electricalConnection,electrical_connections +postFractionAlong,post_fraction_along +postSegment,post_segment +postCell,post_cell +preFractionAlong,pre_fraction_along +preSegment,pre_segment +preCell,pre_cell +postSegmentId,post_segment_id +postCellId,post_cell_id +preSegmentId,pre_segment_id +preCellId,pre_cell_id +connectionWD,connection_wds +connection,connections +postsynapticPopulation,postsynaptic_population +presynapticPopulation,presynaptic_population skip,skips -gateHHtauInf,gate_hh_tau_infs -sineGenerator,sine_generators -sineGeneratorDL,sine_generator_dls -cell2CaPools,cell2_ca_poolses -xSpacing,x_spacing -plasticityMechanism,plasticity_mechanism -alphaCondSynapse,alpha_cond_synapses -channelDensityNonUniform,channel_density_non_uniforms +xs:nonNegativeInteger,xs:non_negative_integer +zSize,z_size +ySize,y_size +xSize,x_size +region,regions +space,spaces +populationTypes,population_types +populationList,population_list +extracellularProperties,extracellular_properties +instance,instances +allowedSpaces,allowed_spaces zStart,z_start -membraneProperties,membrane_properties -inhomogeneousParameter,inhomogeneous_parameters -delT,del_t +yStart,y_start +xStart,x_start +zSpacing,z_spacing +ySpacing,y_spacing +xSpacing,x_spacing +basedOn,based_on +networkTypes,network_types +networkWithTemperature,network_with_temperature +network,networks +inputList,input_lists +explicitInput,explicit_inputs +continuousProjection,continuous_projections +electricalProjection,electrical_projections +projection,projections +synapticConnection,synaptic_connections +cellSet,cell_sets +spikeTarget,spike_target +averageRate,average_rate +minimumISI,minimum_isi +minISI,min_isi +maxISI,max_isi +spike,spikes +simpleSeriesResistance,simple_series_resistance +returnVoltage,return_voltage +testingVoltage,testing_voltage +conditioningVoltage,conditioning_voltage targetVoltage,target_voltage -xs:anyURI,xs:any_uri -gLd,g_ld -biophysicalProperties,biophysical_properties -presynapticPopulation,presynaptic_population +rampGeneratorDL,ramp_generator_dls +sineGeneratorDL,sine_generator_dls +pulseGeneratorDL,pulse_generator_dls +rampGenerator,ramp_generators +sineGenerator,sine_generators +pulseGenerator,pulse_generators +baselineAmplitude,baseline_amplitude finishAmplitude,finish_amplitude -gLs,g_ls +startAmplitude,start_amplitude +resistivity,resistivities +decayingPoolConcentrationModel,decaying_pool_concentration_models +initialExtConcentration,initial_ext_concentration +initialConcentration,initial_concentration +concentrationModel,concentration_model +inhomogeneousParameter,inhomogeneous_parameters segmentGroup,segment_groups -alphaCurrentSynapse,alpha_current_synapses -poissonFiringSynapse,poisson_firing_synapses -cell,cells -path,paths -alphaCurrSynapse,alpha_curr_synapses -postsynapticPopulation,postsynaptic_population -gKdr,g_kdr -preFractionAlong,pre_fraction_along -projection,projections -forwardTransition,forward_transition -averageRate,average_rate -cellSet,cell_sets +inhomogeneousValue,inhomogeneous_value +segment,segments +condDensity,cond_density +ionChannel,ion_channel +variableParameter,variable_parameters +vShift,v_shift channelDensityNernstCa2,channel_density_nernst_ca2s -postSegmentId,post_segment_id -spike,spikes -fitzHughNagumoCell,fitz_hugh_nagumo_cells -channelPopulation,channel_populations -continuousProjection,continuous_projections -include,includes +initMembPotential,init_memb_potentials specificCapacitance,specific_capacitances -allowedSpaces,allowed_spaces -xSize,x_size -explicitInput,explicit_inputs -xs:nonNegativeInteger,xs:non_negative_integer -concentrationModel,concentration_model -ionChannelHH,ion_channel_hhs +spikeThresh,spike_threshes +channelDensityNonUniformGHK,channel_density_non_uniform_ghks +channelDensityNonUniformNernst,channel_density_non_uniform_nernsts +channelDensityNonUniform,channel_density_non_uniforms +channelDensityGHK2,channel_density_ghk2s channelDensityGHK,channel_density_ghks -intracellularProperties2CaPools,intracellular_properties2_ca_pools -linearGradedSynapse,linear_graded_synapses -iafCell,iaf_cells -silentSynapse,silent_synapses -spikeGeneratorRandom,spike_generator_randoms -gate,gates -steadyState,steady_state -channelDensity,channel_densities -expCondSynapse,exp_cond_synapses -continuousConnectionInstanceW,continuous_connection_instance_ws -expTwoSynapse,exp_two_synapses -gateKS,gate_kses -izhikevich2007Cell,izhikevich2007_cells -decayConstant,decay_constant -expOneSynapse,exp_one_synapses -baseCell,base_cells -tauDecay,tau_decay -iDend,i_dend -tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism -reverseRate,reverse_rate channelDensityNernst,channel_density_nernsts -reverseTransition,reverse_transition -preComponent,pre_component -minISI,min_isi -gCa,g_ca -eNa,e_na -transientPoissonFiringSynapse,transient_poisson_firing_synapses -preCell,pre_cell -blockConcentration,block_concentration -inputList,input_lists -tauRec,tau_rec -networkTypes,network_types -inhomogeneousValue,inhomogeneous_value +channelDensityVShift,channel_density_v_shifts +channelDensity,channel_densities +channelPopulation,channel_populations +intracellularProperties2CaPools,intracellular_properties2_ca_pools +membraneProperties2CaPools,membrane_properties2_ca_pools +intracellularProperties,intracellular_properties +membraneProperties,membrane_properties +normalizationEnd,normalization_end +translationStart,translation_start +subTree,sub_trees +path,paths +include,includes +member,members +biophysicalProperties2CaPools,biophysical_properties2_ca_pools +biophysicalProperties,biophysical_properties eL,e_l -network,networks eK,e_k -space,spaces -forwardRate,forward_rate -gKC,g_kc -rampGeneratorDL,ramp_generator_dls -neuroLexId,neuro_lex_id -returnVoltage,return_voltage -intracellularProperties,intracellular_properties -q10Settings,q10_settings -initialConcentration,initial_concentration -decayingPoolConcentrationModel,decaying_pool_concentration_models -voltageClampTriple,voltage_clamp_triples -alphaSynapse,alpha_synapses -preCellId,pre_cell_id -pulseGeneratorDL,pulse_generator_dls -gateHHrates,gate_hh_rates -population,populations eCa,e_ca -shellThickness,shell_thickness -expCurrSynapse,exp_curr_synapses -resistivity,resistivities -ySpacing,y_spacing -ySize,y_size -gateFractional,gate_fractionals -blockMechanism,block_mechanism -instance,instances -connectionWD,connection_wds -gradedSynapse,graded_synapses -gapJunction,gap_junctions -baselineAmplitude,baseline_amplitude -segment,segments -postFractionAlong,post_fraction_along -ionChannelVShift,ion_channel_v_shifts -spikeGeneratorRefPoisson,spike_generator_ref_poissons -channelTypes,channel_types -xStart,x_start -voltageClamp,voltage_clamps -testingVoltage,testing_voltage -adExIaFCell,ad_ex_ia_f_cells -ionChannelKS,ion_channel_kses -preSegmentId,pre_segment_id -spikeThresh,spike_threshes -spikeGeneratorPoisson,spike_generator_poissons -vShift,v_shift -ionChannelPassive,ion_channel_passive -subGate,sub_gates -gL,g_l -tauRise,tau_rise -izhikevichCell,izhikevich_cells -postCellId,post_cell_id -condDensity,cond_density -gateHHratesTauInf,gate_h_hrates_tau_infs -fixedFactorConcentrationModel,fixed_factor_concentration_models -fixedQ10,fixed_q10 -region,regions -extracellularProperties,extracellular_properties -connection,connections -http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd -electricalConnectionInstance,electrical_connection_instances -translationStart,translation_start -closedState,closed_states -gNa,g_na +eNa,e_na +gAmpa,g_ampa +gNmda,g_nmda +gKC,g_kc gKahp,g_kahp -electricalConnectionInstanceW,electrical_connection_instance_ws -spikeTarget,spike_target -yStart,y_start +gCa,g_ca +gKdr,g_kdr +gNa,g_na +gLd,g_ld +gLs,g_ls +iDend,i_dend +iSoma,i_soma +delT,del_t +gL,g_l +leakConductance,leak_conductance +leakReversal,leak_reversal tauFac,tau_fac -q10Factor,q10_factor -populationList,population_list -zSpacing,z_spacing +tauRec,tau_rec +initReleaseProb,init_release_prob +tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism +tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism +scalingVolt,scaling_volt +scalingConc,scaling_conc +blockConcentration,block_concentration +voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism +blockMechanism,block_mechanism +plasticityMechanism,plasticity_mechanism synapse2Path,synapse2_path +synapse1Path,synapse1_path +tauRise,tau_rise +tauDecay2,tau_decay2 +tauDecay1,tau_decay1 +tauDecay,tau_decay +decayConstant,decay_constant +restingConc,resting_conc +shellThickness,shell_thickness experimentalTemp,experimental_temp -openState,open_states -property,properties -zSize,z_size -compoundInput,compound_inputs -ionChannel,ion_channel -iafTauRefCell,iaf_tau_ref_cells -scalingConc,scaling_conc -pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +q10Factor,q10_factor +fixedQ10,fixed_q10 +fractionalConductance,fractional_conductance +timeCourse,time_course +steadyState,steady_state +q10Settings,q10_settings +subGate,sub_gates +reverseRate,reverse_rate +forwardRate,forward_rate +gateTypes,gate_types tauInfTransition,tau_inf_transition -member,members +reverseTransition,reverse_transition +forwardTransition,forward_transition +openState,open_states +closedState,closed_states +gateFractional,gate_fractionals +gateKS,gate_kses gateHHInstantaneous,gate_hh_instantaneouses -populationTypes,population_types -conditioningVoltage,conditioning_voltage -variableParameter,variable_parameters -iSoma,i_soma -channelDensityVShift,channel_density_v_shifts -biophysicalProperties2CaPools,biophysical_properties2_ca_pools -fractionalConductance,fractional_conductance -tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism -fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells -segmentId,segment_id +gateHHratesTauInf,gate_h_hrates_tau_infs +gateHHratesInf,gate_h_hrates_infs +gateHHtauInf,gate_hh_tau_infs +gateHHratesTau,gate_h_hrates_taus +gateHHrates,gate_hh_rates +channelTypes,channel_types +ionChannelHH,ion_channel_hhs +ionChannelPassive,ion_channel_passive +gate,gates q10ConductanceScaling,q10_conductance_scalings -rampGenerator,ramp_generators -voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism -postComponent,post_component -initReleaseProb,init_release_prob -maxISI,max_isi -doubleSynapse,double_synapses -timeCourse,time_course +fixedFactorConcentrationModel,fixed_factor_concentration_models +transientPoissonFiringSynapse,transient_poisson_firing_synapses +poissonFiringSynapse,poisson_firing_synapses +spikeGeneratorRefPoisson,spike_generator_ref_poissons +spikeGeneratorPoisson,spike_generator_poissons +spikeGeneratorRandom,spike_generator_randoms spikeGenerator,spike_generators timedSynapticInput,timed_synaptic_inputs -gateHHratesTau,gate_h_hrates_taus -continuousConnection,continuous_connections -networkWithTemperature,network_with_temperature -fractionAlong,fraction_along -normalizationEnd,normalization_end -synapse1Path,synapse1_path -electricalProjection,electrical_projections -gateHHratesInf,gate_h_hrates_infs -simpleSeriesResistance,simple_series_resistance -channelDensityGHK2,channel_density_ghk2s -preSegment,pre_segment -gNmda,g_nmda -scalingVolt,scaling_volt -initialExtConcentration,initial_ext_concentration -expThreeSynapse,exp_three_synapses -startAmplitude,start_amplitude -unbounded,unboundeds +spikeArray,spike_arrays +voltageClampTriple,voltage_clamp_triples +voltageClamp,voltage_clamps compoundInputDL,compound_input_dls -xs:positiveInteger,xs:positive_integer -membraneProperties2CaPools,membrane_properties2_ca_pools +compoundInput,compound_inputs +alphaCurrSynapse,alpha_curr_synapses +expCurrSynapse,exp_curr_synapses +alphaCondSynapse,alpha_cond_synapses +expCondSynapse,exp_cond_synapses +gradedSynapse,graded_synapses +linearGradedSynapse,linear_graded_synapses +silentSynapse,silent_synapses +gapJunction,gap_junctions +doubleSynapse,double_synapses +blockingPlasticSynapse,blocking_plastic_synapses +expThreeSynapse,exp_three_synapses +expTwoSynapse,exp_two_synapses +expOneSynapse,exp_one_synapses +alphaSynapse,alpha_synapses +alphaCurrentSynapse,alpha_current_synapses +pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells +fitzHughNagumoCell,fitz_hugh_nagumo_cells +adExIaFCell,ad_ex_ia_f_cells +izhikevich2007Cell,izhikevich2007_cells +izhikevichCell,izhikevich_cells +iafRefCell,iaf_ref_cells +iafCell,iaf_cells +iafTauRefCell,iaf_tau_ref_cells +iafTauCell,iaf_tau_cells +baseCell,base_cells +cell2CaPools,cell2_ca_poolses +cell,cells +xs:anyURI,xs:any_uri +ionChannelKS,ion_channel_kses +ionChannelVShift,ion_channel_v_shifts defaultValue,default_value -inputW,input_ws -continuousConnectionInstance,continuous_connection_instances -tauDecay1,tau_decay1 -leakConductance,leak_conductance -tauDecay2,tau_decay2 -subTree,sub_trees +xs:positiveInteger,xs:positive_integer javax.xml.bind.DatatypeConverter.parseInt,javax.xml.bind._datatype_converter.parse_int -iafTauCell,iaf_tau_cells -pulseGenerator,pulse_generators -iafRefCell,iaf_ref_cells -postSegment,post_segment javax.xml.bind.DatatypeConverter.printInt,javax.xml.bind._datatype_converter.print_int -gAmpa,g_ampa -electricalConnection,electrical_connections -synapticConnection,synaptic_connections -gateTypes,gate_types -channelDensityNonUniformNernst,channel_density_non_uniform_nernsts -restingConc,resting_conc -basedOn,based_on -leakReversal,leak_reversal -channelDensityNonUniformGHK,channel_density_non_uniform_ghks -initMembPotential,init_memb_potentials -postCell,post_cell -spikeArray,spike_arrays -blockingPlasticSynapse,blocking_plastic_synapses -minimumISI,minimum_isi diff --git a/neuroml/nml/name_table.csv b/neuroml/nml/name_table.csv index d7bf4692..8d01a147 100644 --- a/neuroml/nml/name_table.csv +++ b/neuroml/nml/name_table.csv @@ -1,365 +1,365 @@ -all,all -skip,skips -gateHHtauInf,gate_hh_tau_infs -gc,gc -morphology,morphology -gbase2,gbase2 -gbase1,gbase1 -sineGenerator,sine_generators -sineGeneratorDL,sine_generator_dls -cell2CaPools,cell2_ca_poolses -to,to -xSpacing,x_spacing -neuroml,neuroml -plasticityMechanism,plasticity_mechanism -unstructured,unstructured -alphaCondSynapse,alpha_cond_synapses -channelDensityNonUniform,channel_density_non_uniforms -synapse2,synapse2 -synapse1,synapse1 -condition,condition +http://www.neuroml.org/schema/neuroml2,http://www.neuroml.org/schema/neuroml2 +http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd +qualified,qualified +unqualified,unqualified +metaid,metaid +optional,optional +annotation,annotation +property,properties +unbounded,unboundeds notes,notes -zStart,z_start -membraneProperties,membrane_properties -inhomogeneousParameter,inhomogeneous_parameters -delT,del_t -targetVoltage,target_voltage -xs:anyURI,xs:any_uri -gLd,g_ld +id,id +required,required +neuroLexId,neuro_lex_id rate,rate -biophysicalProperties,biophysical_properties -presynapticPopulation,presynaptic_population -finishAmplitude,finish_amplitude -gLs,g_ls -segmentGroup,segment_groups -alphaCurrentSynapse,alpha_current_synapses -poissonFiringSynapse,poisson_firing_synapses -cell,cells -gbase,gbase +duration,duration +start,start +e_rev,e_rev +xs:float,xs:float +tau_syn,tau_syn +basePyNNCell,basePyNNCell +gbar_Na,gbar_Na +gbar_K,gbar_K +g_leak,g_leak +e_rev_leak,e_rev_leak +e_rev_Na,e_rev_Na +e_rev_K,e_rev_K +e_rev_I,e_rev_I +e_rev_E,e_rev_E +v_offset,v_offset +basePyNNIaFCondCell,basePyNNIaFCondCell +v_spike,v_spike +tau_w,tau_w +delta_T,delta_T +b,b +a,a +basePyNNIaFCell,basePyNNIaFCell +v_thresh,v_thresh +v_rest,v_rest v_reset,v_reset +tau_refrac,tau_refrac +tau_m,tau_m +v_init,v_init +tau_syn_I,tau_syn_I +tau_syn_E,tau_syn_E +i_offset,i_offset +cm,cm +weight,weight +fractionAlong,fraction_along +segmentId,segment_id +destination,destination +target,target +xs:string,xs:string component,component -active,active -path,paths -alphaCurrSynapse,alpha_curr_synapses -postsynapticPopulation,postsynaptic_population -gKdr,g_kdr -diameter,diameter +population,populations +inputW,input_ws +input,input +postComponent,post_component +preComponent,pre_component +continuousConnectionInstanceW,continuous_connection_instance_ws +continuousConnectionInstance,continuous_connection_instances +continuousConnection,continuous_connections +synapse,synapse +electricalConnectionInstanceW,electrical_connection_instance_ws +electricalConnectionInstance,electrical_connection_instances +electricalConnection,electrical_connections +delay,delay +postFractionAlong,post_fraction_along +postSegment,post_segment +postCell,post_cell preFractionAlong,pre_fraction_along -projection,projections -href,href -qd0,qd0 -select,select -forwardTransition,forward_transition -averageRate,average_rate -cellSet,cell_sets -channelDensityNernstCa2,channel_density_nernst_ca2s +preSegment,pre_segment +preCell,pre_cell postSegmentId,post_segment_id -spike,spikes +postCellId,post_cell_id +preSegmentId,pre_segment_id +preCellId,pre_cell_id +connectionWD,connection_wds +connection,connections +postsynapticPopulation,postsynaptic_population +presynapticPopulation,presynaptic_population +to,to +select,select +skip,skips +z,z +y,y +x,x +k,k +xs:nonNegativeInteger,xs:non_negative_integer +j,j +i,i +location,location +zSize,z_size +ySize,y_size +xSize,x_size +region,regions +number,number +space,spaces +unstructured,unstructured +grid,grid +random,random +populationTypes,population_types +populationList,population_list +extracellularProperties,extracellular_properties type,type -fitzHughNagumoCell,fitz_hugh_nagumo_cells -channelPopulation,channel_populations -continuousProjection,continuous_projections -include,includes -i_offset,i_offset -specificCapacitance,specific_capacitances +size,size +instance,instances +layout,layout allowedSpaces,allowed_spaces -delta_T,delta_T -tauw,tauw -xSize,x_size -explicitInput,explicit_inputs -tau,tau -xs:nonNegativeInteger,xs:non_negative_integer -concentrationModel,concentration_model -ionChannelHH,ion_channel_hhs -channelDensityGHK,channel_density_ghks -intracellularProperties2CaPools,intracellular_properties2_ca_pools -tag,tag -v_rest,v_rest -v_spike,v_spike -linearGradedSynapse,linear_graded_synapses -iafCell,iaf_cells -species,species -silentSynapse,silent_synapses -spikeGeneratorRandom,spike_generator_randoms -gate,gates -steadyState,steady_state -parameter,parameter -y,y -e_rev_leak,e_rev_leak -channelDensity,channel_densities -expCondSynapse,exp_cond_synapses -continuousConnectionInstanceW,continuous_connection_instance_ws -expTwoSynapse,exp_two_synapses -annotation,annotation -a,a -gateKS,gate_kses -gbar_Na,gbar_Na -izhikevich2007Cell,izhikevich2007_cells -IF_curr_alpha,IF_curr_alpha -decayConstant,decay_constant -expOneSynapse,exp_one_synapses -baseCell,base_cells -tauDecay,tau_decay -iDend,i_dend -phi,phi -tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism -delay,delay -reverseRate,reverse_rate -channelDensityNernst,channel_density_nernsts -reverseTransition,reverse_transition -preComponent,pre_component -basePyNNIaFCondCell,basePyNNIaFCondCell -minISI,min_isi -gCa,g_ca -eNa,e_na -transientPoissonFiringSynapse,transient_poisson_firing_synapses -qualified,qualified -name,name -preCell,pre_cell -blockConcentration,block_concentration -inputList,input_lists -tauRec,tau_rec -weight,weight +zStart,z_start +yStart,y_start +xStart,x_start +zSpacing,z_spacing +ySpacing,y_spacing +xSpacing,x_spacing +basedOn,based_on +structure,structure networkTypes,network_types -inhomogeneousValue,inhomogeneous_value -conductance,conductance -description,description -eL,e_l +networkWithTemperature,network_with_temperature network,networks -eK,e_k -space,spaces -forwardRate,forward_rate -midpoint,midpoint -tau_syn_E,tau_syn_E -tau_syn_I,tau_syn_I -gKC,g_kc -rampGeneratorDL,ramp_generator_dls -vpeak,vpeak -alphac,alphac -neuroLexId,neuro_lex_id -returnVoltage,return_voltage -intracellularProperties,intracellular_properties -q10Settings,q10_settings -distal,distal -number,number -initialConcentration,initial_concentration -instances,instances -xs:string,xs:string -size,size temperature,temperature -decayingPoolConcentrationModel,decaying_pool_concentration_models -voltageClampTriple,voltage_clamp_triples -alphaSynapse,alpha_synapses -preCellId,pre_cell_id +inputList,input_lists +explicitInput,explicit_inputs +continuousProjection,continuous_projections +electricalProjection,electrical_projections +projection,projections +synapticConnection,synaptic_connections +cellSet,cell_sets +spikeTarget,spike_target +averageRate,average_rate +minimumISI,minimum_isi +minISI,min_isi +maxISI,max_isi +period,period +spike,spikes +time,time +simpleSeriesResistance,simple_series_resistance +returnVoltage,return_voltage +testingVoltage,testing_voltage +conditioningVoltage,conditioning_voltage +active,active +targetVoltage,target_voltage +rampGeneratorDL,ramp_generator_dls +sineGeneratorDL,sine_generator_dls pulseGeneratorDL,pulse_generator_dls -thresh,thresh -gateHHrates,gate_hh_rates -population,populations -b,b -target,target -eCa,e_ca -shellThickness,shell_thickness -expCurrSynapse,exp_curr_synapses -amplitude,amplitude -resistivity,resistivities -ySpacing,y_spacing -ySize,y_size -gateFractional,gate_fractionals -blockMechanism,block_mechanism -instance,instances -connectionWD,connection_wds -gradedSynapse,graded_synapses -gapJunction,gap_junctions +rampGenerator,ramp_generators +sineGenerator,sine_generators +pulseGenerator,pulse_generators baselineAmplitude,baseline_amplitude -rho,rho +finishAmplitude,finish_amplitude +startAmplitude,start_amplitude +amplitude,amplitude phase,phase +source,source +species,species +resistivity,resistivities +decayingPoolConcentrationModel,decaying_pool_concentration_models +initialExtConcentration,initial_ext_concentration +initialConcentration,initial_concentration +ion,ion +concentrationModel,concentration_model +value,value +inhomogeneousParameter,inhomogeneous_parameters +segmentGroup,segment_groups +parameter,parameter +inhomogeneousValue,inhomogeneous_value segment,segments -refract,refract -postFractionAlong,post_fraction_along -ionChannelVShift,ion_channel_v_shifts -spikeGeneratorRefPoisson,spike_generator_ref_poissons -random,random -channelTypes,channel_types -xStart,x_start -xs:float,xs:float -tau_m,tau_m -layout,layout -basePyNNIaFCell,basePyNNIaFCell -voltageClamp,voltage_clamps -tau_w,tau_w -testingVoltage,testing_voltage -adExIaFCell,ad_ex_ia_f_cells -ionChannelKS,ion_channel_kses -preSegmentId,pre_segment_id -spikeThresh,spike_threshes -synapse,synapse -spikeGeneratorPoisson,spike_generator_poissons +all,all +condDensity,cond_density +ionChannel,ion_channel +permeability,permeability +variableParameter,variable_parameters vShift,v_shift -x,x -e_rev,e_rev -v_offset,v_offset -ionChannelPassive,ion_channel_passive -subGate,sub_gates erev,erev -parent,parent -gL,g_l -tauRise,tau_rise -izhikevichCell,izhikevich_cells -postCellId,post_cell_id -condDensity,cond_density -gateHHratesTauInf,gate_h_hrates_tau_infs -c,c -fixedFactorConcentrationModel,fixed_factor_concentration_models -fixedQ10,fixed_q10 -region,regions -extracellularProperties,extracellular_properties -connection,connections -http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd -electricalConnectionInstance,electrical_connection_instances -cm,cm +channelDensityNernstCa2,channel_density_nernst_ca2s +initMembPotential,init_memb_potentials +specificCapacitance,specific_capacitances +spikeThresh,spike_threshes +channelDensityNonUniformGHK,channel_density_non_uniform_ghks +channelDensityNonUniformNernst,channel_density_non_uniform_nernsts +channelDensityNonUniform,channel_density_non_uniforms +channelDensityGHK2,channel_density_ghk2s +channelDensityGHK,channel_density_ghks +channelDensityNernst,channel_density_nernsts +channelDensityVShift,channel_density_v_shifts +channelDensity,channel_densities +channelPopulation,channel_populations +intracellularProperties2CaPools,intracellular_properties2_ca_pools +membraneProperties2CaPools,membrane_properties2_ca_pools +intracellularProperties,intracellular_properties +membraneProperties,membrane_properties +normalizationEnd,normalization_end +xs:double,xs:double translationStart,translation_start -closedState,closed_states -period,period -gNa,g_na -gKahp,g_kahp +metric,metric +variable,variable +distal,distal +proximal,proximal +subTree,sub_trees +path,paths +include,includes +member,members +diameter,diameter +name,name +parent,parent +biophysicalProperties2CaPools,biophysical_properties2_ca_pools +biophysicalProperties,biophysical_properties +morphology,morphology +betac,betac +alphac,alphac pp,pp -electricalConnectionInstanceW,electrical_connection_instance_ws -spikeTarget,spike_target -optional,optional -yStart,y_start +qd0,qd0 +eL,e_l +eK,e_k +eCa,e_ca +eNa,e_na +gAmpa,g_ampa +gNmda,g_nmda +gKC,g_kc +gKahp,g_kahp +gCa,g_ca +gKdr,g_kdr +gNa,g_na +gLd,g_ld +gLs,g_ls +gc,gc +iDend,i_dend +iSoma,i_soma +phi,phi +refract,refract +tauw,tauw +delT,del_t +thresh,thresh +reset,reset +gL,g_l +d,d +c,c +vpeak,vpeak +vt,vt +vr,vr +v0,v0 +leakConductance,leak_conductance +leakReversal,leak_reversal +tau,tau tauFac,tau_fac -q10Factor,q10_factor -populationList,population_list -zSpacing,z_spacing +tauRec,tau_rec +initReleaseProb,init_release_prob +tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism +tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism +scalingVolt,scaling_volt +scalingConc,scaling_conc +blockConcentration,block_concentration +voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism +blockMechanism,block_mechanism +plasticityMechanism,plasticity_mechanism synapse2Path,synapse2_path -betac,betac +synapse1Path,synapse1_path +synapse2,synapse2 +synapse1,synapse1 +tauRise,tau_rise +tauDecay2,tau_decay2 +tauDecay1,tau_decay1 +tauDecay,tau_decay +ibase,ibase +delta,delta +conductance,conductance +gbase2,gbase2 +gbase1,gbase1 +gbase,gbase +rho,rho +decayConstant,decay_constant +restingConc,resting_conc +shellThickness,shell_thickness +scale,scale +midpoint,midpoint experimentalTemp,experimental_temp -value,value -openState,open_states -property,properties -k,k -zSize,z_size -tau_refrac,tau_refrac -metric,metric -compoundInput,compound_inputs -ionChannel,ion_channel -vr,vr -vt,vt -iafTauRefCell,iaf_tau_ref_cells -id,id -basePyNNCell,basePyNNCell -scalingConc,scaling_conc -pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +q10Factor,q10_factor +fixedQ10,fixed_q10 +fractionalConductance,fractional_conductance +timeCourse,time_course +steadyState,steady_state +q10Settings,q10_settings +instances,instances +subGate,sub_gates +reverseRate,reverse_rate +forwardRate,forward_rate +gateTypes,gate_types tauInfTransition,tau_inf_transition -member,members +reverseTransition,reverse_transition +forwardTransition,forward_transition +openState,open_states +closedState,closed_states +gateFractional,gate_fractionals +gateKS,gate_kses gateHHInstantaneous,gate_hh_instantaneouses -populationTypes,population_types -conditioningVoltage,conditioning_voltage -ibase,ibase -v0,v0 -ion,ion -variableParameter,variable_parameters -unqualified,unqualified -iSoma,i_soma -g_leak,g_leak -i,i -channelDensityVShift,channel_density_v_shifts -biophysicalProperties2CaPools,biophysical_properties2_ca_pools -fractionalConductance,fractional_conductance -dimension,dimension -http://www.neuroml.org/schema/neuroml2,http://www.neuroml.org/schema/neuroml2 -tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism -proximal,proximal -fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells -segmentId,segment_id +gateHHratesTauInf,gate_h_hrates_tau_infs +gateHHratesInf,gate_h_hrates_infs +gateHHtauInf,gate_hh_tau_infs +gateHHratesTau,gate_h_hrates_taus +gateHHrates,gate_hh_rates +channelTypes,channel_types +ionChannelHH,ion_channel_hhs +ionChannelPassive,ion_channel_passive +gate,gates q10ConductanceScaling,q10_conductance_scalings -rampGenerator,ramp_generators -source,source -extends,extends -location,location -input,input -voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism -postComponent,post_component -initReleaseProb,init_release_prob -maxISI,max_isi -doubleSynapse,double_synapses -grid,grid -IF_cond_alpha,IF_cond_alpha -d,d -v_thresh,v_thresh -timeCourse,time_course +fixedFactorConcentrationModel,fixed_factor_concentration_models +transientPoissonFiringSynapse,transient_poisson_firing_synapses +poissonFiringSynapse,poisson_firing_synapses +spikeGeneratorRefPoisson,spike_generator_ref_poissons +spikeGeneratorPoisson,spike_generator_poissons +spikeGeneratorRandom,spike_generator_randoms spikeGenerator,spike_generators timedSynapticInput,timed_synaptic_inputs -gateHHratesTau,gate_h_hrates_taus -continuousConnection,continuous_connections -duration,duration -scale,scale -metaid,metaid -networkWithTemperature,network_with_temperature -fractionAlong,fraction_along -normalizationEnd,normalization_end -synapse1Path,synapse1_path -electricalProjection,electrical_projections -IF_curr_exp,IF_curr_exp -gateHHratesInf,gate_h_hrates_infs -simpleSeriesResistance,simple_series_resistance -e_rev_Na,e_rev_Na -IF_cond_exp,IF_cond_exp -tau_syn,tau_syn -channelDensityGHK2,channel_density_ghk2s -e_rev_E,e_rev_E -e_rev_I,e_rev_I -e_rev_K,e_rev_K -preSegment,pre_segment -v_init,v_init -gNmda,g_nmda -scalingVolt,scaling_volt -initialExtConcentration,initial_ext_concentration -expThreeSynapse,exp_three_synapses -destination,destination -startAmplitude,start_amplitude -unbounded,unboundeds +spikeArray,spike_arrays +voltageClampTriple,voltage_clamp_triples +voltageClamp,voltage_clamps compoundInputDL,compound_input_dls -xs:positiveInteger,xs:positive_integer -membraneProperties2CaPools,membrane_properties2_ca_pools +compoundInput,compound_inputs +alphaCurrSynapse,alpha_curr_synapses +expCurrSynapse,exp_curr_synapses +alphaCondSynapse,alpha_cond_synapses +expCondSynapse,exp_cond_synapses +gradedSynapse,graded_synapses +linearGradedSynapse,linear_graded_synapses +silentSynapse,silent_synapses +gapJunction,gap_junctions +doubleSynapse,double_synapses +blockingPlasticSynapse,blocking_plastic_synapses +expThreeSynapse,exp_three_synapses +expTwoSynapse,exp_two_synapses +expOneSynapse,exp_one_synapses +alphaSynapse,alpha_synapses +alphaCurrentSynapse,alpha_current_synapses +pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells +fitzHughNagumoCell,fitz_hugh_nagumo_cells +adExIaFCell,ad_ex_ia_f_cells +izhikevich2007Cell,izhikevich2007_cells +izhikevichCell,izhikevich_cells +iafRefCell,iaf_ref_cells +iafCell,iaf_cells +iafTauRefCell,iaf_tau_ref_cells +iafTauCell,iaf_tau_cells +baseCell,base_cells +cell2CaPools,cell2_ca_poolses +cell,cells +href,href +xs:anyURI,xs:any_uri +ionChannelKS,ion_channel_kses +ionChannelVShift,ion_channel_v_shifts +neuroml,neuroml +condition,condition defaultValue,default_value -inputW,input_ws -continuousConnectionInstance,continuous_connection_instances -start,start -tauDecay1,tau_decay1 -leakConductance,leak_conductance -tauDecay2,tau_decay2 exposure,exposure -subTree,sub_trees +description,description +dimension,dimension +extends,extends +tag,tag +xs:positiveInteger,xs:positive_integer +int,int javax.xml.bind.DatatypeConverter.parseInt,javax.xml.bind._datatype_converter.parse_int -delta,delta -iafTauCell,iaf_tau_cells -pulseGenerator,pulse_generators -iafRefCell,iaf_ref_cells -reset,reset -j,j -postSegment,post_segment javax.xml.bind.DatatypeConverter.printInt,javax.xml.bind._datatype_converter.print_int -z,z -xs:double,xs:double -required,required -int,int -gAmpa,g_ampa -electricalConnection,electrical_connections -synapticConnection,synaptic_connections -gateTypes,gate_types -channelDensityNonUniformNernst,channel_density_non_uniform_nernsts -permeability,permeability -restingConc,resting_conc -basedOn,based_on -leakReversal,leak_reversal -channelDensityNonUniformGHK,channel_density_non_uniform_ghks -gbar_K,gbar_K -initMembPotential,init_memb_potentials -postCell,post_cell -variable,variable -structure,structure -spikeArray,spike_arrays -blockingPlasticSynapse,blocking_plastic_synapses -minimumISI,minimum_isi -time,time +IF_curr_alpha,IF_curr_alpha +IF_curr_exp,IF_curr_exp +IF_cond_alpha,IF_cond_alpha +IF_cond_exp,IF_cond_exp diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index 99bdf47c..f55154e2 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -2,20 +2,19 @@ # -*- coding: utf-8 -*- # -# Generated Fri Mar 26 09:44:40 2021 by generateDS.py version 2.35.5. +# Generated Fri Mar 26 11:39:57 2021 by generateDS.py version 2.35.5. # Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] # # Command line options: # ('-o', 'nml.py') # ('--use-getter-setter', 'none') -# ('--silence', '') # ('--user-methods', 'helper_methods.py') # # Command line arguments: -# NeuroML_v2.1.xsd +# ./NeuroML_v2.1.xsd # # Command line: -# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --silence --user-methods="helper_methods.py" NeuroML_v2.1.xsd +# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" ./NeuroML_v2.1.xsd # # Current working directory (os.getcwd()): # nml @@ -1941,19 +1940,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class LEMS_Property(NamedDimensionalType): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('defaultValue', 'xs:double', 0, 1, {'use': 'optional'}), + MemberSpec_('default_value', 'xs:double', 0, 1, {'use': 'optional'}), ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, defaultValue=None, gds_collector_=None, **kwargs_): + def __init__(self, name=None, dimension=None, description=None, default_value=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None super(LEMS_Property, self).__init__(name, dimension, description, **kwargs_) - self.defaultValue = _cast(float, defaultValue) - self.defaultValue_nsprefix_ = None + self.default_value = _cast(float, default_value) + self.default_value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1996,9 +1995,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='LEMS_Property'): super(LEMS_Property, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='LEMS_Property') - if self.defaultValue is not None and 'defaultValue' not in already_processed: - already_processed.add('defaultValue') - outfile.write(' defaultValue="%s"' % self.gds_format_double(self.defaultValue, input_name='defaultValue')) + if self.default_value is not None and 'default_value' not in already_processed: + already_processed.add('default_value') + outfile.write(' defaultValue="%s"' % self.gds_format_double(self.default_value, input_name='defaultValue')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='LEMS_Property', fromsubclass_=False, pretty_print=True): super(LEMS_Property, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass @@ -2107,11 +2106,11 @@ class InstanceRequirement(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, name=None, type_=None, gds_collector_=None, **kwargs_): + def __init__(self, name=None, type=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -2119,8 +2118,8 @@ def __init__(self, name=None, type_=None, gds_collector_=None, **kwargs_): self.ns_prefix_ = None self.name = _cast(None, name) self.name_nsprefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2165,9 +2164,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.name is not None and 'name' not in already_processed: already_processed.add('name') outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), )) - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InstanceRequirement', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -2189,7 +2188,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value + self.type = value def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class InstanceRequirement @@ -2872,21 +2871,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Q10ConductanceScaling(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10Factor', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('experimentalTemp', 'Nml2Quantity_temperature', 0, 0, {'use': 'required'}), + MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, q10Factor=None, experimentalTemp=None, gds_collector_=None, **kwargs_): + def __init__(self, q10_factor=None, experimental_temp=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.q10Factor = _cast(None, q10Factor) - self.q10Factor_nsprefix_ = None - self.experimentalTemp = _cast(None, experimentalTemp) - self.experimentalTemp_nsprefix_ = None + self.q10_factor = _cast(None, q10_factor) + self.q10_factor_nsprefix_ = None + self.experimental_temp = _cast(None, experimental_temp) + self.experimental_temp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2950,12 +2949,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10ConductanceScaling'): - if self.q10Factor is not None and 'q10Factor' not in already_processed: - already_processed.add('q10Factor') - outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10Factor), input_name='q10Factor')), )) - if self.experimentalTemp is not None and 'experimentalTemp' not in already_processed: - already_processed.add('experimentalTemp') - outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimentalTemp), input_name='experimentalTemp')), )) + if self.q10_factor is not None and 'q10_factor' not in already_processed: + already_processed.add('q10_factor') + outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10_factor), input_name='q10Factor')), )) + if self.experimental_temp is not None and 'experimental_temp' not in already_processed: + already_processed.add('experimental_temp') + outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimental_temp), input_name='experimentalTemp')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10ConductanceScaling', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -2973,13 +2972,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('q10Factor', node) if value is not None and 'q10Factor' not in already_processed: already_processed.add('q10Factor') - self.q10Factor = value - self.validate_Nml2Quantity_none(self.q10Factor) # validate type Nml2Quantity_none + self.q10_factor = value + self.validate_Nml2Quantity_none(self.q10_factor) # validate type Nml2Quantity_none value = find_attr_value_('experimentalTemp', node) if value is not None and 'experimentalTemp' not in already_processed: already_processed.add('experimentalTemp') - self.experimentalTemp = value - self.validate_Nml2Quantity_temperature(self.experimentalTemp) # validate type Nml2Quantity_temperature + self.experimental_temp = value + self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Q10ConductanceScaling @@ -2988,27 +2987,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Q10Settings(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('fixedQ10', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), - MemberSpec_('q10Factor', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), - MemberSpec_('experimentalTemp', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('fixed_q10', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), + MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), + MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type_=None, fixedQ10=None, q10Factor=None, experimentalTemp=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, fixed_q10=None, q10_factor=None, experimental_temp=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None - self.fixedQ10 = _cast(None, fixedQ10) - self.fixedQ10_nsprefix_ = None - self.q10Factor = _cast(None, q10Factor) - self.q10Factor_nsprefix_ = None - self.experimentalTemp = _cast(None, experimentalTemp) - self.experimentalTemp_nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None + self.fixed_q10 = _cast(None, fixed_q10) + self.fixed_q10_nsprefix_ = None + self.q10_factor = _cast(None, q10_factor) + self.q10_factor_nsprefix_ = None + self.experimental_temp = _cast(None, experimental_temp) + self.experimental_temp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3083,18 +3082,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10Settings'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) - if self.fixedQ10 is not None and 'fixedQ10' not in already_processed: - already_processed.add('fixedQ10') - outfile.write(' fixedQ10=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fixedQ10), input_name='fixedQ10')), )) - if self.q10Factor is not None and 'q10Factor' not in already_processed: - already_processed.add('q10Factor') - outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10Factor), input_name='q10Factor')), )) - if self.experimentalTemp is not None and 'experimentalTemp' not in already_processed: - already_processed.add('experimentalTemp') - outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimentalTemp), input_name='experimentalTemp')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.fixed_q10 is not None and 'fixed_q10' not in already_processed: + already_processed.add('fixed_q10') + outfile.write(' fixedQ10=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fixed_q10), input_name='fixedQ10')), )) + if self.q10_factor is not None and 'q10_factor' not in already_processed: + already_processed.add('q10_factor') + outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10_factor), input_name='q10Factor')), )) + if self.experimental_temp is not None and 'experimental_temp' not in already_processed: + already_processed.add('experimental_temp') + outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimental_temp), input_name='experimentalTemp')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10Settings', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -3112,23 +3111,23 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_NmlId(self.type_) # validate type NmlId + self.type = value + self.validate_NmlId(self.type) # validate type NmlId value = find_attr_value_('fixedQ10', node) if value is not None and 'fixedQ10' not in already_processed: already_processed.add('fixedQ10') - self.fixedQ10 = value - self.validate_Nml2Quantity_none(self.fixedQ10) # validate type Nml2Quantity_none + self.fixed_q10 = value + self.validate_Nml2Quantity_none(self.fixed_q10) # validate type Nml2Quantity_none value = find_attr_value_('q10Factor', node) if value is not None and 'q10Factor' not in already_processed: already_processed.add('q10Factor') - self.q10Factor = value - self.validate_Nml2Quantity_none(self.q10Factor) # validate type Nml2Quantity_none + self.q10_factor = value + self.validate_Nml2Quantity_none(self.q10_factor) # validate type Nml2Quantity_none value = find_attr_value_('experimentalTemp', node) if value is not None and 'experimentalTemp' not in already_processed: already_processed.add('experimentalTemp') - self.experimentalTemp = value - self.validate_Nml2Quantity_temperature(self.experimentalTemp) # validate type Nml2Quantity_temperature + self.experimental_temp = value + self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Q10Settings @@ -3137,21 +3136,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class HHRate(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 1, {'use': 'optional'}), MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type_=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.rate = _cast(None, rate) self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) @@ -3232,9 +3231,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHRate'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) @@ -3261,8 +3260,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_NmlId(self.type_) # validate type NmlId + self.type = value + self.validate_NmlId(self.type) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') @@ -3286,21 +3285,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class HHVariable(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('rate', 'xs:float', 0, 1, {'use': 'optional'}), MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type_=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.rate = _cast(float, rate) self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) @@ -3370,9 +3369,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHVariable'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') outfile.write(' rate="%s"' % self.gds_format_float(self.rate, input_name='rate')) @@ -3399,8 +3398,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_NmlId(self.type_) # validate type NmlId + self.type = value + self.validate_NmlId(self.type) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') @@ -3424,7 +3423,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class HHTime(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('rate', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), @@ -3432,14 +3431,14 @@ class HHTime(GeneratedsSuper): ] subclass = None superclass = None - def __init__(self, type_=None, rate=None, midpoint=None, scale=None, tau=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, rate=None, midpoint=None, scale=None, tau=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.rate = _cast(None, rate) self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) @@ -3522,9 +3521,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHTime'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) @@ -3554,8 +3553,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_NmlId(self.type_) # validate type NmlId + self.type = value + self.validate_NmlId(self.type) # validate type NmlId value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') @@ -3584,30 +3583,30 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class BlockMechanism(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'BlockTypes', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'BlockTypes', 0, 0, {'use': 'required'}), MemberSpec_('species', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('blockConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('scalingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('scalingVolt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('block_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('scaling_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('scaling_volt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, type_=None, species=None, blockConcentration=None, scalingConc=None, scalingVolt=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, species=None, block_concentration=None, scaling_conc=None, scaling_volt=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.species = _cast(None, species) self.species_nsprefix_ = None - self.blockConcentration = _cast(None, blockConcentration) - self.blockConcentration_nsprefix_ = None - self.scalingConc = _cast(None, scalingConc) - self.scalingConc_nsprefix_ = None - self.scalingVolt = _cast(None, scalingVolt) - self.scalingVolt_nsprefix_ = None + self.block_concentration = _cast(None, block_concentration) + self.block_concentration_nsprefix_ = None + self.scaling_conc = _cast(None, scaling_conc) + self.scaling_conc_nsprefix_ = None + self.scaling_volt = _cast(None, scaling_volt) + self.scaling_volt_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3695,21 +3694,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BlockMechanism'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.species is not None and 'species' not in already_processed: already_processed.add('species') outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) - if self.blockConcentration is not None and 'blockConcentration' not in already_processed: - already_processed.add('blockConcentration') - outfile.write(' blockConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.blockConcentration), input_name='blockConcentration')), )) - if self.scalingConc is not None and 'scalingConc' not in already_processed: - already_processed.add('scalingConc') - outfile.write(' scalingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scalingConc), input_name='scalingConc')), )) - if self.scalingVolt is not None and 'scalingVolt' not in already_processed: - already_processed.add('scalingVolt') - outfile.write(' scalingVolt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scalingVolt), input_name='scalingVolt')), )) + if self.block_concentration is not None and 'block_concentration' not in already_processed: + already_processed.add('block_concentration') + outfile.write(' blockConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.block_concentration), input_name='blockConcentration')), )) + if self.scaling_conc is not None and 'scaling_conc' not in already_processed: + already_processed.add('scaling_conc') + outfile.write(' scalingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scaling_conc), input_name='scalingConc')), )) + if self.scaling_volt is not None and 'scaling_volt' not in already_processed: + already_processed.add('scaling_volt') + outfile.write(' scalingVolt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scaling_volt), input_name='scalingVolt')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BlockMechanism', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -3727,8 +3726,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_BlockTypes(self.type_) # validate type BlockTypes + self.type = value + self.validate_BlockTypes(self.type) # validate type BlockTypes value = find_attr_value_('species', node) if value is not None and 'species' not in already_processed: already_processed.add('species') @@ -3737,18 +3736,18 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('blockConcentration', node) if value is not None and 'blockConcentration' not in already_processed: already_processed.add('blockConcentration') - self.blockConcentration = value - self.validate_Nml2Quantity_concentration(self.blockConcentration) # validate type Nml2Quantity_concentration + self.block_concentration = value + self.validate_Nml2Quantity_concentration(self.block_concentration) # validate type Nml2Quantity_concentration value = find_attr_value_('scalingConc', node) if value is not None and 'scalingConc' not in already_processed: already_processed.add('scalingConc') - self.scalingConc = value - self.validate_Nml2Quantity_concentration(self.scalingConc) # validate type Nml2Quantity_concentration + self.scaling_conc = value + self.validate_Nml2Quantity_concentration(self.scaling_conc) # validate type Nml2Quantity_concentration value = find_attr_value_('scalingVolt', node) if value is not None and 'scalingVolt' not in already_processed: already_processed.add('scalingVolt') - self.scalingVolt = value - self.validate_Nml2Quantity_voltage(self.scalingVolt) # validate type Nml2Quantity_voltage + self.scaling_volt = value + self.validate_Nml2Quantity_voltage(self.scaling_volt) # validate type Nml2Quantity_voltage def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class BlockMechanism @@ -3757,27 +3756,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class PlasticityMechanism(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'PlasticityTypes', 0, 0, {'use': 'required'}), - MemberSpec_('initReleaseProb', 'ZeroToOne', 0, 0, {'use': 'required'}), - MemberSpec_('tauRec', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tauFac', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'PlasticityTypes', 0, 0, {'use': 'required'}), + MemberSpec_('init_release_prob', 'ZeroToOne', 0, 0, {'use': 'required'}), + MemberSpec_('tau_rec', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_fac', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, type_=None, initReleaseProb=None, tauRec=None, tauFac=None, gds_collector_=None, **kwargs_): + def __init__(self, type=None, init_release_prob=None, tau_rec=None, tau_fac=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None - self.initReleaseProb = _cast(float, initReleaseProb) - self.initReleaseProb_nsprefix_ = None - self.tauRec = _cast(None, tauRec) - self.tauRec_nsprefix_ = None - self.tauFac = _cast(None, tauFac) - self.tauFac_nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None + self.init_release_prob = _cast(float, init_release_prob) + self.init_release_prob_nsprefix_ = None + self.tau_rec = _cast(None, tau_rec) + self.tau_rec_nsprefix_ = None + self.tau_fac = _cast(None, tau_fac) + self.tau_fac_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3858,18 +3857,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PlasticityMechanism'): - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) - if self.initReleaseProb is not None and 'initReleaseProb' not in already_processed: - already_processed.add('initReleaseProb') - outfile.write(' initReleaseProb="%s"' % self.gds_format_float(self.initReleaseProb, input_name='initReleaseProb')) - if self.tauRec is not None and 'tauRec' not in already_processed: - already_processed.add('tauRec') - outfile.write(' tauRec=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRec), input_name='tauRec')), )) - if self.tauFac is not None and 'tauFac' not in already_processed: - already_processed.add('tauFac') - outfile.write(' tauFac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauFac), input_name='tauFac')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.init_release_prob is not None and 'init_release_prob' not in already_processed: + already_processed.add('init_release_prob') + outfile.write(' initReleaseProb="%s"' % self.gds_format_float(self.init_release_prob, input_name='initReleaseProb')) + if self.tau_rec is not None and 'tau_rec' not in already_processed: + already_processed.add('tau_rec') + outfile.write(' tauRec=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rec), input_name='tauRec')), )) + if self.tau_fac is not None and 'tau_fac' not in already_processed: + already_processed.add('tau_fac') + outfile.write(' tauFac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_fac), input_name='tauFac')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PlasticityMechanism', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -3887,24 +3886,24 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_PlasticityTypes(self.type_) # validate type PlasticityTypes + self.type = value + self.validate_PlasticityTypes(self.type) # validate type PlasticityTypes value = find_attr_value_('initReleaseProb', node) if value is not None and 'initReleaseProb' not in already_processed: already_processed.add('initReleaseProb') value = self.gds_parse_float(value, node, 'initReleaseProb') self.initReleaseProb = value - self.validate_ZeroToOne(self.initReleaseProb) # validate type ZeroToOne + self.validate_ZeroToOne(self.init_release_prob) # validate type ZeroToOne value = find_attr_value_('tauRec', node) if value is not None and 'tauRec' not in already_processed: already_processed.add('tauRec') - self.tauRec = value - self.validate_Nml2Quantity_time(self.tauRec) # validate type Nml2Quantity_time + self.tau_rec = value + self.validate_Nml2Quantity_time(self.tau_rec) # validate type Nml2Quantity_time value = find_attr_value_('tauFac', node) if value is not None and 'tauFac' not in already_processed: already_processed.add('tauFac') - self.tauFac = value - self.validate_Nml2Quantity_time(self.tauFac) # validate type Nml2Quantity_time + self.tau_fac = value + self.validate_Nml2Quantity_time(self.tau_fac) # validate type Nml2Quantity_time def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class PlasticityMechanism @@ -3913,21 +3912,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SegmentParent(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), - MemberSpec_('fractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, segment=None, fractionAlong='1', gds_collector_=None, **kwargs_): + def __init__(self, segments=None, fraction_along='1', gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.segment = _cast(int, segment) - self.segment_nsprefix_ = None - self.fractionAlong = _cast(float, fractionAlong) - self.fractionAlong_nsprefix_ = None + self.segments = _cast(int, segments) + self.segments_nsprefix_ = None + self.fraction_along = _cast(float, fraction_along) + self.fraction_along_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3992,12 +3991,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentParent'): - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) - if self.fractionAlong != 1 and 'fractionAlong' not in already_processed: - already_processed.add('fractionAlong') - outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fractionAlong, input_name='fractionAlong')) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + if self.fraction_along != 1 and 'fraction_along' not in already_processed: + already_processed.add('fraction_along') + outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fraction_along, input_name='fractionAlong')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentParent', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4015,16 +4014,16 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = self.gds_parse_integer(value, node, 'segment') - if self.segment < 0: + self.segments = self.gds_parse_integer(value, node, 'segment') + if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') value = self.gds_parse_float(value, node, 'fractionAlong') self.fractionAlong = value - self.validate_ZeroToOne(self.fractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SegmentParent @@ -4183,18 +4182,18 @@ def distance_to(self, other_3d_point): class ProximalDetails(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('translationStart', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('translation_start', 'xs:double', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, translationStart=None, gds_collector_=None, **kwargs_): + def __init__(self, translation_start=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.translationStart = _cast(float, translationStart) - self.translationStart_nsprefix_ = None + self.translation_start = _cast(float, translation_start) + self.translation_start_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4236,9 +4235,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ProximalDetails'): - if self.translationStart is not None and 'translationStart' not in already_processed: - already_processed.add('translationStart') - outfile.write(' translationStart="%s"' % self.gds_format_double(self.translationStart, input_name='translationStart')) + if self.translation_start is not None and 'translation_start' not in already_processed: + already_processed.add('translation_start') + outfile.write(' translationStart="%s"' % self.gds_format_double(self.translation_start, input_name='translationStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ProximalDetails', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4266,18 +4265,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class DistalDetails(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('normalizationEnd', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('normalization_end', 'xs:double', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, normalizationEnd=None, gds_collector_=None, **kwargs_): + def __init__(self, normalization_end=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.normalizationEnd = _cast(float, normalizationEnd) - self.normalizationEnd_nsprefix_ = None + self.normalization_end = _cast(float, normalization_end) + self.normalization_end_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4319,9 +4318,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DistalDetails'): - if self.normalizationEnd is not None and 'normalizationEnd' not in already_processed: - already_processed.add('normalizationEnd') - outfile.write(' normalizationEnd="%s"' % self.gds_format_double(self.normalizationEnd, input_name='normalizationEnd')) + if self.normalization_end is not None and 'normalization_end' not in already_processed: + already_processed.add('normalization_end') + outfile.write(' normalizationEnd="%s"' % self.gds_format_double(self.normalization_end, input_name='normalizationEnd')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DistalDetails', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4349,18 +4348,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Member(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segment=None, gds_collector_=None, **kwargs_): + def __init__(self, segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.segment = _cast(int, segment) - self.segment_nsprefix_ = None + self.segments = _cast(int, segments) + self.segments_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4410,9 +4409,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Member'): - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Member', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4430,10 +4429,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = self.gds_parse_integer(value, node, 'segment') - if self.segment < 0: + self.segments = self.gds_parse_integer(value, node, 'segment') + if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Member @@ -4442,18 +4441,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Include(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segmentGroup', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('segment_groups', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segmentGroup=None, gds_collector_=None, **kwargs_): + def __init__(self, segment_groups=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4506,9 +4505,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Include'): - if self.segmentGroup is not None and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment_groups is not None and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Include', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4526,8 +4525,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class Include @@ -4736,18 +4735,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SegmentEndPoint(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, segment=None, gds_collector_=None, **kwargs_): + def __init__(self, segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.segment = _cast(int, segment) - self.segment_nsprefix_ = None + self.segments = _cast(int, segments) + self.segments_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4797,9 +4796,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentEndPoint'): - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentEndPoint', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -4817,10 +4816,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = self.gds_parse_integer(value, node, 'segment') - if self.segment < 0: + self.segments = self.gds_parse_integer(value, node, 'segment') + if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SegmentEndPoint @@ -4829,87 +4828,87 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class MembraneProperties(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channelPopulation', 'ChannelPopulation', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelPopulation', 'type': 'ChannelPopulation'}, None), - MemberSpec_('channelDensity', 'ChannelDensity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensity', 'type': 'ChannelDensity'}, None), - MemberSpec_('channelDensityVShift', 'ChannelDensityVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityVShift', 'type': 'ChannelDensityVShift'}, None), - MemberSpec_('channelDensityNernst', 'ChannelDensityNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernst', 'type': 'ChannelDensityNernst'}, None), - MemberSpec_('channelDensityGHK', 'ChannelDensityGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK', 'type': 'ChannelDensityGHK'}, None), - MemberSpec_('channelDensityGHK2', 'ChannelDensityGHK2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK2', 'type': 'ChannelDensityGHK2'}, None), - MemberSpec_('channelDensityNonUniform', 'ChannelDensityNonUniform', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniform', 'type': 'ChannelDensityNonUniform'}, None), - MemberSpec_('channelDensityNonUniformNernst', 'ChannelDensityNonUniformNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformNernst', 'type': 'ChannelDensityNonUniformNernst'}, None), - MemberSpec_('channelDensityNonUniformGHK', 'ChannelDensityNonUniformGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformGHK', 'type': 'ChannelDensityNonUniformGHK'}, None), - MemberSpec_('spikeThresh', 'SpikeThresh', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeThresh', 'type': 'SpikeThresh'}, None), - MemberSpec_('specificCapacitance', 'SpecificCapacitance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'specificCapacitance', 'type': 'SpecificCapacitance'}, None), - MemberSpec_('initMembPotential', 'InitMembPotential', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'initMembPotential', 'type': 'InitMembPotential'}, None), + MemberSpec_('channel_populations', 'ChannelPopulation', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelPopulation', 'type': 'ChannelPopulation'}, None), + MemberSpec_('channel_densities', 'ChannelDensity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensity', 'type': 'ChannelDensity'}, None), + MemberSpec_('channel_density_v_shifts', 'ChannelDensityVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityVShift', 'type': 'ChannelDensityVShift'}, None), + MemberSpec_('channel_density_nernsts', 'ChannelDensityNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernst', 'type': 'ChannelDensityNernst'}, None), + MemberSpec_('channel_density_ghks', 'ChannelDensityGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK', 'type': 'ChannelDensityGHK'}, None), + MemberSpec_('channel_density_ghk2s', 'ChannelDensityGHK2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK2', 'type': 'ChannelDensityGHK2'}, None), + MemberSpec_('channel_density_non_uniforms', 'ChannelDensityNonUniform', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniform', 'type': 'ChannelDensityNonUniform'}, None), + MemberSpec_('channel_density_non_uniform_nernsts', 'ChannelDensityNonUniformNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformNernst', 'type': 'ChannelDensityNonUniformNernst'}, None), + MemberSpec_('channel_density_non_uniform_ghks', 'ChannelDensityNonUniformGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformGHK', 'type': 'ChannelDensityNonUniformGHK'}, None), + MemberSpec_('spike_threshes', 'SpikeThresh', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeThresh', 'type': 'SpikeThresh'}, None), + MemberSpec_('specific_capacitances', 'SpecificCapacitance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'specificCapacitance', 'type': 'SpecificCapacitance'}, None), + MemberSpec_('init_memb_potentials', 'InitMembPotential', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'initMembPotential', 'type': 'InitMembPotential'}, None), ] subclass = None superclass = None - def __init__(self, channelPopulation=None, channelDensity=None, channelDensityVShift=None, channelDensityNernst=None, channelDensityGHK=None, channelDensityGHK2=None, channelDensityNonUniform=None, channelDensityNonUniformNernst=None, channelDensityNonUniformGHK=None, spikeThresh=None, specificCapacitance=None, initMembPotential=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - if channelPopulation is None: - self.channelPopulation = [] - else: - self.channelPopulation = channelPopulation - self.channelPopulation_nsprefix_ = None - if channelDensity is None: - self.channelDensity = [] - else: - self.channelDensity = channelDensity - self.channelDensity_nsprefix_ = None - if channelDensityVShift is None: - self.channelDensityVShift = [] - else: - self.channelDensityVShift = channelDensityVShift - self.channelDensityVShift_nsprefix_ = None - if channelDensityNernst is None: - self.channelDensityNernst = [] - else: - self.channelDensityNernst = channelDensityNernst - self.channelDensityNernst_nsprefix_ = None - if channelDensityGHK is None: - self.channelDensityGHK = [] - else: - self.channelDensityGHK = channelDensityGHK - self.channelDensityGHK_nsprefix_ = None - if channelDensityGHK2 is None: - self.channelDensityGHK2 = [] - else: - self.channelDensityGHK2 = channelDensityGHK2 - self.channelDensityGHK2_nsprefix_ = None - if channelDensityNonUniform is None: - self.channelDensityNonUniform = [] - else: - self.channelDensityNonUniform = channelDensityNonUniform - self.channelDensityNonUniform_nsprefix_ = None - if channelDensityNonUniformNernst is None: - self.channelDensityNonUniformNernst = [] - else: - self.channelDensityNonUniformNernst = channelDensityNonUniformNernst - self.channelDensityNonUniformNernst_nsprefix_ = None - if channelDensityNonUniformGHK is None: - self.channelDensityNonUniformGHK = [] - else: - self.channelDensityNonUniformGHK = channelDensityNonUniformGHK - self.channelDensityNonUniformGHK_nsprefix_ = None - if spikeThresh is None: - self.spikeThresh = [] - else: - self.spikeThresh = spikeThresh - self.spikeThresh_nsprefix_ = None - if specificCapacitance is None: - self.specificCapacitance = [] - else: - self.specificCapacitance = specificCapacitance - self.specificCapacitance_nsprefix_ = None - if initMembPotential is None: - self.initMembPotential = [] - else: - self.initMembPotential = initMembPotential - self.initMembPotential_nsprefix_ = None + if channel_populations is None: + self.channel_populations = [] + else: + self.channel_populations = channel_populations + self.channel_populations_nsprefix_ = None + if channel_densities is None: + self.channel_densities = [] + else: + self.channel_densities = channel_densities + self.channel_densities_nsprefix_ = None + if channel_density_v_shifts is None: + self.channel_density_v_shifts = [] + else: + self.channel_density_v_shifts = channel_density_v_shifts + self.channel_density_v_shifts_nsprefix_ = None + if channel_density_nernsts is None: + self.channel_density_nernsts = [] + else: + self.channel_density_nernsts = channel_density_nernsts + self.channel_density_nernsts_nsprefix_ = None + if channel_density_ghks is None: + self.channel_density_ghks = [] + else: + self.channel_density_ghks = channel_density_ghks + self.channel_density_ghks_nsprefix_ = None + if channel_density_ghk2s is None: + self.channel_density_ghk2s = [] + else: + self.channel_density_ghk2s = channel_density_ghk2s + self.channel_density_ghk2s_nsprefix_ = None + if channel_density_non_uniforms is None: + self.channel_density_non_uniforms = [] + else: + self.channel_density_non_uniforms = channel_density_non_uniforms + self.channel_density_non_uniforms_nsprefix_ = None + if channel_density_non_uniform_nernsts is None: + self.channel_density_non_uniform_nernsts = [] + else: + self.channel_density_non_uniform_nernsts = channel_density_non_uniform_nernsts + self.channel_density_non_uniform_nernsts_nsprefix_ = None + if channel_density_non_uniform_ghks is None: + self.channel_density_non_uniform_ghks = [] + else: + self.channel_density_non_uniform_ghks = channel_density_non_uniform_ghks + self.channel_density_non_uniform_ghks_nsprefix_ = None + if spike_threshes is None: + self.spike_threshes = [] + else: + self.spike_threshes = spike_threshes + self.spike_threshes_nsprefix_ = None + if specific_capacitances is None: + self.specific_capacitances = [] + else: + self.specific_capacitances = specific_capacitances + self.specific_capacitances_nsprefix_ = None + if init_memb_potentials is None: + self.init_memb_potentials = [] + else: + self.init_memb_potentials = init_memb_potentials + self.init_memb_potentials_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -4924,18 +4923,18 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.channelPopulation or - self.channelDensity or - self.channelDensityVShift or - self.channelDensityNernst or - self.channelDensityGHK or - self.channelDensityGHK2 or - self.channelDensityNonUniform or - self.channelDensityNonUniformNernst or - self.channelDensityNonUniformGHK or - self.spikeThresh or - self.specificCapacitance or - self.initMembPotential + self.channel_populations or + self.channel_densities or + self.channel_density_v_shifts or + self.channel_density_nernsts or + self.channel_density_ghks or + self.channel_density_ghk2s or + self.channel_density_non_uniforms or + self.channel_density_non_uniform_nernsts or + self.channel_density_non_uniform_ghks or + self.spike_threshes or + self.specific_capacitances or + self.init_memb_potentials ): return True else: @@ -4978,41 +4977,41 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xm eol_ = '\n' else: eol_ = '' - for channelPopulation_ in self.channelPopulation: - namespaceprefix_ = self.channelPopulation_nsprefix_ + ':' if (UseCapturedNS_ and self.channelPopulation_nsprefix_) else '' + for channelPopulation_ in self.channel_populations: + namespaceprefix_ = self.channel_populations_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_populations_nsprefix_) else '' channelPopulation_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelPopulation', pretty_print=pretty_print) - for channelDensity_ in self.channelDensity: - namespaceprefix_ = self.channelDensity_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensity_nsprefix_) else '' + for channelDensity_ in self.channel_densities: + namespaceprefix_ = self.channel_densities_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_densities_nsprefix_) else '' channelDensity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensity', pretty_print=pretty_print) - for channelDensityVShift_ in self.channelDensityVShift: - namespaceprefix_ = self.channelDensityVShift_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityVShift_nsprefix_) else '' + for channelDensityVShift_ in self.channel_density_v_shifts: + namespaceprefix_ = self.channel_density_v_shifts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_v_shifts_nsprefix_) else '' channelDensityVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityVShift', pretty_print=pretty_print) - for channelDensityNernst_ in self.channelDensityNernst: - namespaceprefix_ = self.channelDensityNernst_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNernst_nsprefix_) else '' + for channelDensityNernst_ in self.channel_density_nernsts: + namespaceprefix_ = self.channel_density_nernsts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_nernsts_nsprefix_) else '' channelDensityNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernst', pretty_print=pretty_print) - for channelDensityGHK_ in self.channelDensityGHK: - namespaceprefix_ = self.channelDensityGHK_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityGHK_nsprefix_) else '' + for channelDensityGHK_ in self.channel_density_ghks: + namespaceprefix_ = self.channel_density_ghks_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_ghks_nsprefix_) else '' channelDensityGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK', pretty_print=pretty_print) - for channelDensityGHK2_ in self.channelDensityGHK2: - namespaceprefix_ = self.channelDensityGHK2_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityGHK2_nsprefix_) else '' + for channelDensityGHK2_ in self.channel_density_ghk2s: + namespaceprefix_ = self.channel_density_ghk2s_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_ghk2s_nsprefix_) else '' channelDensityGHK2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK2', pretty_print=pretty_print) - for channelDensityNonUniform_ in self.channelDensityNonUniform: - namespaceprefix_ = self.channelDensityNonUniform_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniform_nsprefix_) else '' + for channelDensityNonUniform_ in self.channel_density_non_uniforms: + namespaceprefix_ = self.channel_density_non_uniforms_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniforms_nsprefix_) else '' channelDensityNonUniform_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniform', pretty_print=pretty_print) - for channelDensityNonUniformNernst_ in self.channelDensityNonUniformNernst: - namespaceprefix_ = self.channelDensityNonUniformNernst_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniformNernst_nsprefix_) else '' + for channelDensityNonUniformNernst_ in self.channel_density_non_uniform_nernsts: + namespaceprefix_ = self.channel_density_non_uniform_nernsts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniform_nernsts_nsprefix_) else '' channelDensityNonUniformNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformNernst', pretty_print=pretty_print) - for channelDensityNonUniformGHK_ in self.channelDensityNonUniformGHK: - namespaceprefix_ = self.channelDensityNonUniformGHK_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNonUniformGHK_nsprefix_) else '' + for channelDensityNonUniformGHK_ in self.channel_density_non_uniform_ghks: + namespaceprefix_ = self.channel_density_non_uniform_ghks_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniform_ghks_nsprefix_) else '' channelDensityNonUniformGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformGHK', pretty_print=pretty_print) - for spikeThresh_ in self.spikeThresh: - namespaceprefix_ = self.spikeThresh_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeThresh_nsprefix_) else '' + for spikeThresh_ in self.spike_threshes: + namespaceprefix_ = self.spike_threshes_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_threshes_nsprefix_) else '' spikeThresh_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeThresh', pretty_print=pretty_print) - for specificCapacitance_ in self.specificCapacitance: - namespaceprefix_ = self.specificCapacitance_nsprefix_ + ':' if (UseCapturedNS_ and self.specificCapacitance_nsprefix_) else '' + for specificCapacitance_ in self.specific_capacitances: + namespaceprefix_ = self.specific_capacitances_nsprefix_ + ':' if (UseCapturedNS_ and self.specific_capacitances_nsprefix_) else '' specificCapacitance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='specificCapacitance', pretty_print=pretty_print) - for initMembPotential_ in self.initMembPotential: - namespaceprefix_ = self.initMembPotential_nsprefix_ + ':' if (UseCapturedNS_ and self.initMembPotential_nsprefix_) else '' + for initMembPotential_ in self.init_memb_potentials: + namespaceprefix_ = self.init_memb_potentials_nsprefix_ + ':' if (UseCapturedNS_ and self.init_memb_potentials_nsprefix_) else '' initMembPotential_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='initMembPotential', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -5034,64 +5033,64 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'channelPopulation': obj_ = ChannelPopulation.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelPopulation.append(obj_) + self.channel_populations.append(obj_) obj_.original_tagname_ = 'channelPopulation' elif nodeName_ == 'channelDensity': class_obj_ = self.get_class_obj_(child_, ChannelDensity) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensity.append(obj_) + self.channel_densities.append(obj_) obj_.original_tagname_ = 'channelDensity' elif nodeName_ == 'channelDensityVShift': obj_ = ChannelDensityVShift.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityVShift.append(obj_) + self.channel_density_v_shifts.append(obj_) obj_.original_tagname_ = 'channelDensityVShift' elif nodeName_ == 'channelDensityNernst': class_obj_ = self.get_class_obj_(child_, ChannelDensityNernst) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityNernst.append(obj_) + self.channel_density_nernsts.append(obj_) obj_.original_tagname_ = 'channelDensityNernst' elif nodeName_ == 'channelDensityGHK': obj_ = ChannelDensityGHK.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityGHK.append(obj_) + self.channel_density_ghks.append(obj_) obj_.original_tagname_ = 'channelDensityGHK' elif nodeName_ == 'channelDensityGHK2': obj_ = ChannelDensityGHK2.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityGHK2.append(obj_) + self.channel_density_ghk2s.append(obj_) obj_.original_tagname_ = 'channelDensityGHK2' elif nodeName_ == 'channelDensityNonUniform': obj_ = ChannelDensityNonUniform.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityNonUniform.append(obj_) + self.channel_density_non_uniforms.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniform' elif nodeName_ == 'channelDensityNonUniformNernst': obj_ = ChannelDensityNonUniformNernst.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityNonUniformNernst.append(obj_) + self.channel_density_non_uniform_nernsts.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformNernst' elif nodeName_ == 'channelDensityNonUniformGHK': obj_ = ChannelDensityNonUniformGHK.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityNonUniformGHK.append(obj_) + self.channel_density_non_uniform_ghks.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformGHK' elif nodeName_ == 'spikeThresh': obj_ = SpikeThresh.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeThresh.append(obj_) + self.spike_threshes.append(obj_) obj_.original_tagname_ = 'spikeThresh' elif nodeName_ == 'specificCapacitance': obj_ = SpecificCapacitance.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.specificCapacitance.append(obj_) + self.specific_capacitances.append(obj_) obj_.original_tagname_ = 'specificCapacitance' elif nodeName_ == 'initMembPotential': obj_ = InitMembPotential.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.initMembPotential.append(obj_) + self.init_memb_potentials.append(obj_) obj_.original_tagname_ = 'initMembPotential' # end class MembraneProperties @@ -5099,22 +5098,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class MembraneProperties2CaPools(MembraneProperties): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channelDensityNernstCa2', 'ChannelDensityNernstCa2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernstCa2', 'type': 'ChannelDensityNernstCa2'}, None), + MemberSpec_('channel_density_nernst_ca2s', 'ChannelDensityNernstCa2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernstCa2', 'type': 'ChannelDensityNernstCa2'}, None), ] subclass = None superclass = MembraneProperties - def __init__(self, channelPopulation=None, channelDensity=None, channelDensityVShift=None, channelDensityNernst=None, channelDensityGHK=None, channelDensityGHK2=None, channelDensityNonUniform=None, channelDensityNonUniformNernst=None, channelDensityNonUniformGHK=None, spikeThresh=None, specificCapacitance=None, initMembPotential=None, channelDensityNernstCa2=None, gds_collector_=None, **kwargs_): + def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, channel_density_nernst_ca2s=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(MembraneProperties2CaPools, self).__init__(channelPopulation, channelDensity, channelDensityVShift, channelDensityNernst, channelDensityGHK, channelDensityGHK2, channelDensityNonUniform, channelDensityNonUniformNernst, channelDensityNonUniformGHK, spikeThresh, specificCapacitance, initMembPotential, **kwargs_) - if channelDensityNernstCa2 is None: - self.channelDensityNernstCa2 = [] + super(MembraneProperties2CaPools, self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) + if channel_density_nernst_ca2s is None: + self.channel_density_nernst_ca2s = [] else: - self.channelDensityNernstCa2 = channelDensityNernstCa2 - self.channelDensityNernstCa2_nsprefix_ = None + self.channel_density_nernst_ca2s = channel_density_nernst_ca2s + self.channel_density_nernst_ca2s_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5128,7 +5127,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.channelDensityNernstCa2 or + self.channel_density_nernst_ca2s or super(MembraneProperties2CaPools, self).hasContent_() ): return True @@ -5165,8 +5164,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xm eol_ = '\n' else: eol_ = '' - for channelDensityNernstCa2_ in self.channelDensityNernstCa2: - namespaceprefix_ = self.channelDensityNernstCa2_nsprefix_ + ':' if (UseCapturedNS_ and self.channelDensityNernstCa2_nsprefix_) else '' + for channelDensityNernstCa2_ in self.channel_density_nernst_ca2s: + namespaceprefix_ = self.channel_density_nernst_ca2s_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_nernst_ca2s_nsprefix_) else '' channelDensityNernstCa2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernstCa2', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -5185,7 +5184,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'channelDensityNernstCa2': obj_ = ChannelDensityNernstCa2.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.channelDensityNernstCa2.append(obj_) + self.channel_density_nernst_ca2s.append(obj_) obj_.original_tagname_ = 'channelDensityNernstCa2' super(MembraneProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class MembraneProperties2CaPools @@ -5195,12 +5194,12 @@ class ValueAcrossSegOrSegGroup(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('value', 'Nml2Quantity', 0, 1, {'use': 'optional'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, value=None, segmentGroup='all', segment=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -5208,10 +5207,10 @@ def __init__(self, value=None, segmentGroup='all', segment=None, extensiontype_= self.ns_prefix_ = None self.value = _cast(None, value) self.value_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(None, segment) - self.segment_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(None, segments) + self.segments_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -5279,12 +5278,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.value is not None and 'value' not in already_processed: already_processed.add('value') outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -5315,13 +5314,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = value - self.validate_NmlId(self.segment) # validate type NmlId + self.segments = value + self.validate_NmlId(self.segments) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -5335,12 +5334,12 @@ class VariableParameter(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('parameter', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('segmentGroup', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('inhomogeneousValue', 'InhomogeneousValue', 0, 1, {'minOccurs': '0', 'name': 'inhomogeneousValue', 'type': 'InhomogeneousValue'}, None), + MemberSpec_('segment_groups', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('inhomogeneous_value', 'InhomogeneousValue', 0, 1, {'minOccurs': '0', 'name': 'inhomogeneousValue', 'type': 'InhomogeneousValue'}, None), ] subclass = None superclass = None - def __init__(self, parameter=None, segmentGroup=None, inhomogeneousValue=None, gds_collector_=None, **kwargs_): + def __init__(self, parameter=None, segment_groups=None, inhomogeneous_value=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -5348,10 +5347,10 @@ def __init__(self, parameter=None, segmentGroup=None, inhomogeneousValue=None, g self.ns_prefix_ = None self.parameter = _cast(None, parameter) self.parameter_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.inhomogeneousValue = inhomogeneousValue - self.inhomogeneousValue_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.inhomogeneous_value = inhomogeneous_value + self.inhomogeneous_value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5365,7 +5364,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.inhomogeneousValue is not None + self.inhomogeneous_value is not None ): return True else: @@ -5397,17 +5396,17 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.parameter is not None and 'parameter' not in already_processed: already_processed.add('parameter') outfile.write(' parameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.parameter), input_name='parameter')), )) - if self.segmentGroup is not None and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) + if self.segment_groups is not None and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='VariableParameter', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' - if self.inhomogeneousValue is not None: - namespaceprefix_ = self.inhomogeneousValue_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneousValue_nsprefix_) else '' - self.inhomogeneousValue.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousValue', pretty_print=pretty_print) + if self.inhomogeneous_value is not None: + namespaceprefix_ = self.inhomogeneous_value_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneous_value_nsprefix_) else '' + self.inhomogeneous_value.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousValue', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -5427,12 +5426,12 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value + self.segment_groups = value def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'inhomogeneousValue': obj_ = InhomogeneousValue.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.inhomogeneousValue = obj_ + self.inhomogeneous_value = obj_ obj_.original_tagname_ = 'inhomogeneousValue' # end class VariableParameter @@ -5440,19 +5439,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class InhomogeneousValue(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('inhomogeneousParameter', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('inhomogeneous_parameters', 'xs:string', 0, 0, {'use': 'required'}), MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = None - def __init__(self, inhomogeneousParameter=None, value=None, gds_collector_=None, **kwargs_): + def __init__(self, inhomogeneous_parameters=None, value=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.inhomogeneousParameter = _cast(None, inhomogeneousParameter) - self.inhomogeneousParameter_nsprefix_ = None + self.inhomogeneous_parameters = _cast(None, inhomogeneous_parameters) + self.inhomogeneous_parameters_nsprefix_ = None self.value = _cast(None, value) self.value_nsprefix_ = None def factory(*args_, **kwargs_): @@ -5496,9 +5495,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InhomogeneousValue'): - if self.inhomogeneousParameter is not None and 'inhomogeneousParameter' not in already_processed: - already_processed.add('inhomogeneousParameter') - outfile.write(' inhomogeneousParameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inhomogeneousParameter), input_name='inhomogeneousParameter')), )) + if self.inhomogeneous_parameters is not None and 'inhomogeneous_parameters' not in already_processed: + already_processed.add('inhomogeneous_parameters') + outfile.write(' inhomogeneousParameter=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inhomogeneous_parameters), input_name='inhomogeneousParameter')), )) if self.value is not None and 'value' not in already_processed: already_processed.add('value') outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) @@ -5519,7 +5518,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('inhomogeneousParameter', node) if value is not None and 'inhomogeneousParameter' not in already_processed: already_processed.add('inhomogeneousParameter') - self.inhomogeneousParameter = value + self.inhomogeneous_parameters = value value = find_attr_value_('value', node) if value is not None and 'value' not in already_processed: already_processed.add('value') @@ -5536,30 +5535,30 @@ class Species(ValueAcrossSegOrSegGroup): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('id', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('concentrationModel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('concentration_model', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('ion', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('initialConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('initialExtConcentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('initial_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('initial_ext_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segmentGroup='all', segment=None, id=None, concentrationModel=None, ion=None, initialConcentration=None, initialExtConcentration=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, id=None, concentration_model=None, ion=None, initial_concentration=None, initial_ext_concentration=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Species, self).__init__(value, segmentGroup, segment, **kwargs_) + super(Species, self).__init__(value, segment_groups, segments, **kwargs_) self.id = _cast(None, id) self.id_nsprefix_ = None - self.concentrationModel = _cast(None, concentrationModel) - self.concentrationModel_nsprefix_ = None + self.concentration_model = _cast(None, concentration_model) + self.concentration_model_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - self.initialConcentration = _cast(None, initialConcentration) - self.initialConcentration_nsprefix_ = None - self.initialExtConcentration = _cast(None, initialExtConcentration) - self.initialExtConcentration_nsprefix_ = None + self.initial_concentration = _cast(None, initial_concentration) + self.initial_concentration_nsprefix_ = None + self.initial_ext_concentration = _cast(None, initial_ext_concentration) + self.initial_ext_concentration_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5627,18 +5626,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.id is not None and 'id' not in already_processed: already_processed.add('id') outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), )) - if self.concentrationModel is not None and 'concentrationModel' not in already_processed: - already_processed.add('concentrationModel') - outfile.write(' concentrationModel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.concentrationModel), input_name='concentrationModel')), )) + if self.concentration_model is not None and 'concentration_model' not in already_processed: + already_processed.add('concentration_model') + outfile.write(' concentrationModel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.concentration_model), input_name='concentrationModel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) - if self.initialConcentration is not None and 'initialConcentration' not in already_processed: - already_processed.add('initialConcentration') - outfile.write(' initialConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initialConcentration), input_name='initialConcentration')), )) - if self.initialExtConcentration is not None and 'initialExtConcentration' not in already_processed: - already_processed.add('initialExtConcentration') - outfile.write(' initialExtConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initialExtConcentration), input_name='initialExtConcentration')), )) + if self.initial_concentration is not None and 'initial_concentration' not in already_processed: + already_processed.add('initial_concentration') + outfile.write(' initialConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initial_concentration), input_name='initialConcentration')), )) + if self.initial_ext_concentration is not None and 'initial_ext_concentration' not in already_processed: + already_processed.add('initial_ext_concentration') + outfile.write(' initialExtConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initial_ext_concentration), input_name='initialExtConcentration')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Species', fromsubclass_=False, pretty_print=True): super(Species, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) pass @@ -5662,8 +5661,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('concentrationModel', node) if value is not None and 'concentrationModel' not in already_processed: already_processed.add('concentrationModel') - self.concentrationModel = value - self.validate_NmlId(self.concentrationModel) # validate type NmlId + self.concentration_model = value + self.validate_NmlId(self.concentration_model) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -5672,13 +5671,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('initialConcentration', node) if value is not None and 'initialConcentration' not in already_processed: already_processed.add('initialConcentration') - self.initialConcentration = value - self.validate_Nml2Quantity_concentration(self.initialConcentration) # validate type Nml2Quantity_concentration + self.initial_concentration = value + self.validate_Nml2Quantity_concentration(self.initial_concentration) # validate type Nml2Quantity_concentration value = find_attr_value_('initialExtConcentration', node) if value is not None and 'initialExtConcentration' not in already_processed: already_processed.add('initialExtConcentration') - self.initialExtConcentration = value - self.validate_Nml2Quantity_concentration(self.initialExtConcentration) # validate type Nml2Quantity_concentration + self.initial_ext_concentration = value + self.validate_Nml2Quantity_concentration(self.initial_ext_concentration) # validate type Nml2Quantity_concentration super(Species, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(Species, self).buildChildren(child_, node, nodeName_, True) @@ -5690,11 +5689,11 @@ class IntracellularProperties(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), - MemberSpec_('resistivity', 'Resistivity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'resistivity', 'type': 'Resistivity'}, None), + MemberSpec_('resistivities', 'Resistivity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'resistivity', 'type': 'Resistivity'}, None), ] subclass = None superclass = None - def __init__(self, species=None, resistivity=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, species=None, resistivities=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -5705,11 +5704,11 @@ def __init__(self, species=None, resistivity=None, extensiontype_=None, gds_coll else: self.species = species self.species_nsprefix_ = None - if resistivity is None: - self.resistivity = [] + if resistivities is None: + self.resistivities = [] else: - self.resistivity = resistivity - self.resistivity_nsprefix_ = None + self.resistivities = resistivities + self.resistivities_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -5725,7 +5724,7 @@ def factory(*args_, **kwargs_): def hasContent_(self): if ( self.species or - self.resistivity + self.resistivities ): return True else: @@ -5771,8 +5770,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xm for species_ in self.species: namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - for resistivity_ in self.resistivity: - namespaceprefix_ = self.resistivity_nsprefix_ + ':' if (UseCapturedNS_ and self.resistivity_nsprefix_) else '' + for resistivity_ in self.resistivities: + namespaceprefix_ = self.resistivities_nsprefix_ + ':' if (UseCapturedNS_ and self.resistivities_nsprefix_) else '' resistivity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='resistivity', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -5799,7 +5798,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'resistivity': obj_ = Resistivity.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.resistivity.append(obj_) + self.resistivities.append(obj_) obj_.original_tagname_ = 'resistivity' # end class IntracellularProperties @@ -5810,13 +5809,13 @@ class IntracellularProperties2CaPools(IntracellularProperties): ] subclass = None superclass = IntracellularProperties - def __init__(self, species=None, resistivity=None, gds_collector_=None, **kwargs_): + def __init__(self, species=None, resistivities=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IntracellularProperties2CaPools, self).__init__(species, resistivity, **kwargs_) + super(IntracellularProperties2CaPools, self).__init__(species, resistivities, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5975,33 +5974,33 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpaceStructure(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('xSpacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('ySpacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('zSpacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('xStart', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('yStart', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('zStart', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('x_spacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('y_spacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('z_spacing', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('x_start', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('y_start', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('z_start', 'xs:float', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, xSpacing=None, ySpacing=None, zSpacing=None, xStart=0, yStart=0, zStart=0, gds_collector_=None, **kwargs_): + def __init__(self, x_spacing=None, y_spacing=None, z_spacing=None, x_start=0, y_start=0, z_start=0, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.xSpacing = _cast(float, xSpacing) - self.xSpacing_nsprefix_ = None - self.ySpacing = _cast(float, ySpacing) - self.ySpacing_nsprefix_ = None - self.zSpacing = _cast(float, zSpacing) - self.zSpacing_nsprefix_ = None - self.xStart = _cast(float, xStart) - self.xStart_nsprefix_ = None - self.yStart = _cast(float, yStart) - self.yStart_nsprefix_ = None - self.zStart = _cast(float, zStart) - self.zStart_nsprefix_ = None + self.x_spacing = _cast(float, x_spacing) + self.x_spacing_nsprefix_ = None + self.y_spacing = _cast(float, y_spacing) + self.y_spacing_nsprefix_ = None + self.z_spacing = _cast(float, z_spacing) + self.z_spacing_nsprefix_ = None + self.x_start = _cast(float, x_start) + self.x_start_nsprefix_ = None + self.y_start = _cast(float, y_start) + self.y_start_nsprefix_ = None + self.z_start = _cast(float, z_start) + self.z_start_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6043,24 +6042,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpaceStructure'): - if self.xSpacing is not None and 'xSpacing' not in already_processed: - already_processed.add('xSpacing') - outfile.write(' xSpacing="%s"' % self.gds_format_float(self.xSpacing, input_name='xSpacing')) - if self.ySpacing is not None and 'ySpacing' not in already_processed: - already_processed.add('ySpacing') - outfile.write(' ySpacing="%s"' % self.gds_format_float(self.ySpacing, input_name='ySpacing')) - if self.zSpacing is not None and 'zSpacing' not in already_processed: - already_processed.add('zSpacing') - outfile.write(' zSpacing="%s"' % self.gds_format_float(self.zSpacing, input_name='zSpacing')) - if self.xStart != 0 and 'xStart' not in already_processed: - already_processed.add('xStart') - outfile.write(' xStart="%s"' % self.gds_format_float(self.xStart, input_name='xStart')) - if self.yStart != 0 and 'yStart' not in already_processed: - already_processed.add('yStart') - outfile.write(' yStart="%s"' % self.gds_format_float(self.yStart, input_name='yStart')) - if self.zStart != 0 and 'zStart' not in already_processed: - already_processed.add('zStart') - outfile.write(' zStart="%s"' % self.gds_format_float(self.zStart, input_name='zStart')) + if self.x_spacing is not None and 'x_spacing' not in already_processed: + already_processed.add('x_spacing') + outfile.write(' xSpacing="%s"' % self.gds_format_float(self.x_spacing, input_name='xSpacing')) + if self.y_spacing is not None and 'y_spacing' not in already_processed: + already_processed.add('y_spacing') + outfile.write(' ySpacing="%s"' % self.gds_format_float(self.y_spacing, input_name='ySpacing')) + if self.z_spacing is not None and 'z_spacing' not in already_processed: + already_processed.add('z_spacing') + outfile.write(' zSpacing="%s"' % self.gds_format_float(self.z_spacing, input_name='zSpacing')) + if self.x_start != 0 and 'x_start' not in already_processed: + already_processed.add('x_start') + outfile.write(' xStart="%s"' % self.gds_format_float(self.x_start, input_name='xStart')) + if self.y_start != 0 and 'y_start' not in already_processed: + already_processed.add('y_start') + outfile.write(' yStart="%s"' % self.gds_format_float(self.y_start, input_name='yStart')) + if self.z_start != 0 and 'z_start' not in already_processed: + already_processed.add('z_start') + outfile.write(' zStart="%s"' % self.gds_format_float(self.z_start, input_name='zStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpaceStructure', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -6113,21 +6112,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Layout(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('space', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('spaces', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('random', 'RandomLayout', 0, 0, {'name': 'random', 'type': 'RandomLayout'}, 5), MemberSpec_('grid', 'GridLayout', 0, 0, {'name': 'grid', 'type': 'GridLayout'}, 5), MemberSpec_('unstructured', 'UnstructuredLayout', 0, 0, {'name': 'unstructured', 'type': 'UnstructuredLayout'}, 5), ] subclass = None superclass = None - def __init__(self, space=None, random=None, grid=None, unstructured=None, gds_collector_=None, **kwargs_): + def __init__(self, spaces=None, random=None, grid=None, unstructured=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.space = _cast(None, space) - self.space_nsprefix_ = None + self.spaces = _cast(None, spaces) + self.spaces_nsprefix_ = None self.random = random self.random_nsprefix_ = None self.grid = grid @@ -6189,9 +6188,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Layout'): - if self.space is not None and 'space' not in already_processed: - already_processed.add('space') - outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.space), input_name='space')), )) + if self.spaces is not None and 'spaces' not in already_processed: + already_processed.add('spaces') + outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spaces), input_name='space')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Layout', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' @@ -6221,8 +6220,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) if value is not None and 'space' not in already_processed: already_processed.add('space') - self.space = value - self.validate_NmlId(self.space) # validate type NmlId + self.spaces = value + self.validate_NmlId(self.spaces) # validate type NmlId def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'random': obj_ = RandomLayout.factory(parent_object_=self) @@ -6330,11 +6329,11 @@ class RandomLayout(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('number', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('region', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('regions', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, number=None, region=None, gds_collector_=None, **kwargs_): + def __init__(self, number=None, regions=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -6342,8 +6341,8 @@ def __init__(self, number=None, region=None, gds_collector_=None, **kwargs_): self.ns_prefix_ = None self.number = _cast(int, number) self.number_nsprefix_ = None - self.region = _cast(None, region) - self.region_nsprefix_ = None + self.regions = _cast(None, regions) + self.regions_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6399,9 +6398,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.number is not None and 'number' not in already_processed: already_processed.add('number') outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) - if self.region is not None and 'region' not in already_processed: - already_processed.add('region') - outfile.write(' region=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.region), input_name='region')), )) + if self.regions is not None and 'regions' not in already_processed: + already_processed.add('regions') + outfile.write(' region=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.regions), input_name='region')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RandomLayout', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -6425,8 +6424,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('region', node) if value is not None and 'region' not in already_processed: already_processed.add('region') - self.region = value - self.validate_NmlId(self.region) # validate type NmlId + self.regions = value + self.validate_NmlId(self.regions) # validate type NmlId def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class RandomLayout @@ -6435,24 +6434,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GridLayout(GeneratedsSuper): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('xSize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('ySize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('zSize', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('x_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('y_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('z_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, xSize=None, ySize=None, zSize=None, gds_collector_=None, **kwargs_): + def __init__(self, x_size=None, y_size=None, z_size=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.xSize = _cast(int, xSize) - self.xSize_nsprefix_ = None - self.ySize = _cast(int, ySize) - self.ySize_nsprefix_ = None - self.zSize = _cast(int, zSize) - self.zSize_nsprefix_ = None + self.x_size = _cast(int, x_size) + self.x_size_nsprefix_ = None + self.y_size = _cast(int, y_size) + self.y_size_nsprefix_ = None + self.z_size = _cast(int, z_size) + self.z_size_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6494,15 +6493,15 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='GridLayout'): - if self.xSize is not None and 'xSize' not in already_processed: - already_processed.add('xSize') - outfile.write(' xSize="%s"' % self.gds_format_integer(self.xSize, input_name='xSize')) - if self.ySize is not None and 'ySize' not in already_processed: - already_processed.add('ySize') - outfile.write(' ySize="%s"' % self.gds_format_integer(self.ySize, input_name='ySize')) - if self.zSize is not None and 'zSize' not in already_processed: - already_processed.add('zSize') - outfile.write(' zSize="%s"' % self.gds_format_integer(self.zSize, input_name='zSize')) + if self.x_size is not None and 'x_size' not in already_processed: + already_processed.add('x_size') + outfile.write(' xSize="%s"' % self.gds_format_integer(self.x_size, input_name='xSize')) + if self.y_size is not None and 'y_size' not in already_processed: + already_processed.add('y_size') + outfile.write(' ySize="%s"' % self.gds_format_integer(self.y_size, input_name='ySize')) + if self.z_size is not None and 'z_size' not in already_processed: + already_processed.add('z_size') + outfile.write(' zSize="%s"' % self.gds_format_integer(self.z_size, input_name='zSize')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GridLayout', fromsubclass_=False, pretty_print=True): pass def build(self, node, gds_collector_=None): @@ -6520,20 +6519,20 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xSize', node) if value is not None and 'xSize' not in already_processed: already_processed.add('xSize') - self.xSize = self.gds_parse_integer(value, node, 'xSize') - if self.xSize < 0: + self.x_size = self.gds_parse_integer(value, node, 'xSize') + if self.x_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('ySize', node) if value is not None and 'ySize' not in already_processed: already_processed.add('ySize') - self.ySize = self.gds_parse_integer(value, node, 'ySize') - if self.ySize < 0: + self.y_size = self.gds_parse_integer(value, node, 'ySize') + if self.y_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('zSize', node) if value is not None and 'zSize' not in already_processed: already_processed.add('zSize') - self.zSize = self.gds_parse_integer(value, node, 'zSize') - if self.zSize < 0: + self.z_size = self.gds_parse_integer(value, node, 'zSize') + if self.z_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass @@ -7109,12 +7108,12 @@ class Input(GeneratedsSuper): MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': 'required'}), MemberSpec_('target', 'xs:string', 0, 0, {'use': 'required'}), MemberSpec_('destination', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('segmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('fractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, id=None, target=None, destination=None, segmentId=None, fractionAlong=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None @@ -7126,10 +7125,10 @@ def __init__(self, id=None, target=None, destination=None, segmentId=None, fract self.target_nsprefix_ = None self.destination = _cast(None, destination) self.destination_nsprefix_ = None - self.segmentId = _cast(int, segmentId) - self.segmentId_nsprefix_ = None - self.fractionAlong = _cast(float, fractionAlong) - self.fractionAlong_nsprefix_ = None + self.segment_id = _cast(int, segment_id) + self.segment_id_nsprefix_ = None + self.fraction_along = _cast(float, fraction_along) + self.fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -7215,12 +7214,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.destination is not None and 'destination' not in already_processed: already_processed.add('destination') outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) - if self.segmentId is not None and 'segmentId' not in already_processed: - already_processed.add('segmentId') - outfile.write(' segmentId="%s"' % self.gds_format_integer(self.segmentId, input_name='segmentId')) - if self.fractionAlong is not None and 'fractionAlong' not in already_processed: - already_processed.add('fractionAlong') - outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fractionAlong, input_name='fractionAlong')) + if self.segment_id is not None and 'segment_id' not in already_processed: + already_processed.add('segment_id') + outfile.write(' segmentId="%s"' % self.gds_format_integer(self.segment_id, input_name='segmentId')) + if self.fraction_along is not None and 'fraction_along' not in already_processed: + already_processed.add('fraction_along') + outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fraction_along, input_name='fractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -7262,16 +7261,16 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentId', node) if value is not None and 'segmentId' not in already_processed: already_processed.add('segmentId') - self.segmentId = self.gds_parse_integer(value, node, 'segmentId') - if self.segmentId < 0: + self.segment_id = self.gds_parse_integer(value, node, 'segmentId') + if self.segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segmentId) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segment_id) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') value = self.gds_parse_float(value, node, 'fractionAlong') self.fractionAlong = value - self.validate_ZeroToOne(self.fractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -7313,13 +7312,13 @@ class InputW(Input): ] subclass = None superclass = Input - def __init__(self, id=None, target=None, destination=None, segmentId=None, fractionAlong=None, weight=None, gds_collector_=None, **kwargs_): + def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, weight=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InputW, self).__init__(id, target, destination, segmentId, fractionAlong, **kwargs_) + super(InputW, self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -7409,18 +7408,18 @@ class BaseWithoutId(GeneratedsSuper): Segment needs nonNegativeInteger).""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('neuroLexId', 'NeuroLexId', 0, 1, {'use': 'optional'}), + MemberSpec_('neuro_lex_id', 'NeuroLexId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, neuroLexId=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - self.neuroLexId = _cast(None, neuroLexId) - self.neuroLexId_nsprefix_ = None + self.neuro_lex_id = _cast(None, neuro_lex_id) + self.neuro_lex_id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -7474,9 +7473,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseWithoutId'): - if self.neuroLexId is not None and 'neuroLexId' not in already_processed: - already_processed.add('neuroLexId') - outfile.write(' neuroLexId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.neuroLexId), input_name='neuroLexId')), )) + if self.neuro_lex_id is not None and 'neuro_lex_id' not in already_processed: + already_processed.add('neuro_lex_id') + outfile.write(' neuroLexId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.neuro_lex_id), input_name='neuroLexId')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -7502,8 +7501,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('neuroLexId', node) if value is not None and 'neuroLexId' not in already_processed: already_processed.add('neuroLexId') - self.neuroLexId = value - self.validate_NeuroLexId(self.neuroLexId) # validate type NeuroLexId + self.neuro_lex_id = value + self.validate_NeuroLexId(self.neuro_lex_id) # validate type NeuroLexId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -7522,13 +7521,13 @@ class BaseNonNegativeIntegerId(BaseWithoutId): ] subclass = None superclass = BaseWithoutId - def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseNonNegativeIntegerId, self).__init__(neuroLexId, extensiontype_, **kwargs_) + super(BaseNonNegativeIntegerId, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(int, id) self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -7635,13 +7634,13 @@ class Base(BaseWithoutId): ] subclass = None superclass = BaseWithoutId - def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Base, self).__init__(neuroLexId, extensiontype_, **kwargs_) + super(Base, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(None, id) self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -7747,28 +7746,28 @@ class Standalone(Base): member_data_items_ = [ MemberSpec_('metaid', 'MetaId', 0, 1, {'use': 'optional'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), + MemberSpec_('properties', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Standalone, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + super(Standalone, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.metaid = _cast(None, metaid) self.metaid_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - if property is None: - self.property = [] + if properties is None: + self.properties = [] else: - self.property = property - self.property_nsprefix_ = None + self.properties = properties + self.properties_nsprefix_ = None self.annotation = annotation self.annotation_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -7807,7 +7806,7 @@ def validate_MetaId(self, value): def hasContent_(self): if ( self.notes is not None or - self.property or + self.properties or self.annotation is not None or super(Standalone, self).hasContent_() ): @@ -7860,8 +7859,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xm namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - for property_ in self.property: - namespaceprefix_ = self.property_nsprefix_ + ':' if (UseCapturedNS_ and self.property_nsprefix_) else '' + for property_ in self.properties: + namespaceprefix_ = self.properties_nsprefix_ + ':' if (UseCapturedNS_ and self.properties_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' @@ -7900,7 +7899,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.property.append(obj_) + self.properties.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) @@ -7920,13 +7919,13 @@ class SpikeSourcePoisson(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, start=None, duration=None, rate=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, start=None, duration=None, rate=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeSourcePoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(SpikeSourcePoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.start = _cast(None, start) self.start_nsprefix_ = None self.duration = _cast(None, duration) @@ -8048,22 +8047,22 @@ class InputList(Base): specified component.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('population', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('populations', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('input', 'Input', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'input', 'type': 'Input'}, None), - MemberSpec_('inputW', 'InputW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputW', 'type': 'InputW'}, None), + MemberSpec_('input_ws', 'InputW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputW', 'type': 'InputW'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, population=None, component=None, input=None, inputW=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, populations=None, component=None, input=None, input_ws=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InputList, self).__init__(neuroLexId, id, **kwargs_) - self.population = _cast(None, population) - self.population_nsprefix_ = None + super(InputList, self).__init__(neuro_lex_id, id, **kwargs_) + self.populations = _cast(None, populations) + self.populations_nsprefix_ = None self.component = _cast(None, component) self.component_nsprefix_ = None if input is None: @@ -8071,11 +8070,11 @@ def __init__(self, neuroLexId=None, id=None, population=None, component=None, in else: self.input = input self.input_nsprefix_ = None - if inputW is None: - self.inputW = [] + if input_ws is None: + self.input_ws = [] else: - self.inputW = inputW - self.inputW_nsprefix_ = None + self.input_ws = input_ws + self.input_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8101,7 +8100,7 @@ def validate_NmlId(self, value): def hasContent_(self): if ( self.input or - self.inputW or + self.input_ws or super(InputList, self).hasContent_() ): return True @@ -8132,9 +8131,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InputList'): super(InputList, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InputList') - if self.population is not None and 'population' not in already_processed: - already_processed.add('population') - outfile.write(' population=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.population), input_name='population')), )) + if self.populations is not None and 'populations' not in already_processed: + already_processed.add('populations') + outfile.write(' population=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.populations), input_name='population')), )) if self.component is not None and 'component' not in already_processed: already_processed.add('component') outfile.write(' component=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.component), input_name='component')), )) @@ -8147,8 +8146,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', for input_ in self.input: namespaceprefix_ = self.input_nsprefix_ + ':' if (UseCapturedNS_ and self.input_nsprefix_) else '' input_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='input', pretty_print=pretty_print) - for inputW_ in self.inputW: - namespaceprefix_ = self.inputW_nsprefix_ + ':' if (UseCapturedNS_ and self.inputW_nsprefix_) else '' + for inputW_ in self.input_ws: + namespaceprefix_ = self.input_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.input_ws_nsprefix_) else '' inputW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputW', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -8165,8 +8164,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('population', node) if value is not None and 'population' not in already_processed: already_processed.add('population') - self.population = value - self.validate_NmlId(self.population) # validate type NmlId + self.populations = value + self.validate_NmlId(self.populations) # validate type NmlId value = find_attr_value_('component', node) if value is not None and 'component' not in already_processed: already_processed.add('component') @@ -8183,7 +8182,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'inputW': obj_ = InputW.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.inputW.append(obj_) + self.input_ws.append(obj_) obj_.original_tagname_ = 'inputW' super(InputList, self).buildChildren(child_, node, nodeName_, True) @@ -8253,13 +8252,13 @@ class BaseConnection(BaseNonNegativeIntegerId): ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuroLexId=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnection, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) + super(BaseConnection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8342,22 +8341,22 @@ class BaseProjection(Base): populations""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('presynapticPopulation', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('postsynapticPopulation', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('presynaptic_population', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('postsynaptic_population', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseProjection, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) - self.presynapticPopulation = _cast(None, presynapticPopulation) - self.presynapticPopulation_nsprefix_ = None - self.postsynapticPopulation = _cast(None, postsynapticPopulation) - self.postsynapticPopulation_nsprefix_ = None + super(BaseProjection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.presynaptic_population = _cast(None, presynaptic_population) + self.presynaptic_population_nsprefix_ = None + self.postsynaptic_population = _cast(None, postsynaptic_population) + self.postsynaptic_population_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8412,12 +8411,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseProjection'): super(BaseProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseProjection') - if self.presynapticPopulation is not None and 'presynapticPopulation' not in already_processed: - already_processed.add('presynapticPopulation') - outfile.write(' presynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.presynapticPopulation), input_name='presynapticPopulation')), )) - if self.postsynapticPopulation is not None and 'postsynapticPopulation' not in already_processed: - already_processed.add('postsynapticPopulation') - outfile.write(' postsynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postsynapticPopulation), input_name='postsynapticPopulation')), )) + if self.presynaptic_population is not None and 'presynaptic_population' not in already_processed: + already_processed.add('presynaptic_population') + outfile.write(' presynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.presynaptic_population), input_name='presynapticPopulation')), )) + if self.postsynaptic_population is not None and 'postsynaptic_population' not in already_processed: + already_processed.add('postsynaptic_population') + outfile.write(' postsynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postsynaptic_population), input_name='postsynapticPopulation')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -8444,13 +8443,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('presynapticPopulation', node) if value is not None and 'presynapticPopulation' not in already_processed: already_processed.add('presynapticPopulation') - self.presynapticPopulation = value - self.validate_NmlId(self.presynapticPopulation) # validate type NmlId + self.presynaptic_population = value + self.validate_NmlId(self.presynaptic_population) # validate type NmlId value = find_attr_value_('postsynapticPopulation', node) if value is not None and 'postsynapticPopulation' not in already_processed: already_processed.add('postsynapticPopulation') - self.postsynapticPopulation = value - self.validate_NmlId(self.postsynapticPopulation) # validate type NmlId + self.postsynaptic_population = value + self.validate_NmlId(self.postsynaptic_population) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -8470,13 +8469,13 @@ class CellSet(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, select=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, select=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CellSet, self).__init__(neuroLexId, id, **kwargs_) + super(CellSet, self).__init__(neuro_lex_id, id, **kwargs_) self.select = _cast(None, select) self.select_nsprefix_ = None if anytypeobjs_ is None: @@ -8567,35 +8566,35 @@ class Population(Standalone): member_data_items_ = [ MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('size', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('type_', 'populationTypes', 0, 1, {'use': 'optional'}), - MemberSpec_('extracellularProperties', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'populationTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('extracellular_properties', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('layout', 'Layout', 0, 1, {'minOccurs': '0', 'name': 'layout', 'type': 'Layout'}, 4), - MemberSpec_('instance', 'Instance', 1, 0, {'maxOccurs': 'unbounded', 'name': 'instance', 'type': 'Instance'}, 4), + MemberSpec_('instances', 'Instance', 1, 0, {'maxOccurs': 'unbounded', 'name': 'instance', 'type': 'Instance'}, 4), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, component=None, size=None, type_=None, extracellularProperties=None, layout=None, instance=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, component=None, size=None, type=None, extracellular_properties=None, layout=None, instances=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Population, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(Population, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.component = _cast(None, component) self.component_nsprefix_ = None self.size = _cast(int, size) self.size_nsprefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None - self.extracellularProperties = _cast(None, extracellularProperties) - self.extracellularProperties_nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None + self.extracellular_properties = _cast(None, extracellular_properties) + self.extracellular_properties_nsprefix_ = None self.layout = layout self.layout_nsprefix_ = None - if instance is None: - self.instance = [] + if instances is None: + self.instances = [] else: - self.instance = instance - self.instance_nsprefix_ = None + self.instances = instances + self.instances_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8642,7 +8641,7 @@ def validate_populationTypes(self, value): def hasContent_(self): if ( self.layout is not None or - self.instance or + self.instances or super(Population, self).hasContent_() ): return True @@ -8679,12 +8678,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.size is not None and 'size' not in already_processed: already_processed.add('size') outfile.write(' size="%s"' % self.gds_format_integer(self.size, input_name='size')) - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) - if self.extracellularProperties is not None and 'extracellularProperties' not in already_processed: - already_processed.add('extracellularProperties') - outfile.write(' extracellularProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.extracellularProperties), input_name='extracellularProperties')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + if self.extracellular_properties is not None and 'extracellular_properties' not in already_processed: + already_processed.add('extracellular_properties') + outfile.write(' extracellularProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.extracellular_properties), input_name='extracellularProperties')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Population', fromsubclass_=False, pretty_print=True): super(Population, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -8694,8 +8693,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', if self.layout is not None: namespaceprefix_ = self.layout_nsprefix_ + ':' if (UseCapturedNS_ and self.layout_nsprefix_) else '' self.layout.export(outfile, level, namespaceprefix_, namespacedef_='', name_='layout', pretty_print=pretty_print) - for instance_ in self.instance: - namespaceprefix_ = self.instance_nsprefix_ + ':' if (UseCapturedNS_ and self.instance_nsprefix_) else '' + for instance_ in self.instances: + namespaceprefix_ = self.instances_nsprefix_ + ':' if (UseCapturedNS_ and self.instances_nsprefix_) else '' instance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='instance', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -8724,13 +8723,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_populationTypes(self.type_) # validate type populationTypes + self.type = value + self.validate_populationTypes(self.type) # validate type populationTypes value = find_attr_value_('extracellularProperties', node) if value is not None and 'extracellularProperties' not in already_processed: already_processed.add('extracellularProperties') - self.extracellularProperties = value - self.validate_NmlId(self.extracellularProperties) # validate type NmlId + self.extracellular_properties = value + self.validate_NmlId(self.extracellular_properties) # validate type NmlId super(Population, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'layout': @@ -8741,7 +8740,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'instance': obj_ = Instance.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.instance.append(obj_) + self.instances.append(obj_) obj_.original_tagname_ = 'instance' super(Population, self).buildChildren(child_, node, nodeName_, True) @@ -8796,20 +8795,20 @@ def __str__(self): class Region(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('space', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('spaces', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, space=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, spaces=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Region, self).__init__(neuroLexId, id, **kwargs_) - self.space = _cast(None, space) - self.space_nsprefix_ = None + super(Region, self).__init__(neuro_lex_id, id, **kwargs_) + self.spaces = _cast(None, spaces) + self.spaces_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -8869,9 +8868,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Region'): super(Region, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Region') - if self.space is not None and 'space' not in already_processed: - already_processed.add('space') - outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.space), input_name='space')), )) + if self.spaces is not None and 'spaces' not in already_processed: + already_processed.add('spaces') + outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spaces), input_name='space')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Region', fromsubclass_=False, pretty_print=True): super(Region, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -8895,8 +8894,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) if value is not None and 'space' not in already_processed: already_processed.add('space') - self.space = value - self.validate_NmlId(self.space) # validate type NmlId + self.spaces = value + self.validate_NmlId(self.spaces) # validate type NmlId super(Region, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): content_ = self.gds_build_any(child_, 'Region') @@ -8908,20 +8907,20 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Space(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('basedOn', 'allowedSpaces', 0, 1, {'use': 'optional'}), + MemberSpec_('based_on', 'allowedSpaces', 0, 1, {'use': 'optional'}), MemberSpec_('structure', 'SpaceStructure', 0, 1, {'minOccurs': '0', 'name': 'structure', 'type': 'SpaceStructure'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, basedOn=None, structure=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, based_on=None, structure=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Space, self).__init__(neuroLexId, id, **kwargs_) - self.basedOn = _cast(None, basedOn) - self.basedOn_nsprefix_ = None + super(Space, self).__init__(neuro_lex_id, id, **kwargs_) + self.based_on = _cast(None, based_on) + self.based_on_nsprefix_ = None self.structure = structure self.structure_nsprefix_ = None def factory(*args_, **kwargs_): @@ -8981,9 +8980,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Space'): super(Space, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Space') - if self.basedOn is not None and 'basedOn' not in already_processed: - already_processed.add('basedOn') - outfile.write(' basedOn=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.basedOn), input_name='basedOn')), )) + if self.based_on is not None and 'based_on' not in already_processed: + already_processed.add('based_on') + outfile.write(' basedOn=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.based_on), input_name='basedOn')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Space', fromsubclass_=False, pretty_print=True): super(Space, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -9008,8 +9007,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('basedOn', node) if value is not None and 'basedOn' not in already_processed: already_processed.add('basedOn') - self.basedOn = value - self.validate_allowedSpaces(self.basedOn) # validate type allowedSpaces + self.based_on = value + self.validate_allowedSpaces(self.based_on) # validate type allowedSpaces super(Space, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'structure': @@ -9024,88 +9023,88 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Network(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'networkTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'networkTypes', 0, 1, {'use': 'optional'}), MemberSpec_('temperature', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), - MemberSpec_('space', 'Space', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'space', 'type': 'Space'}, None), - MemberSpec_('region', 'Region', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'region', 'type': 'Region'}, None), - MemberSpec_('extracellularProperties', 'ExtracellularPropertiesLocal', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularPropertiesLocal'}, None), - MemberSpec_('population', 'Population', 1, 0, {'maxOccurs': 'unbounded', 'name': 'population', 'type': 'Population'}, None), - MemberSpec_('cellSet', 'CellSet', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cellSet', 'type': 'CellSet'}, None), - MemberSpec_('synapticConnection', 'SynapticConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'synapticConnection', 'type': 'SynapticConnection'}, None), - MemberSpec_('projection', 'Projection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'projection', 'type': 'Projection'}, None), - MemberSpec_('electricalProjection', 'ElectricalProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalProjection', 'type': 'ElectricalProjection'}, None), - MemberSpec_('continuousProjection', 'ContinuousProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousProjection', 'type': 'ContinuousProjection'}, None), - MemberSpec_('explicitInput', 'ExplicitInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'explicitInput', 'type': 'ExplicitInput'}, None), - MemberSpec_('inputList', 'InputList', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputList', 'type': 'InputList'}, None), + MemberSpec_('spaces', 'Space', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'space', 'type': 'Space'}, None), + MemberSpec_('regions', 'Region', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'region', 'type': 'Region'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularPropertiesLocal', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularPropertiesLocal'}, None), + MemberSpec_('populations', 'Population', 1, 0, {'maxOccurs': 'unbounded', 'name': 'population', 'type': 'Population'}, None), + MemberSpec_('cell_sets', 'CellSet', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cellSet', 'type': 'CellSet'}, None), + MemberSpec_('synaptic_connections', 'SynapticConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'synapticConnection', 'type': 'SynapticConnection'}, None), + MemberSpec_('projections', 'Projection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'projection', 'type': 'Projection'}, None), + MemberSpec_('electrical_projections', 'ElectricalProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalProjection', 'type': 'ElectricalProjection'}, None), + MemberSpec_('continuous_projections', 'ContinuousProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousProjection', 'type': 'ContinuousProjection'}, None), + MemberSpec_('explicit_inputs', 'ExplicitInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'explicitInput', 'type': 'ExplicitInput'}, None), + MemberSpec_('input_lists', 'InputList', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputList', 'type': 'InputList'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, type_=None, temperature=None, space=None, region=None, extracellularProperties=None, population=None, cellSet=None, synapticConnection=None, projection=None, electricalProjection=None, continuousProjection=None, explicitInput=None, inputList=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, type=None, temperature=None, spaces=None, regions=None, extracellular_properties=None, populations=None, cell_sets=None, synaptic_connections=None, projections=None, electrical_projections=None, continuous_projections=None, explicit_inputs=None, input_lists=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Network, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + super(Network, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.type = _cast(None, type) + self.type_nsprefix_ = None self.temperature = _cast(None, temperature) self.temperature_nsprefix_ = None - if space is None: - self.space = [] - else: - self.space = space - self.space_nsprefix_ = None - if region is None: - self.region = [] - else: - self.region = region - self.region_nsprefix_ = None - if extracellularProperties is None: - self.extracellularProperties = [] - else: - self.extracellularProperties = extracellularProperties - self.extracellularProperties_nsprefix_ = None - if population is None: - self.population = [] - else: - self.population = population - self.population_nsprefix_ = None - if cellSet is None: - self.cellSet = [] - else: - self.cellSet = cellSet - self.cellSet_nsprefix_ = None - if synapticConnection is None: - self.synapticConnection = [] - else: - self.synapticConnection = synapticConnection - self.synapticConnection_nsprefix_ = None - if projection is None: - self.projection = [] - else: - self.projection = projection - self.projection_nsprefix_ = None - if electricalProjection is None: - self.electricalProjection = [] - else: - self.electricalProjection = electricalProjection - self.electricalProjection_nsprefix_ = None - if continuousProjection is None: - self.continuousProjection = [] - else: - self.continuousProjection = continuousProjection - self.continuousProjection_nsprefix_ = None - if explicitInput is None: - self.explicitInput = [] - else: - self.explicitInput = explicitInput - self.explicitInput_nsprefix_ = None - if inputList is None: - self.inputList = [] - else: - self.inputList = inputList - self.inputList_nsprefix_ = None + if spaces is None: + self.spaces = [] + else: + self.spaces = spaces + self.spaces_nsprefix_ = None + if regions is None: + self.regions = [] + else: + self.regions = regions + self.regions_nsprefix_ = None + if extracellular_properties is None: + self.extracellular_properties = [] + else: + self.extracellular_properties = extracellular_properties + self.extracellular_properties_nsprefix_ = None + if populations is None: + self.populations = [] + else: + self.populations = populations + self.populations_nsprefix_ = None + if cell_sets is None: + self.cell_sets = [] + else: + self.cell_sets = cell_sets + self.cell_sets_nsprefix_ = None + if synaptic_connections is None: + self.synaptic_connections = [] + else: + self.synaptic_connections = synaptic_connections + self.synaptic_connections_nsprefix_ = None + if projections is None: + self.projections = [] + else: + self.projections = projections + self.projections_nsprefix_ = None + if electrical_projections is None: + self.electrical_projections = [] + else: + self.electrical_projections = electrical_projections + self.electrical_projections_nsprefix_ = None + if continuous_projections is None: + self.continuous_projections = [] + else: + self.continuous_projections = continuous_projections + self.continuous_projections_nsprefix_ = None + if explicit_inputs is None: + self.explicit_inputs = [] + else: + self.explicit_inputs = explicit_inputs + self.explicit_inputs_nsprefix_ = None + if input_lists is None: + self.input_lists = [] + else: + self.input_lists = input_lists + self.input_lists_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9143,17 +9142,17 @@ def validate_Nml2Quantity_temperature(self, value): validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] def hasContent_(self): if ( - self.space or - self.region or - self.extracellularProperties or - self.population or - self.cellSet or - self.synapticConnection or - self.projection or - self.electricalProjection or - self.continuousProjection or - self.explicitInput or - self.inputList or + self.spaces or + self.regions or + self.extracellular_properties or + self.populations or + self.cell_sets or + self.synaptic_connections or + self.projections or + self.electrical_projections or + self.continuous_projections or + self.explicit_inputs or + self.input_lists or super(Network, self).hasContent_() ): return True @@ -9184,9 +9183,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Network'): super(Network, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Network') - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.temperature is not None and 'temperature' not in already_processed: already_processed.add('temperature') outfile.write(' temperature=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.temperature), input_name='temperature')), )) @@ -9196,38 +9195,38 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for space_ in self.space: - namespaceprefix_ = self.space_nsprefix_ + ':' if (UseCapturedNS_ and self.space_nsprefix_) else '' + for space_ in self.spaces: + namespaceprefix_ = self.spaces_nsprefix_ + ':' if (UseCapturedNS_ and self.spaces_nsprefix_) else '' space_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='space', pretty_print=pretty_print) - for region_ in self.region: - namespaceprefix_ = self.region_nsprefix_ + ':' if (UseCapturedNS_ and self.region_nsprefix_) else '' + for region_ in self.regions: + namespaceprefix_ = self.regions_nsprefix_ + ':' if (UseCapturedNS_ and self.regions_nsprefix_) else '' region_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='region', pretty_print=pretty_print) - for extracellularProperties_ in self.extracellularProperties: - namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' + for extracellularProperties_ in self.extracellular_properties: + namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - for population_ in self.population: - namespaceprefix_ = self.population_nsprefix_ + ':' if (UseCapturedNS_ and self.population_nsprefix_) else '' + for population_ in self.populations: + namespaceprefix_ = self.populations_nsprefix_ + ':' if (UseCapturedNS_ and self.populations_nsprefix_) else '' population_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='population', pretty_print=pretty_print) - for cellSet_ in self.cellSet: - namespaceprefix_ = self.cellSet_nsprefix_ + ':' if (UseCapturedNS_ and self.cellSet_nsprefix_) else '' + for cellSet_ in self.cell_sets: + namespaceprefix_ = self.cell_sets_nsprefix_ + ':' if (UseCapturedNS_ and self.cell_sets_nsprefix_) else '' cellSet_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cellSet', pretty_print=pretty_print) - for synapticConnection_ in self.synapticConnection: - namespaceprefix_ = self.synapticConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.synapticConnection_nsprefix_) else '' + for synapticConnection_ in self.synaptic_connections: + namespaceprefix_ = self.synaptic_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.synaptic_connections_nsprefix_) else '' synapticConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='synapticConnection', pretty_print=pretty_print) - for projection_ in self.projection: - namespaceprefix_ = self.projection_nsprefix_ + ':' if (UseCapturedNS_ and self.projection_nsprefix_) else '' + for projection_ in self.projections: + namespaceprefix_ = self.projections_nsprefix_ + ':' if (UseCapturedNS_ and self.projections_nsprefix_) else '' projection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='projection', pretty_print=pretty_print) - for electricalProjection_ in self.electricalProjection: - namespaceprefix_ = self.electricalProjection_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalProjection_nsprefix_) else '' + for electricalProjection_ in self.electrical_projections: + namespaceprefix_ = self.electrical_projections_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_projections_nsprefix_) else '' electricalProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalProjection', pretty_print=pretty_print) - for continuousProjection_ in self.continuousProjection: - namespaceprefix_ = self.continuousProjection_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousProjection_nsprefix_) else '' + for continuousProjection_ in self.continuous_projections: + namespaceprefix_ = self.continuous_projections_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_projections_nsprefix_) else '' continuousProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousProjection', pretty_print=pretty_print) - for explicitInput_ in self.explicitInput: - namespaceprefix_ = self.explicitInput_nsprefix_ + ':' if (UseCapturedNS_ and self.explicitInput_nsprefix_) else '' + for explicitInput_ in self.explicit_inputs: + namespaceprefix_ = self.explicit_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.explicit_inputs_nsprefix_) else '' explicitInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='explicitInput', pretty_print=pretty_print) - for inputList_ in self.inputList: - namespaceprefix_ = self.inputList_nsprefix_ + ':' if (UseCapturedNS_ and self.inputList_nsprefix_) else '' + for inputList_ in self.input_lists: + namespaceprefix_ = self.input_lists_nsprefix_ + ':' if (UseCapturedNS_ and self.input_lists_nsprefix_) else '' inputList_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputList', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -9244,8 +9243,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_networkTypes(self.type_) # validate type networkTypes + self.type = value + self.validate_networkTypes(self.type) # validate type networkTypes value = find_attr_value_('temperature', node) if value is not None and 'temperature' not in already_processed: already_processed.add('temperature') @@ -9256,57 +9255,57 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'space': obj_ = Space.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.space.append(obj_) + self.spaces.append(obj_) obj_.original_tagname_ = 'space' elif nodeName_ == 'region': obj_ = Region.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.region.append(obj_) + self.regions.append(obj_) obj_.original_tagname_ = 'region' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularPropertiesLocal.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.extracellularProperties.append(obj_) + self.extracellular_properties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'population': obj_ = Population.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.population.append(obj_) + self.populations.append(obj_) obj_.original_tagname_ = 'population' elif nodeName_ == 'cellSet': obj_ = CellSet.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.cellSet.append(obj_) + self.cell_sets.append(obj_) obj_.original_tagname_ = 'cellSet' elif nodeName_ == 'synapticConnection': obj_ = SynapticConnection.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.synapticConnection.append(obj_) + self.synaptic_connections.append(obj_) obj_.original_tagname_ = 'synapticConnection' elif nodeName_ == 'projection': obj_ = Projection.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.projection.append(obj_) + self.projections.append(obj_) obj_.original_tagname_ = 'projection' elif nodeName_ == 'electricalProjection': obj_ = ElectricalProjection.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.electricalProjection.append(obj_) + self.electrical_projections.append(obj_) obj_.original_tagname_ = 'electricalProjection' elif nodeName_ == 'continuousProjection': obj_ = ContinuousProjection.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.continuousProjection.append(obj_) + self.continuous_projections.append(obj_) obj_.original_tagname_ = 'continuousProjection' elif nodeName_ == 'explicitInput': obj_ = ExplicitInput.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.explicitInput.append(obj_) + self.explicit_inputs.append(obj_) obj_.original_tagname_ = 'explicitInput' elif nodeName_ == 'inputList': obj_ = InputList.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.inputList.append(obj_) + self.input_lists.append(obj_) obj_.original_tagname_ = 'inputList' super(Network, self).buildChildren(child_, node, nodeName_, True) @@ -9375,31 +9374,31 @@ def exportHdf5(self, h5file, h5Group): class TransientPoissonFiringSynapse(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, delay=None, duration=None, synapse=None, spikeTarget=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, delay=None, duration=None, synapse=None, spike_target=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TransientPoissonFiringSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.averageRate = _cast(None, averageRate) - self.averageRate_nsprefix_ = None + super(TransientPoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.average_rate = _cast(None, average_rate) + self.average_rate_nsprefix_ = None self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) self.duration_nsprefix_ = None self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None - self.spikeTarget = _cast(None, spikeTarget) - self.spikeTarget_nsprefix_ = None + self.spike_target = _cast(None, spike_target) + self.spike_target_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9465,9 +9464,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='TransientPoissonFiringSynapse'): super(TransientPoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TransientPoissonFiringSynapse') - if self.averageRate is not None and 'averageRate' not in already_processed: - already_processed.add('averageRate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) + if self.average_rate is not None and 'average_rate' not in already_processed: + already_processed.add('average_rate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) @@ -9477,9 +9476,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) - if self.spikeTarget is not None and 'spikeTarget' not in already_processed: - already_processed.add('spikeTarget') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) + if self.spike_target is not None and 'spike_target' not in already_processed: + already_processed.add('spike_target') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TransientPoissonFiringSynapse', fromsubclass_=False, pretty_print=True): super(TransientPoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -9497,8 +9496,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.averageRate = value - self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime + self.average_rate = value + self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: already_processed.add('delay') @@ -9516,7 +9515,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spikeTarget = value + self.spike_target = value super(TransientPoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(TransientPoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -9527,25 +9526,25 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class PoissonFiringSynapse(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, synapse=None, spikeTarget=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, synapse=None, spike_target=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PoissonFiringSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.averageRate = _cast(None, averageRate) - self.averageRate_nsprefix_ = None + super(PoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.average_rate = _cast(None, average_rate) + self.average_rate_nsprefix_ = None self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None - self.spikeTarget = _cast(None, spikeTarget) - self.spikeTarget_nsprefix_ = None + self.spike_target = _cast(None, spike_target) + self.spike_target_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9600,15 +9599,15 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PoissonFiringSynapse'): super(PoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PoissonFiringSynapse') - if self.averageRate is not None and 'averageRate' not in already_processed: - already_processed.add('averageRate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) + if self.average_rate is not None and 'average_rate' not in already_processed: + already_processed.add('average_rate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) - if self.spikeTarget is not None and 'spikeTarget' not in already_processed: - already_processed.add('spikeTarget') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) + if self.spike_target is not None and 'spike_target' not in already_processed: + already_processed.add('spike_target') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PoissonFiringSynapse', fromsubclass_=False, pretty_print=True): super(PoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -9626,8 +9625,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.averageRate = value - self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime + self.average_rate = value + self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime value = find_attr_value_('synapse', node) if value is not None and 'synapse' not in already_processed: already_processed.add('synapse') @@ -9635,7 +9634,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spikeTarget = value + self.spike_target = value super(PoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(PoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -9646,19 +9645,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpikeGeneratorPoisson(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('averageRate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorPoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) - self.averageRate = _cast(None, averageRate) - self.averageRate_nsprefix_ = None + super(SpikeGeneratorPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.average_rate = _cast(None, average_rate) + self.average_rate_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -9714,9 +9713,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorPoisson'): super(SpikeGeneratorPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorPoisson') - if self.averageRate is not None and 'averageRate' not in already_processed: - already_processed.add('averageRate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.averageRate), input_name='averageRate')), )) + if self.average_rate is not None and 'average_rate' not in already_processed: + already_processed.add('average_rate') + outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -9742,8 +9741,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) if value is not None and 'averageRate' not in already_processed: already_processed.add('averageRate') - self.averageRate = value - self.validate_Nml2Quantity_pertime(self.averageRate) # validate type Nml2Quantity_pertime + self.average_rate = value + self.validate_Nml2Quantity_pertime(self.average_rate) # validate type Nml2Quantity_pertime value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -9758,22 +9757,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpikeGeneratorRandom(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('maxISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('minISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('max_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('min_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, maxISI=None, minISI=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, max_isi=None, min_isi=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorRandom, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.maxISI = _cast(None, maxISI) - self.maxISI_nsprefix_ = None - self.minISI = _cast(None, minISI) - self.minISI_nsprefix_ = None + super(SpikeGeneratorRandom, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.max_isi = _cast(None, max_isi) + self.max_isi_nsprefix_ = None + self.min_isi = _cast(None, min_isi) + self.min_isi_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9828,12 +9827,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorRandom'): super(SpikeGeneratorRandom, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRandom') - if self.maxISI is not None and 'maxISI' not in already_processed: - already_processed.add('maxISI') - outfile.write(' maxISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.maxISI), input_name='maxISI')), )) - if self.minISI is not None and 'minISI' not in already_processed: - already_processed.add('minISI') - outfile.write(' minISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minISI), input_name='minISI')), )) + if self.max_isi is not None and 'max_isi' not in already_processed: + already_processed.add('max_isi') + outfile.write(' maxISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.max_isi), input_name='maxISI')), )) + if self.min_isi is not None and 'min_isi' not in already_processed: + already_processed.add('min_isi') + outfile.write(' minISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.min_isi), input_name='minISI')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRandom', fromsubclass_=False, pretty_print=True): super(SpikeGeneratorRandom, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -9851,13 +9850,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('maxISI', node) if value is not None and 'maxISI' not in already_processed: already_processed.add('maxISI') - self.maxISI = value - self.validate_Nml2Quantity_time(self.maxISI) # validate type Nml2Quantity_time + self.max_isi = value + self.validate_Nml2Quantity_time(self.max_isi) # validate type Nml2Quantity_time value = find_attr_value_('minISI', node) if value is not None and 'minISI' not in already_processed: already_processed.add('minISI') - self.minISI = value - self.validate_Nml2Quantity_time(self.minISI) # validate type Nml2Quantity_time + self.min_isi = value + self.validate_Nml2Quantity_time(self.min_isi) # validate type Nml2Quantity_time super(SpikeGeneratorRandom, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGeneratorRandom, self).buildChildren(child_, node, nodeName_, True) @@ -9872,13 +9871,13 @@ class SpikeGenerator(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, period=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, period=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(SpikeGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.period = _cast(None, period) self.period_nsprefix_ = None def factory(*args_, **kwargs_): @@ -9968,27 +9967,27 @@ class TimedSynapticInput(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('spikeTarget', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spike', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('spikes', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, synapse=None, spikeTarget=None, spike=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse=None, spike_target=None, spikes=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TimedSynapticInput, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(TimedSynapticInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None - self.spikeTarget = _cast(None, spikeTarget) - self.spikeTarget_nsprefix_ = None - if spike is None: - self.spike = [] + self.spike_target = _cast(None, spike_target) + self.spike_target_nsprefix_ = None + if spikes is None: + self.spikes = [] else: - self.spike = spike - self.spike_nsprefix_ = None + self.spikes = spikes + self.spikes_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10013,7 +10012,7 @@ def validate_NmlId(self, value): validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.spike or + self.spikes or super(TimedSynapticInput, self).hasContent_() ): return True @@ -10047,17 +10046,17 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) - if self.spikeTarget is not None and 'spikeTarget' not in already_processed: - already_processed.add('spikeTarget') - outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spikeTarget), input_name='spikeTarget')), )) + if self.spike_target is not None and 'spike_target' not in already_processed: + already_processed.add('spike_target') + outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TimedSynapticInput', fromsubclass_=False, pretty_print=True): super(TimedSynapticInput, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - for spike_ in self.spike: - namespaceprefix_ = self.spike_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_nsprefix_) else '' + for spike_ in self.spikes: + namespaceprefix_ = self.spikes_nsprefix_ + ':' if (UseCapturedNS_ and self.spikes_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -10079,13 +10078,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('spikeTarget', node) if value is not None and 'spikeTarget' not in already_processed: already_processed.add('spikeTarget') - self.spikeTarget = value + self.spike_target = value super(TimedSynapticInput, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spike.append(obj_) + self.spikes.append(obj_) obj_.original_tagname_ = 'spike' super(TimedSynapticInput, self).buildChildren(child_, node, nodeName_, True) # end class TimedSynapticInput @@ -10094,22 +10093,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpikeArray(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spike', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), + MemberSpec_('spikes', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, spike=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, spikes=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeArray, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - if spike is None: - self.spike = [] + super(SpikeArray, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + if spikes is None: + self.spikes = [] else: - self.spike = spike - self.spike_nsprefix_ = None + self.spikes = spikes + self.spikes_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10123,7 +10122,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.spike or + self.spikes or super(SpikeArray, self).hasContent_() ): return True @@ -10160,8 +10159,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for spike_ in self.spike: - namespaceprefix_ = self.spike_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_nsprefix_) else '' + for spike_ in self.spikes: + namespaceprefix_ = self.spikes_nsprefix_ + ':' if (UseCapturedNS_ and self.spikes_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -10180,7 +10179,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spike.append(obj_) + self.spikes.append(obj_) obj_.original_tagname_ = 'spike' super(SpikeArray, self).buildChildren(child_, node, nodeName_, True) # end class SpikeArray @@ -10193,13 +10192,13 @@ class Spike(BaseNonNegativeIntegerId): ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuroLexId=None, id=None, time=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, time=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Spike, self).__init__(neuroLexId, id, **kwargs_) + super(Spike, self).__init__(neuro_lex_id, id, **kwargs_) self.time = _cast(None, time) self.time_nsprefix_ = None def factory(*args_, **kwargs_): @@ -10291,34 +10290,34 @@ class VoltageClampTriple(Standalone): MemberSpec_('active', 'ZeroOrOne', 0, 0, {'use': 'required'}), MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('conditioningVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('testingVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('returnVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('simpleSeriesResistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), + MemberSpec_('conditioning_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('testing_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('return_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, active=None, delay=None, duration=None, conditioningVoltage=None, testingVoltage=None, returnVoltage=None, simpleSeriesResistance=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, active=None, delay=None, duration=None, conditioning_voltage=None, testing_voltage=None, return_voltage=None, simple_series_resistance=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(VoltageClampTriple, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(VoltageClampTriple, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.active = _cast(float, active) self.active_nsprefix_ = None self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) self.duration_nsprefix_ = None - self.conditioningVoltage = _cast(None, conditioningVoltage) - self.conditioningVoltage_nsprefix_ = None - self.testingVoltage = _cast(None, testingVoltage) - self.testingVoltage_nsprefix_ = None - self.returnVoltage = _cast(None, returnVoltage) - self.returnVoltage_nsprefix_ = None - self.simpleSeriesResistance = _cast(None, simpleSeriesResistance) - self.simpleSeriesResistance_nsprefix_ = None + self.conditioning_voltage = _cast(None, conditioning_voltage) + self.conditioning_voltage_nsprefix_ = None + self.testing_voltage = _cast(None, testing_voltage) + self.testing_voltage_nsprefix_ = None + self.return_voltage = _cast(None, return_voltage) + self.return_voltage_nsprefix_ = None + self.simple_series_resistance = _cast(None, simple_series_resistance) + self.simple_series_resistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10417,18 +10416,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) - if self.conditioningVoltage is not None and 'conditioningVoltage' not in already_processed: - already_processed.add('conditioningVoltage') - outfile.write(' conditioningVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conditioningVoltage), input_name='conditioningVoltage')), )) - if self.testingVoltage is not None and 'testingVoltage' not in already_processed: - already_processed.add('testingVoltage') - outfile.write(' testingVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.testingVoltage), input_name='testingVoltage')), )) - if self.returnVoltage is not None and 'returnVoltage' not in already_processed: - already_processed.add('returnVoltage') - outfile.write(' returnVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.returnVoltage), input_name='returnVoltage')), )) - if self.simpleSeriesResistance is not None and 'simpleSeriesResistance' not in already_processed: - already_processed.add('simpleSeriesResistance') - outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simpleSeriesResistance), input_name='simpleSeriesResistance')), )) + if self.conditioning_voltage is not None and 'conditioning_voltage' not in already_processed: + already_processed.add('conditioning_voltage') + outfile.write(' conditioningVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conditioning_voltage), input_name='conditioningVoltage')), )) + if self.testing_voltage is not None and 'testing_voltage' not in already_processed: + already_processed.add('testing_voltage') + outfile.write(' testingVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.testing_voltage), input_name='testingVoltage')), )) + if self.return_voltage is not None and 'return_voltage' not in already_processed: + already_processed.add('return_voltage') + outfile.write(' returnVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.return_voltage), input_name='returnVoltage')), )) + if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: + already_processed.add('simple_series_resistance') + outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simple_series_resistance), input_name='simpleSeriesResistance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClampTriple', fromsubclass_=False, pretty_print=True): super(VoltageClampTriple, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -10462,23 +10461,23 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conditioningVoltage', node) if value is not None and 'conditioningVoltage' not in already_processed: already_processed.add('conditioningVoltage') - self.conditioningVoltage = value - self.validate_Nml2Quantity_voltage(self.conditioningVoltage) # validate type Nml2Quantity_voltage + self.conditioning_voltage = value + self.validate_Nml2Quantity_voltage(self.conditioning_voltage) # validate type Nml2Quantity_voltage value = find_attr_value_('testingVoltage', node) if value is not None and 'testingVoltage' not in already_processed: already_processed.add('testingVoltage') - self.testingVoltage = value - self.validate_Nml2Quantity_voltage(self.testingVoltage) # validate type Nml2Quantity_voltage + self.testing_voltage = value + self.validate_Nml2Quantity_voltage(self.testing_voltage) # validate type Nml2Quantity_voltage value = find_attr_value_('returnVoltage', node) if value is not None and 'returnVoltage' not in already_processed: already_processed.add('returnVoltage') - self.returnVoltage = value - self.validate_Nml2Quantity_voltage(self.returnVoltage) # validate type Nml2Quantity_voltage + self.return_voltage = value + self.validate_Nml2Quantity_voltage(self.return_voltage) # validate type Nml2Quantity_voltage value = find_attr_value_('simpleSeriesResistance', node) if value is not None and 'simpleSeriesResistance' not in already_processed: already_processed.add('simpleSeriesResistance') - self.simpleSeriesResistance = value - self.validate_Nml2Quantity_resistance(self.simpleSeriesResistance) # validate type Nml2Quantity_resistance + self.simple_series_resistance = value + self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance super(VoltageClampTriple, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(VoltageClampTriple, self).buildChildren(child_, node, nodeName_, True) @@ -10491,26 +10490,26 @@ class VoltageClamp(Standalone): member_data_items_ = [ MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('targetVoltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('simpleSeriesResistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), + MemberSpec_('target_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, targetVoltage=None, simpleSeriesResistance=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, target_voltage=None, simple_series_resistance=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(VoltageClamp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(VoltageClamp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) self.duration_nsprefix_ = None - self.targetVoltage = _cast(None, targetVoltage) - self.targetVoltage_nsprefix_ = None - self.simpleSeriesResistance = _cast(None, simpleSeriesResistance) - self.simpleSeriesResistance_nsprefix_ = None + self.target_voltage = _cast(None, target_voltage) + self.target_voltage_nsprefix_ = None + self.simple_series_resistance = _cast(None, simple_series_resistance) + self.simple_series_resistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10593,12 +10592,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) - if self.targetVoltage is not None and 'targetVoltage' not in already_processed: - already_processed.add('targetVoltage') - outfile.write(' targetVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.targetVoltage), input_name='targetVoltage')), )) - if self.simpleSeriesResistance is not None and 'simpleSeriesResistance' not in already_processed: - already_processed.add('simpleSeriesResistance') - outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simpleSeriesResistance), input_name='simpleSeriesResistance')), )) + if self.target_voltage is not None and 'target_voltage' not in already_processed: + already_processed.add('target_voltage') + outfile.write(' targetVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.target_voltage), input_name='targetVoltage')), )) + if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: + already_processed.add('simple_series_resistance') + outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simple_series_resistance), input_name='simpleSeriesResistance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClamp', fromsubclass_=False, pretty_print=True): super(VoltageClamp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -10626,13 +10625,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('targetVoltage', node) if value is not None and 'targetVoltage' not in already_processed: already_processed.add('targetVoltage') - self.targetVoltage = value - self.validate_Nml2Quantity_voltage(self.targetVoltage) # validate type Nml2Quantity_voltage + self.target_voltage = value + self.validate_Nml2Quantity_voltage(self.target_voltage) # validate type Nml2Quantity_voltage value = find_attr_value_('simpleSeriesResistance', node) if value is not None and 'simpleSeriesResistance' not in already_processed: already_processed.add('simpleSeriesResistance') - self.simpleSeriesResistance = value - self.validate_Nml2Quantity_resistance(self.simpleSeriesResistance) # validate type Nml2Quantity_resistance + self.simple_series_resistance = value + self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance super(VoltageClamp, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(VoltageClamp, self).buildChildren(child_, node, nodeName_, True) @@ -10643,34 +10642,34 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class CompoundInputDL(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulseGeneratorDL', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), - MemberSpec_('sineGeneratorDL', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), - MemberSpec_('rampGeneratorDL', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), + MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), + MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), + MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, pulseGeneratorDL=None, sineGeneratorDL=None, rampGeneratorDL=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generator_dls=None, sine_generator_dls=None, ramp_generator_dls=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CompoundInputDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - if pulseGeneratorDL is None: - self.pulseGeneratorDL = [] - else: - self.pulseGeneratorDL = pulseGeneratorDL - self.pulseGeneratorDL_nsprefix_ = None - if sineGeneratorDL is None: - self.sineGeneratorDL = [] - else: - self.sineGeneratorDL = sineGeneratorDL - self.sineGeneratorDL_nsprefix_ = None - if rampGeneratorDL is None: - self.rampGeneratorDL = [] - else: - self.rampGeneratorDL = rampGeneratorDL - self.rampGeneratorDL_nsprefix_ = None + super(CompoundInputDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + if pulse_generator_dls is None: + self.pulse_generator_dls = [] + else: + self.pulse_generator_dls = pulse_generator_dls + self.pulse_generator_dls_nsprefix_ = None + if sine_generator_dls is None: + self.sine_generator_dls = [] + else: + self.sine_generator_dls = sine_generator_dls + self.sine_generator_dls_nsprefix_ = None + if ramp_generator_dls is None: + self.ramp_generator_dls = [] + else: + self.ramp_generator_dls = ramp_generator_dls + self.ramp_generator_dls_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10684,9 +10683,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.pulseGeneratorDL or - self.sineGeneratorDL or - self.rampGeneratorDL or + self.pulse_generator_dls or + self.sine_generator_dls or + self.ramp_generator_dls or super(CompoundInputDL, self).hasContent_() ): return True @@ -10723,14 +10722,14 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for pulseGeneratorDL_ in self.pulseGeneratorDL: - namespaceprefix_ = self.pulseGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGeneratorDL_nsprefix_) else '' + for pulseGeneratorDL_ in self.pulse_generator_dls: + namespaceprefix_ = self.pulse_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generator_dls_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) - for sineGeneratorDL_ in self.sineGeneratorDL: - namespaceprefix_ = self.sineGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGeneratorDL_nsprefix_) else '' + for sineGeneratorDL_ in self.sine_generator_dls: + namespaceprefix_ = self.sine_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generator_dls_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) - for rampGeneratorDL_ in self.rampGeneratorDL: - namespaceprefix_ = self.rampGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGeneratorDL_nsprefix_) else '' + for rampGeneratorDL_ in self.ramp_generator_dls: + namespaceprefix_ = self.ramp_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generator_dls_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -10749,17 +10748,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.pulseGeneratorDL.append(obj_) + self.pulse_generator_dls.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.sineGeneratorDL.append(obj_) + self.sine_generator_dls.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.rampGeneratorDL.append(obj_) + self.ramp_generator_dls.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' super(CompoundInputDL, self).buildChildren(child_, node, nodeName_, True) # end class CompoundInputDL @@ -10768,34 +10767,34 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class CompoundInput(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulseGenerator', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), - MemberSpec_('sineGenerator', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), - MemberSpec_('rampGenerator', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), + MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), + MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), + MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, pulseGenerator=None, sineGenerator=None, rampGenerator=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generators=None, sine_generators=None, ramp_generators=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CompoundInput, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - if pulseGenerator is None: - self.pulseGenerator = [] - else: - self.pulseGenerator = pulseGenerator - self.pulseGenerator_nsprefix_ = None - if sineGenerator is None: - self.sineGenerator = [] - else: - self.sineGenerator = sineGenerator - self.sineGenerator_nsprefix_ = None - if rampGenerator is None: - self.rampGenerator = [] - else: - self.rampGenerator = rampGenerator - self.rampGenerator_nsprefix_ = None + super(CompoundInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + if pulse_generators is None: + self.pulse_generators = [] + else: + self.pulse_generators = pulse_generators + self.pulse_generators_nsprefix_ = None + if sine_generators is None: + self.sine_generators = [] + else: + self.sine_generators = sine_generators + self.sine_generators_nsprefix_ = None + if ramp_generators is None: + self.ramp_generators = [] + else: + self.ramp_generators = ramp_generators + self.ramp_generators_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10809,9 +10808,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.pulseGenerator or - self.sineGenerator or - self.rampGenerator or + self.pulse_generators or + self.sine_generators or + self.ramp_generators or super(CompoundInput, self).hasContent_() ): return True @@ -10848,14 +10847,14 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for pulseGenerator_ in self.pulseGenerator: - namespaceprefix_ = self.pulseGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGenerator_nsprefix_) else '' + for pulseGenerator_ in self.pulse_generators: + namespaceprefix_ = self.pulse_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generators_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) - for sineGenerator_ in self.sineGenerator: - namespaceprefix_ = self.sineGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGenerator_nsprefix_) else '' + for sineGenerator_ in self.sine_generators: + namespaceprefix_ = self.sine_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generators_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) - for rampGenerator_ in self.rampGenerator: - namespaceprefix_ = self.rampGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGenerator_nsprefix_) else '' + for rampGenerator_ in self.ramp_generators: + namespaceprefix_ = self.ramp_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generators_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -10874,17 +10873,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.pulseGenerator.append(obj_) + self.pulse_generators.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.sineGenerator.append(obj_) + self.sine_generators.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.rampGenerator.append(obj_) + self.ramp_generators.append(obj_) obj_.original_tagname_ = 'rampGenerator' super(CompoundInput, self).buildChildren(child_, node, nodeName_, True) # end class CompoundInput @@ -10895,29 +10894,29 @@ class RampGeneratorDL(Standalone): member_data_items_ = [ MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('startAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('finishAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('baselineAmplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('start_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('finish_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('baseline_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, startAmplitude=None, finishAmplitude=None, baselineAmplitude=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(RampGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(RampGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) self.duration_nsprefix_ = None - self.startAmplitude = _cast(None, startAmplitude) - self.startAmplitude_nsprefix_ = None - self.finishAmplitude = _cast(None, finishAmplitude) - self.finishAmplitude_nsprefix_ = None - self.baselineAmplitude = _cast(None, baselineAmplitude) - self.baselineAmplitude_nsprefix_ = None + self.start_amplitude = _cast(None, start_amplitude) + self.start_amplitude_nsprefix_ = None + self.finish_amplitude = _cast(None, finish_amplitude) + self.finish_amplitude_nsprefix_ = None + self.baseline_amplitude = _cast(None, baseline_amplitude) + self.baseline_amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10989,15 +10988,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) - if self.startAmplitude is not None and 'startAmplitude' not in already_processed: - already_processed.add('startAmplitude') - outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.startAmplitude), input_name='startAmplitude')), )) - if self.finishAmplitude is not None and 'finishAmplitude' not in already_processed: - already_processed.add('finishAmplitude') - outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finishAmplitude), input_name='finishAmplitude')), )) - if self.baselineAmplitude is not None and 'baselineAmplitude' not in already_processed: - already_processed.add('baselineAmplitude') - outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baselineAmplitude), input_name='baselineAmplitude')), )) + if self.start_amplitude is not None and 'start_amplitude' not in already_processed: + already_processed.add('start_amplitude') + outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start_amplitude), input_name='startAmplitude')), )) + if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: + already_processed.add('finish_amplitude') + outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finish_amplitude), input_name='finishAmplitude')), )) + if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: + already_processed.add('baseline_amplitude') + outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baseline_amplitude), input_name='baselineAmplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGeneratorDL', fromsubclass_=False, pretty_print=True): super(RampGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -11025,18 +11024,18 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('startAmplitude', node) if value is not None and 'startAmplitude' not in already_processed: already_processed.add('startAmplitude') - self.startAmplitude = value - self.validate_Nml2Quantity_none(self.startAmplitude) # validate type Nml2Quantity_none + self.start_amplitude = value + self.validate_Nml2Quantity_none(self.start_amplitude) # validate type Nml2Quantity_none value = find_attr_value_('finishAmplitude', node) if value is not None and 'finishAmplitude' not in already_processed: already_processed.add('finishAmplitude') - self.finishAmplitude = value - self.validate_Nml2Quantity_none(self.finishAmplitude) # validate type Nml2Quantity_none + self.finish_amplitude = value + self.validate_Nml2Quantity_none(self.finish_amplitude) # validate type Nml2Quantity_none value = find_attr_value_('baselineAmplitude', node) if value is not None and 'baselineAmplitude' not in already_processed: already_processed.add('baselineAmplitude') - self.baselineAmplitude = value - self.validate_Nml2Quantity_none(self.baselineAmplitude) # validate type Nml2Quantity_none + self.baseline_amplitude = value + self.validate_Nml2Quantity_none(self.baseline_amplitude) # validate type Nml2Quantity_none super(RampGeneratorDL, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(RampGeneratorDL, self).buildChildren(child_, node, nodeName_, True) @@ -11049,29 +11048,29 @@ class RampGenerator(Standalone): member_data_items_ = [ MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('startAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), - MemberSpec_('finishAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), - MemberSpec_('baselineAmplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('start_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('finish_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('baseline_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, startAmplitude=None, finishAmplitude=None, baselineAmplitude=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(RampGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(RampGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) self.duration_nsprefix_ = None - self.startAmplitude = _cast(None, startAmplitude) - self.startAmplitude_nsprefix_ = None - self.finishAmplitude = _cast(None, finishAmplitude) - self.finishAmplitude_nsprefix_ = None - self.baselineAmplitude = _cast(None, baselineAmplitude) - self.baselineAmplitude_nsprefix_ = None + self.start_amplitude = _cast(None, start_amplitude) + self.start_amplitude_nsprefix_ = None + self.finish_amplitude = _cast(None, finish_amplitude) + self.finish_amplitude_nsprefix_ = None + self.baseline_amplitude = _cast(None, baseline_amplitude) + self.baseline_amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11143,15 +11142,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) - if self.startAmplitude is not None and 'startAmplitude' not in already_processed: - already_processed.add('startAmplitude') - outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.startAmplitude), input_name='startAmplitude')), )) - if self.finishAmplitude is not None and 'finishAmplitude' not in already_processed: - already_processed.add('finishAmplitude') - outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finishAmplitude), input_name='finishAmplitude')), )) - if self.baselineAmplitude is not None and 'baselineAmplitude' not in already_processed: - already_processed.add('baselineAmplitude') - outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baselineAmplitude), input_name='baselineAmplitude')), )) + if self.start_amplitude is not None and 'start_amplitude' not in already_processed: + already_processed.add('start_amplitude') + outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start_amplitude), input_name='startAmplitude')), )) + if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: + already_processed.add('finish_amplitude') + outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finish_amplitude), input_name='finishAmplitude')), )) + if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: + already_processed.add('baseline_amplitude') + outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baseline_amplitude), input_name='baselineAmplitude')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGenerator', fromsubclass_=False, pretty_print=True): super(RampGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -11179,18 +11178,18 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('startAmplitude', node) if value is not None and 'startAmplitude' not in already_processed: already_processed.add('startAmplitude') - self.startAmplitude = value - self.validate_Nml2Quantity_current(self.startAmplitude) # validate type Nml2Quantity_current + self.start_amplitude = value + self.validate_Nml2Quantity_current(self.start_amplitude) # validate type Nml2Quantity_current value = find_attr_value_('finishAmplitude', node) if value is not None and 'finishAmplitude' not in already_processed: already_processed.add('finishAmplitude') - self.finishAmplitude = value - self.validate_Nml2Quantity_current(self.finishAmplitude) # validate type Nml2Quantity_current + self.finish_amplitude = value + self.validate_Nml2Quantity_current(self.finish_amplitude) # validate type Nml2Quantity_current value = find_attr_value_('baselineAmplitude', node) if value is not None and 'baselineAmplitude' not in already_processed: already_processed.add('baselineAmplitude') - self.baselineAmplitude = value - self.validate_Nml2Quantity_current(self.baselineAmplitude) # validate type Nml2Quantity_current + self.baseline_amplitude = value + self.validate_Nml2Quantity_current(self.baseline_amplitude) # validate type Nml2Quantity_current super(RampGenerator, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(RampGenerator, self).buildChildren(child_, node, nodeName_, True) @@ -11209,13 +11208,13 @@ class SineGeneratorDL(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SineGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(SineGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.phase = _cast(None, phase) @@ -11363,13 +11362,13 @@ class SineGenerator(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SineGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(SineGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.phase = _cast(None, phase) @@ -11528,13 +11527,13 @@ class PulseGeneratorDL(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PulseGeneratorDL, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(PulseGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -11662,13 +11661,13 @@ class PulseGenerator(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PulseGenerator, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(PulseGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -11789,22 +11788,22 @@ class ReactionScheme(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('source', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, source=None, type_=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, source=None, type=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ReactionScheme, self).__init__(neuroLexId, id, **kwargs_) + super(ReactionScheme, self).__init__(neuro_lex_id, id, **kwargs_) self.source = _cast(None, source) self.source_nsprefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -11856,9 +11855,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.source is not None and 'source' not in already_processed: already_processed.add('source') outfile.write(' source=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.source), input_name='source')), )) - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ReactionScheme', fromsubclass_=False, pretty_print=True): super(ReactionScheme, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -11886,7 +11885,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value + self.type = value super(ReactionScheme, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): content_ = self.gds_build_any(child_, 'ReactionScheme') @@ -11902,13 +11901,13 @@ class ExtracellularProperties(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, species=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, species=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExtracellularProperties, self).__init__(neuroLexId, id, **kwargs_) + super(ExtracellularProperties, self).__init__(neuro_lex_id, id, **kwargs_) if species is None: self.species = [] else: @@ -12003,29 +12002,29 @@ class ChannelDensityGHK2(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityGHK2, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None - self.condDensity = _cast(None, condDensity) - self.condDensity_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(None, segment) - self.segment_nsprefix_ = None + super(ChannelDensityGHK2, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None + self.cond_density = _cast(None, cond_density) + self.cond_density_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(None, segments) + self.segments_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None def factory(*args_, **kwargs_): @@ -12092,18 +12091,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityGHK2'): super(ChannelDensityGHK2, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK2') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) - if self.condDensity is not None and 'condDensity' not in already_processed: - already_processed.add('condDensity') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + if self.cond_density is not None and 'cond_density' not in already_processed: + already_processed.add('cond_density') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12125,23 +12124,23 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.condDensity = value - self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity + self.cond_density = value + self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = value - self.validate_NmlId(self.segment) # validate type NmlId + self.segments = value + self.validate_NmlId(self.segments) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -12167,29 +12166,29 @@ class ChannelDensityGHK(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('permeability', 'Nml2Quantity_permeability', 0, 0, {'use': 'required'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, permeability=None, segmentGroup='all', segment=None, ion=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, permeability=None, segment_groups='all', segments=None, ion=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityGHK, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None + super(ChannelDensityGHK, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None self.permeability = _cast(None, permeability) self.permeability_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(None, segment) - self.segment_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(None, segments) + self.segments_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None def factory(*args_, **kwargs_): @@ -12256,18 +12255,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityGHK'): super(ChannelDensityGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) if self.permeability is not None and 'permeability' not in already_processed: already_processed.add('permeability') outfile.write(' permeability=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.permeability), input_name='permeability')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12289,8 +12288,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('permeability', node) if value is not None and 'permeability' not in already_processed: already_processed.add('permeability') @@ -12299,13 +12298,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = value - self.validate_NmlId(self.segment) # validate type NmlId + self.segments = value + self.validate_NmlId(self.segments) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -12331,37 +12330,37 @@ class ChannelDensityNernst(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNernst, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None - self.condDensity = _cast(None, condDensity) - self.condDensity_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(None, segment) - self.segment_nsprefix_ = None + super(ChannelDensityNernst, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None + self.cond_density = _cast(None, cond_density) + self.cond_density_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(None, segments) + self.segments_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -12398,7 +12397,7 @@ def validate_Nml2Quantity_conductanceDensity(self, value): validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelDensityNernst, self).hasContent_() ): return True @@ -12429,18 +12428,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNernst'): super(ChannelDensityNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNernst') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) - if self.condDensity is not None and 'condDensity' not in already_processed: - already_processed.add('condDensity') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment), input_name='segment')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + if self.cond_density is not None and 'cond_density' not in already_processed: + already_processed.add('cond_density') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12458,8 +12457,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -12476,23 +12475,23 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.condDensity = value - self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity + self.cond_density = value + self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = value - self.validate_NmlId(self.segment) # validate type NmlId + self.segments = value + self.validate_NmlId(self.segments) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -12507,7 +12506,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNernst, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNernst @@ -12526,40 +12525,40 @@ class ChannelDensity(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('condDensity', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensity, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None - self.condDensity = _cast(None, condDensity) - self.condDensity_nsprefix_ = None + super(ChannelDensity, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None + self.cond_density = _cast(None, cond_density) + self.cond_density_nsprefix_ = None self.erev = _cast(None, erev) self.erev_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(int, segment) - self.segment_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(int, segments) + self.segments_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -12615,7 +12614,7 @@ def validate_NonNegativeInteger(self, value): pass def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelDensity, self).hasContent_() ): return True @@ -12646,21 +12645,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensity'): super(ChannelDensity, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensity') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) - if self.condDensity is not None and 'condDensity' not in already_processed: - already_processed.add('condDensity') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.condDensity), input_name='condDensity')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + if self.cond_density is not None and 'cond_density' not in already_processed: + already_processed.add('cond_density') + outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12678,8 +12677,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -12696,13 +12695,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('condDensity', node) if value is not None and 'condDensity' not in already_processed: already_processed.add('condDensity') - self.condDensity = value - self.validate_Nml2Quantity_conductanceDensity(self.condDensity) # validate type Nml2Quantity_conductanceDensity + self.cond_density = value + self.validate_Nml2Quantity_conductanceDensity(self.cond_density) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('erev', node) if value is not None and 'erev' not in already_processed: already_processed.add('erev') @@ -12711,15 +12710,15 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = self.gds_parse_integer(value, node, 'segment') - if self.segment < 0: + self.segments = self.gds_parse_integer(value, node, 'segment') + if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -12734,7 +12733,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensity, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensity @@ -12753,28 +12752,28 @@ class ChannelDensityNonUniformGHK(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniformGHK, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None + super(ChannelDensityNonUniformGHK, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12799,7 +12798,7 @@ def validate_NmlId(self, value): validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelDensityNonUniformGHK, self).hasContent_() ): return True @@ -12830,9 +12829,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniformGHK'): super(ChannelDensityNonUniformGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformGHK') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12842,8 +12841,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -12860,8 +12859,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -12872,7 +12871,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformGHK, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniformGHK @@ -12891,28 +12890,28 @@ class ChannelDensityNonUniformNernst(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniformNernst, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None + super(ChannelDensityNonUniformNernst, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12937,7 +12936,7 @@ def validate_NmlId(self, value): validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelDensityNonUniformNernst, self).hasContent_() ): return True @@ -12968,9 +12967,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniformNernst'): super(ChannelDensityNonUniformNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformNernst') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -12980,8 +12979,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -12998,8 +12997,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -13010,7 +13009,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformNernst, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniformNernst @@ -13029,31 +13028,31 @@ class ChannelDensityNonUniform(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, erev=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, erev=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniform, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None + super(ChannelDensityNonUniform, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None self.erev = _cast(None, erev) self.erev_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13089,7 +13088,7 @@ def validate_Nml2Quantity_voltage(self, value): validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelDensityNonUniform, self).hasContent_() ): return True @@ -13120,9 +13119,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNonUniform'): super(ChannelDensityNonUniform, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniform') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) @@ -13135,8 +13134,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -13153,8 +13152,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('erev', node) if value is not None and 'erev' not in already_processed: already_processed.add('erev') @@ -13170,7 +13169,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniform, self).buildChildren(child_, node, nodeName_, True) # end class ChannelDensityNonUniform @@ -13189,40 +13188,40 @@ class ChannelPopulation(Base): element. TODO: remove.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ionChannel', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('number', 'NonNegativeInteger', 0, 0, {'use': 'required'}), MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('segmentGroup', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variableParameter', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, ionChannel=None, number=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, number=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelPopulation, self).__init__(neuroLexId, id, **kwargs_) - self.ionChannel = _cast(None, ionChannel) - self.ionChannel_nsprefix_ = None + super(ChannelPopulation, self).__init__(neuro_lex_id, id, **kwargs_) + self.ion_channel = _cast(None, ion_channel) + self.ion_channel_nsprefix_ = None self.number = _cast(int, number) self.number_nsprefix_ = None self.erev = _cast(None, erev) self.erev_nsprefix_ = None - self.segmentGroup = _cast(None, segmentGroup) - self.segmentGroup_nsprefix_ = None - self.segment = _cast(int, segment) - self.segment_nsprefix_ = None + self.segment_groups = _cast(None, segment_groups) + self.segment_groups_nsprefix_ = None + self.segments = _cast(int, segments) + self.segments_nsprefix_ = None self.ion = _cast(None, ion) self.ion_nsprefix_ = None - if variableParameter is None: - self.variableParameter = [] + if variable_parameters is None: + self.variable_parameters = [] else: - self.variableParameter = variableParameter - self.variableParameter_nsprefix_ = None + self.variable_parameters = variable_parameters + self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13266,7 +13265,7 @@ def validate_Nml2Quantity_voltage(self, value): validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] def hasContent_(self): if ( - self.variableParameter or + self.variable_parameters or super(ChannelPopulation, self).hasContent_() ): return True @@ -13297,21 +13296,21 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelPopulation'): super(ChannelPopulation, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelPopulation') - if self.ionChannel is not None and 'ionChannel' not in already_processed: - already_processed.add('ionChannel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ionChannel), input_name='ionChannel')), )) + if self.ion_channel is not None and 'ion_channel' not in already_processed: + already_processed.add('ion_channel') + outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) if self.number is not None and 'number' not in already_processed: already_processed.add('number') outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) - if self.segmentGroup != "all" and 'segmentGroup' not in already_processed: - already_processed.add('segmentGroup') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segmentGroup), input_name='segmentGroup')), )) - if self.segment is not None and 'segment' not in already_processed: - already_processed.add('segment') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segment, input_name='segment')) + if self.segment_groups != "all" and 'segment_groups' not in already_processed: + already_processed.add('segment_groups') + outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + if self.segments is not None and 'segments' not in already_processed: + already_processed.add('segments') + outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) @@ -13321,8 +13320,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for variableParameter_ in self.variableParameter: - namespaceprefix_ = self.variableParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.variableParameter_nsprefix_) else '' + for variableParameter_ in self.variable_parameters: + namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -13339,8 +13338,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) if value is not None and 'ionChannel' not in already_processed: already_processed.add('ionChannel') - self.ionChannel = value - self.validate_NmlId(self.ionChannel) # validate type NmlId + self.ion_channel = value + self.validate_NmlId(self.ion_channel) # validate type NmlId value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') @@ -13356,15 +13355,15 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') - self.segmentGroup = value - self.validate_NmlId(self.segmentGroup) # validate type NmlId + self.segment_groups = value + self.validate_NmlId(self.segment_groups) # validate type NmlId value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segment = self.gds_parse_integer(value, node, 'segment') - if self.segment < 0: + self.segments = self.gds_parse_integer(value, node, 'segment') + if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.segment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger value = find_attr_value_('ion', node) if value is not None and 'ion' not in already_processed: already_processed.add('ion') @@ -13375,7 +13374,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.variableParameter.append(obj_) + self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelPopulation, self).buildChildren(child_, node, nodeName_, True) # end class ChannelPopulation @@ -13389,13 +13388,13 @@ class Resistivity(ValueAcrossSegOrSegGroup): ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Resistivity, self).__init__(value, segmentGroup, segment, **kwargs_) + super(Resistivity, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13468,13 +13467,13 @@ class InitMembPotential(ValueAcrossSegOrSegGroup): ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InitMembPotential, self).__init__(value, segmentGroup, segment, **kwargs_) + super(InitMembPotential, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13547,13 +13546,13 @@ class SpecificCapacitance(ValueAcrossSegOrSegGroup): ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpecificCapacitance, self).__init__(value, segmentGroup, segment, **kwargs_) + super(SpecificCapacitance, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13626,13 +13625,13 @@ class SpikeThresh(ValueAcrossSegOrSegGroup): ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segmentGroup='all', segment=None, gds_collector_=None, **kwargs_): + def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeThresh, self).__init__(value, segmentGroup, segment, **kwargs_) + super(SpikeThresh, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13703,25 +13702,25 @@ class BiophysicalProperties2CaPools(Standalone): referenced by id.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('membraneProperties2CaPools', 'MembraneProperties2CaPools', 0, 0, {'name': 'membraneProperties2CaPools', 'type': 'MembraneProperties2CaPools'}, None), - MemberSpec_('intracellularProperties2CaPools', 'IntracellularProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties2CaPools', 'type': 'IntracellularProperties2CaPools'}, None), - MemberSpec_('extracellularProperties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('membrane_properties2_ca_pools', 'MembraneProperties2CaPools', 0, 0, {'name': 'membraneProperties2CaPools', 'type': 'MembraneProperties2CaPools'}, None), + MemberSpec_('intracellular_properties2_ca_pools', 'IntracellularProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties2CaPools', 'type': 'IntracellularProperties2CaPools'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, membraneProperties2CaPools=None, intracellularProperties2CaPools=None, extracellularProperties=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties2_ca_pools=None, intracellular_properties2_ca_pools=None, extracellular_properties=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BiophysicalProperties2CaPools, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.membraneProperties2CaPools = membraneProperties2CaPools - self.membraneProperties2CaPools_nsprefix_ = None - self.intracellularProperties2CaPools = intracellularProperties2CaPools - self.intracellularProperties2CaPools_nsprefix_ = None - self.extracellularProperties = extracellularProperties - self.extracellularProperties_nsprefix_ = None + super(BiophysicalProperties2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.membrane_properties2_ca_pools = membrane_properties2_ca_pools + self.membrane_properties2_ca_pools_nsprefix_ = None + self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools + self.intracellular_properties2_ca_pools_nsprefix_ = None + self.extracellular_properties = extracellular_properties + self.extracellular_properties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13735,9 +13734,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.membraneProperties2CaPools is not None or - self.intracellularProperties2CaPools is not None or - self.extracellularProperties is not None or + self.membrane_properties2_ca_pools is not None or + self.intracellular_properties2_ca_pools is not None or + self.extracellular_properties is not None or super(BiophysicalProperties2CaPools, self).hasContent_() ): return True @@ -13774,15 +13773,15 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - if self.membraneProperties2CaPools is not None: - namespaceprefix_ = self.membraneProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.membraneProperties2CaPools_nsprefix_) else '' - self.membraneProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties2CaPools', pretty_print=pretty_print) - if self.intracellularProperties2CaPools is not None: - namespaceprefix_ = self.intracellularProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties2CaPools_nsprefix_) else '' - self.intracellularProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties2CaPools', pretty_print=pretty_print) - if self.extracellularProperties is not None: - namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' - self.extracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) + if self.membrane_properties2_ca_pools is not None: + namespaceprefix_ = self.membrane_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.membrane_properties2_ca_pools_nsprefix_) else '' + self.membrane_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties2CaPools', pretty_print=pretty_print) + if self.intracellular_properties2_ca_pools is not None: + namespaceprefix_ = self.intracellular_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties2_ca_pools_nsprefix_) else '' + self.intracellular_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties2CaPools', pretty_print=pretty_print) + if self.extracellular_properties is not None: + namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' + self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -13800,17 +13799,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'membraneProperties2CaPools': obj_ = MembraneProperties2CaPools.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.membraneProperties2CaPools = obj_ + self.membrane_properties2_ca_pools = obj_ obj_.original_tagname_ = 'membraneProperties2CaPools' elif nodeName_ == 'intracellularProperties2CaPools': obj_ = IntracellularProperties2CaPools.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.intracellularProperties2CaPools = obj_ + self.intracellular_properties2_ca_pools = obj_ obj_.original_tagname_ = 'intracellularProperties2CaPools' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.extracellularProperties = obj_ + self.extracellular_properties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class BiophysicalProperties2CaPools @@ -13822,25 +13821,25 @@ class BiophysicalProperties(Standalone): referenced by id.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('membraneProperties', 'MembraneProperties', 0, 0, {'name': 'membraneProperties', 'type': 'MembraneProperties'}, None), - MemberSpec_('intracellularProperties', 'IntracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), - MemberSpec_('extracellularProperties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('membrane_properties', 'MembraneProperties', 0, 0, {'name': 'membraneProperties', 'type': 'MembraneProperties'}, None), + MemberSpec_('intracellular_properties', 'IntracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, membraneProperties=None, intracellularProperties=None, extracellularProperties=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties=None, intracellular_properties=None, extracellular_properties=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BiophysicalProperties, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.membraneProperties = membraneProperties - self.membraneProperties_nsprefix_ = None - self.intracellularProperties = intracellularProperties - self.intracellularProperties_nsprefix_ = None - self.extracellularProperties = extracellularProperties - self.extracellularProperties_nsprefix_ = None + super(BiophysicalProperties, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.membrane_properties = membrane_properties + self.membrane_properties_nsprefix_ = None + self.intracellular_properties = intracellular_properties + self.intracellular_properties_nsprefix_ = None + self.extracellular_properties = extracellular_properties + self.extracellular_properties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13854,9 +13853,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.membraneProperties is not None or - self.intracellularProperties is not None or - self.extracellularProperties is not None or + self.membrane_properties is not None or + self.intracellular_properties is not None or + self.extracellular_properties is not None or super(BiophysicalProperties, self).hasContent_() ): return True @@ -13893,15 +13892,15 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - if self.membraneProperties is not None: - namespaceprefix_ = self.membraneProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.membraneProperties_nsprefix_) else '' - self.membraneProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties', pretty_print=pretty_print) - if self.intracellularProperties is not None: - namespaceprefix_ = self.intracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties_nsprefix_) else '' - self.intracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) - if self.extracellularProperties is not None: - namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' - self.extracellularProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) + if self.membrane_properties is not None: + namespaceprefix_ = self.membrane_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.membrane_properties_nsprefix_) else '' + self.membrane_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties', pretty_print=pretty_print) + if self.intracellular_properties is not None: + namespaceprefix_ = self.intracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties_nsprefix_) else '' + self.intracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) + if self.extracellular_properties is not None: + namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' + self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -13920,18 +13919,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class_obj_ = self.get_class_obj_(child_, MembraneProperties) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.membraneProperties = obj_ + self.membrane_properties = obj_ obj_.original_tagname_ = 'membraneProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.intracellularProperties = obj_ + self.intracellular_properties = obj_ obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.extracellularProperties = obj_ + self.extracellular_properties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties, self).buildChildren(child_, node, nodeName_, True) # end class BiophysicalProperties @@ -13947,13 +13946,13 @@ class InhomogeneousParameter(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, variable=None, metric=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, variable=None, metric=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InhomogeneousParameter, self).__init__(neuroLexId, id, **kwargs_) + super(InhomogeneousParameter, self).__init__(neuro_lex_id, id, **kwargs_) self.variable = _cast(None, variable) self.variable_nsprefix_ = None self.metric = _cast(None, metric) @@ -14079,58 +14078,58 @@ class SegmentGroup(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), + MemberSpec_('properties', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), - MemberSpec_('member', 'Member', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'member', 'type': 'Member'}, None), - MemberSpec_('include', 'Include', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'Include'}, None), - MemberSpec_('path', 'Path', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'path', 'type': 'Path'}, None), - MemberSpec_('subTree', 'SubTree', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subTree', 'type': 'SubTree'}, None), - MemberSpec_('inhomogeneousParameter', 'InhomogeneousParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inhomogeneousParameter', 'type': 'InhomogeneousParameter'}, None), + MemberSpec_('members', 'Member', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'member', 'type': 'Member'}, None), + MemberSpec_('includes', 'Include', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'Include'}, None), + MemberSpec_('paths', 'Path', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'path', 'type': 'Path'}, None), + MemberSpec_('sub_trees', 'SubTree', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subTree', 'type': 'SubTree'}, None), + MemberSpec_('inhomogeneous_parameters', 'InhomogeneousParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inhomogeneousParameter', 'type': 'InhomogeneousParameter'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, notes=None, property=None, annotation=None, member=None, include=None, path=None, subTree=None, inhomogeneousParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, notes=None, properties=None, annotation=None, members=None, includes=None, paths=None, sub_trees=None, inhomogeneous_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SegmentGroup, self).__init__(neuroLexId, id, **kwargs_) + super(SegmentGroup, self).__init__(neuro_lex_id, id, **kwargs_) self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - if property is None: - self.property = [] + if properties is None: + self.properties = [] else: - self.property = property - self.property_nsprefix_ = None + self.properties = properties + self.properties_nsprefix_ = None self.annotation = annotation self.annotation_nsprefix_ = None - if member is None: - self.member = [] - else: - self.member = member - self.member_nsprefix_ = None - if include is None: - self.include = [] - else: - self.include = include - self.include_nsprefix_ = None - if path is None: - self.path = [] - else: - self.path = path - self.path_nsprefix_ = None - if subTree is None: - self.subTree = [] - else: - self.subTree = subTree - self.subTree_nsprefix_ = None - if inhomogeneousParameter is None: - self.inhomogeneousParameter = [] - else: - self.inhomogeneousParameter = inhomogeneousParameter - self.inhomogeneousParameter_nsprefix_ = None + if members is None: + self.members = [] + else: + self.members = members + self.members_nsprefix_ = None + if includes is None: + self.includes = [] + else: + self.includes = includes + self.includes_nsprefix_ = None + if paths is None: + self.paths = [] + else: + self.paths = paths + self.paths_nsprefix_ = None + if sub_trees is None: + self.sub_trees = [] + else: + self.sub_trees = sub_trees + self.sub_trees_nsprefix_ = None + if inhomogeneous_parameters is None: + self.inhomogeneous_parameters = [] + else: + self.inhomogeneous_parameters = inhomogeneous_parameters + self.inhomogeneous_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14155,13 +14154,13 @@ def validate_Notes(self, value): def hasContent_(self): if ( self.notes is not None or - self.property or + self.properties or self.annotation is not None or - self.member or - self.include or - self.path or - self.subTree or - self.inhomogeneousParameter or + self.members or + self.includes or + self.paths or + self.sub_trees or + self.inhomogeneous_parameters or super(SegmentGroup, self).hasContent_() ): return True @@ -14202,26 +14201,26 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - for property_ in self.property: - namespaceprefix_ = self.property_nsprefix_ + ':' if (UseCapturedNS_ and self.property_nsprefix_) else '' + for property_ in self.properties: + namespaceprefix_ = self.properties_nsprefix_ + ':' if (UseCapturedNS_ and self.properties_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' self.annotation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='annotation', pretty_print=pretty_print) - for member_ in self.member: - namespaceprefix_ = self.member_nsprefix_ + ':' if (UseCapturedNS_ and self.member_nsprefix_) else '' + for member_ in self.members: + namespaceprefix_ = self.members_nsprefix_ + ':' if (UseCapturedNS_ and self.members_nsprefix_) else '' member_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='member', pretty_print=pretty_print) - for include_ in self.include: - namespaceprefix_ = self.include_nsprefix_ + ':' if (UseCapturedNS_ and self.include_nsprefix_) else '' + for include_ in self.includes: + namespaceprefix_ = self.includes_nsprefix_ + ':' if (UseCapturedNS_ and self.includes_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) - for path_ in self.path: - namespaceprefix_ = self.path_nsprefix_ + ':' if (UseCapturedNS_ and self.path_nsprefix_) else '' + for path_ in self.paths: + namespaceprefix_ = self.paths_nsprefix_ + ':' if (UseCapturedNS_ and self.paths_nsprefix_) else '' path_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='path', pretty_print=pretty_print) - for subTree_ in self.subTree: - namespaceprefix_ = self.subTree_nsprefix_ + ':' if (UseCapturedNS_ and self.subTree_nsprefix_) else '' + for subTree_ in self.sub_trees: + namespaceprefix_ = self.sub_trees_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_trees_nsprefix_) else '' subTree_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subTree', pretty_print=pretty_print) - for inhomogeneousParameter_ in self.inhomogeneousParameter: - namespaceprefix_ = self.inhomogeneousParameter_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneousParameter_nsprefix_) else '' + for inhomogeneousParameter_ in self.inhomogeneous_parameters: + namespaceprefix_ = self.inhomogeneous_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneous_parameters_nsprefix_) else '' inhomogeneousParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousParameter', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -14248,7 +14247,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.property.append(obj_) + self.properties.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) @@ -14258,27 +14257,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'member': obj_ = Member.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.member.append(obj_) + self.members.append(obj_) obj_.original_tagname_ = 'member' elif nodeName_ == 'include': obj_ = Include.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.include.append(obj_) + self.includes.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'path': obj_ = Path.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.path.append(obj_) + self.paths.append(obj_) obj_.original_tagname_ = 'path' elif nodeName_ == 'subTree': obj_ = SubTree.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.subTree.append(obj_) + self.sub_trees.append(obj_) obj_.original_tagname_ = 'subTree' elif nodeName_ == 'inhomogeneousParameter': obj_ = InhomogeneousParameter.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.inhomogeneousParameter.append(obj_) + self.inhomogeneous_parameters.append(obj_) obj_.original_tagname_ = 'inhomogeneousParameter' super(SegmentGroup, self).buildChildren(child_, node, nodeName_, True) @@ -14304,13 +14303,13 @@ class Segment(BaseNonNegativeIntegerId): ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuroLexId=None, id=None, name=None, parent=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, name=None, parent=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Segment, self).__init__(neuroLexId, id, **kwargs_) + super(Segment, self).__init__(neuro_lex_id, id, **kwargs_) self.name = _cast(None, name) self.name_nsprefix_ = None self.parent = parent @@ -14498,28 +14497,28 @@ class Morphology(Standalone): referenced by id.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment', 'Segment', 1, 0, {'maxOccurs': 'unbounded', 'name': 'segment', 'type': 'Segment'}, None), - MemberSpec_('segmentGroup', 'SegmentGroup', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'segmentGroup', 'type': 'SegmentGroup'}, None), + MemberSpec_('segments', 'Segment', 1, 0, {'maxOccurs': 'unbounded', 'name': 'segment', 'type': 'Segment'}, None), + MemberSpec_('segment_groups', 'SegmentGroup', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'segmentGroup', 'type': 'SegmentGroup'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, segment=None, segmentGroup=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, segments=None, segment_groups=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Morphology, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - if segment is None: - self.segment = [] + super(Morphology, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + if segments is None: + self.segments = [] else: - self.segment = segment - self.segment_nsprefix_ = None - if segmentGroup is None: - self.segmentGroup = [] + self.segments = segments + self.segments_nsprefix_ = None + if segment_groups is None: + self.segment_groups = [] else: - self.segmentGroup = segmentGroup - self.segmentGroup_nsprefix_ = None + self.segment_groups = segment_groups + self.segment_groups_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14533,8 +14532,8 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.segment or - self.segmentGroup or + self.segments or + self.segment_groups or super(Morphology, self).hasContent_() ): return True @@ -14571,11 +14570,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for segment_ in self.segment: - namespaceprefix_ = self.segment_nsprefix_ + ':' if (UseCapturedNS_ and self.segment_nsprefix_) else '' + for segment_ in self.segments: + namespaceprefix_ = self.segments_nsprefix_ + ':' if (UseCapturedNS_ and self.segments_nsprefix_) else '' segment_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segment', pretty_print=pretty_print) - for segmentGroup_ in self.segmentGroup: - namespaceprefix_ = self.segmentGroup_nsprefix_ + ':' if (UseCapturedNS_ and self.segmentGroup_nsprefix_) else '' + for segmentGroup_ in self.segment_groups: + namespaceprefix_ = self.segment_groups_nsprefix_ + ':' if (UseCapturedNS_ and self.segment_groups_nsprefix_) else '' segmentGroup_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segmentGroup', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -14594,12 +14593,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'segment': obj_ = Segment.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.segment.append(obj_) + self.segments.append(obj_) obj_.original_tagname_ = 'segment' elif nodeName_ == 'segmentGroup': obj_ = SegmentGroup.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.segmentGroup.append(obj_) + self.segment_groups.append(obj_) obj_.original_tagname_ = 'segmentGroup' super(Morphology, self).buildChildren(child_, node, nodeName_, True) @property @@ -14614,13 +14613,13 @@ class BaseCell(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14704,13 +14703,13 @@ class BaseSynapse(Standalone): ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14793,25 +14792,25 @@ class FixedFactorConcentrationModel(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('restingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('decayConstant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('rho', 'Nml2Quantity_rhoFactor', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, rho=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, rho=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FixedFactorConcentrationModel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(FixedFactorConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.ion = _cast(None, ion) self.ion_nsprefix_ = None - self.restingConc = _cast(None, restingConc) - self.restingConc_nsprefix_ = None - self.decayConstant = _cast(None, decayConstant) - self.decayConstant_nsprefix_ = None + self.resting_conc = _cast(None, resting_conc) + self.resting_conc_nsprefix_ = None + self.decay_constant = _cast(None, decay_constant) + self.decay_constant_nsprefix_ = None self.rho = _cast(None, rho) self.rho_nsprefix_ = None def factory(*args_, **kwargs_): @@ -14904,12 +14903,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) - if self.restingConc is not None and 'restingConc' not in already_processed: - already_processed.add('restingConc') - outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.restingConc), input_name='restingConc')), )) - if self.decayConstant is not None and 'decayConstant' not in already_processed: - already_processed.add('decayConstant') - outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decayConstant), input_name='decayConstant')), )) + if self.resting_conc is not None and 'resting_conc' not in already_processed: + already_processed.add('resting_conc') + outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.resting_conc), input_name='restingConc')), )) + if self.decay_constant is not None and 'decay_constant' not in already_processed: + already_processed.add('decay_constant') + outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decay_constant), input_name='decayConstant')), )) if self.rho is not None and 'rho' not in already_processed: already_processed.add('rho') outfile.write(' rho=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rho), input_name='rho')), )) @@ -14935,13 +14934,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('restingConc', node) if value is not None and 'restingConc' not in already_processed: already_processed.add('restingConc') - self.restingConc = value - self.validate_Nml2Quantity_concentration(self.restingConc) # validate type Nml2Quantity_concentration + self.resting_conc = value + self.validate_Nml2Quantity_concentration(self.resting_conc) # validate type Nml2Quantity_concentration value = find_attr_value_('decayConstant', node) if value is not None and 'decayConstant' not in already_processed: already_processed.add('decayConstant') - self.decayConstant = value - self.validate_Nml2Quantity_time(self.decayConstant) # validate type Nml2Quantity_time + self.decay_constant = value + self.validate_Nml2Quantity_time(self.decay_constant) # validate type Nml2Quantity_time value = find_attr_value_('rho', node) if value is not None and 'rho' not in already_processed: already_processed.add('rho') @@ -14959,27 +14958,27 @@ class DecayingPoolConcentrationModel(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('restingConc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('decayConstant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('shellThickness', 'Nml2Quantity_length', 0, 0, {'use': 'required'}), + MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('shell_thickness', 'Nml2Quantity_length', 0, 0, {'use': 'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, shellThickness=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(DecayingPoolConcentrationModel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(DecayingPoolConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.ion = _cast(None, ion) self.ion_nsprefix_ = None - self.restingConc = _cast(None, restingConc) - self.restingConc_nsprefix_ = None - self.decayConstant = _cast(None, decayConstant) - self.decayConstant_nsprefix_ = None - self.shellThickness = _cast(None, shellThickness) - self.shellThickness_nsprefix_ = None + self.resting_conc = _cast(None, resting_conc) + self.resting_conc_nsprefix_ = None + self.decay_constant = _cast(None, decay_constant) + self.decay_constant_nsprefix_ = None + self.shell_thickness = _cast(None, shell_thickness) + self.shell_thickness_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -15071,15 +15070,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) - if self.restingConc is not None and 'restingConc' not in already_processed: - already_processed.add('restingConc') - outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.restingConc), input_name='restingConc')), )) - if self.decayConstant is not None and 'decayConstant' not in already_processed: - already_processed.add('decayConstant') - outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decayConstant), input_name='decayConstant')), )) - if self.shellThickness is not None and 'shellThickness' not in already_processed: - already_processed.add('shellThickness') - outfile.write(' shellThickness=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.shellThickness), input_name='shellThickness')), )) + if self.resting_conc is not None and 'resting_conc' not in already_processed: + already_processed.add('resting_conc') + outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.resting_conc), input_name='restingConc')), )) + if self.decay_constant is not None and 'decay_constant' not in already_processed: + already_processed.add('decay_constant') + outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decay_constant), input_name='decayConstant')), )) + if self.shell_thickness is not None and 'shell_thickness' not in already_processed: + already_processed.add('shell_thickness') + outfile.write(' shellThickness=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.shell_thickness), input_name='shellThickness')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -15110,18 +15109,18 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('restingConc', node) if value is not None and 'restingConc' not in already_processed: already_processed.add('restingConc') - self.restingConc = value - self.validate_Nml2Quantity_concentration(self.restingConc) # validate type Nml2Quantity_concentration + self.resting_conc = value + self.validate_Nml2Quantity_concentration(self.resting_conc) # validate type Nml2Quantity_concentration value = find_attr_value_('decayConstant', node) if value is not None and 'decayConstant' not in already_processed: already_processed.add('decayConstant') - self.decayConstant = value - self.validate_Nml2Quantity_time(self.decayConstant) # validate type Nml2Quantity_time + self.decay_constant = value + self.validate_Nml2Quantity_time(self.decay_constant) # validate type Nml2Quantity_time value = find_attr_value_('shellThickness', node) if value is not None and 'shellThickness' not in already_processed: already_processed.add('shellThickness') - self.shellThickness = value - self.validate_Nml2Quantity_length(self.shellThickness) # validate type Nml2Quantity_length + self.shell_thickness = value + self.validate_Nml2Quantity_length(self.shell_thickness) # validate type Nml2Quantity_length value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -15136,32 +15135,32 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateFractionalSubgate(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('fractionalConductance', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('fractional_conductance', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, fractionalConductance=None, notes=None, q10Settings=None, steadyState=None, timeCourse=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, fractional_conductance=None, notes=None, q10_settings=None, steady_state=None, time_course=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateFractionalSubgate, self).__init__(neuroLexId, id, **kwargs_) - self.fractionalConductance = _cast(None, fractionalConductance) - self.fractionalConductance_nsprefix_ = None + super(GateFractionalSubgate, self).__init__(neuro_lex_id, id, **kwargs_) + self.fractional_conductance = _cast(None, fractional_conductance) + self.fractional_conductance_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15197,9 +15196,9 @@ def validate_Nml2Quantity_none(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.steadyState is not None or - self.timeCourse is not None or + self.q10_settings is not None or + self.steady_state is not None or + self.time_course is not None or super(GateFractionalSubgate, self).hasContent_() ): return True @@ -15230,9 +15229,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='GateFractionalSubgate'): super(GateFractionalSubgate, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateFractionalSubgate') - if self.fractionalConductance is not None and 'fractionalConductance' not in already_processed: - already_processed.add('fractionalConductance') - outfile.write(' fractionalConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fractionalConductance), input_name='fractionalConductance')), )) + if self.fractional_conductance is not None and 'fractional_conductance' not in already_processed: + already_processed.add('fractional_conductance') + outfile.write(' fractionalConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fractional_conductance), input_name='fractionalConductance')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateFractionalSubgate', fromsubclass_=False, pretty_print=True): super(GateFractionalSubgate, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -15243,15 +15242,15 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -15267,8 +15266,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('fractionalConductance', node) if value is not None and 'fractionalConductance' not in already_processed: already_processed.add('fractionalConductance') - self.fractionalConductance = value - self.validate_Nml2Quantity_none(self.fractionalConductance) # validate type Nml2Quantity_none + self.fractional_conductance = value + self.validate_Nml2Quantity_none(self.fractional_conductance) # validate type Nml2Quantity_none super(GateFractionalSubgate, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': @@ -15282,17 +15281,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(GateFractionalSubgate, self).buildChildren(child_, node, nodeName_, True) # end class GateFractionalSubgate @@ -15303,30 +15302,30 @@ class GateFractional(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('subGate', 'GateFractionalSubgate', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, subGate=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, sub_gates=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateFractional, self).__init__(neuroLexId, id, **kwargs_) + super(GateFractional, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - if subGate is None: - self.subGate = [] + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + if sub_gates is None: + self.sub_gates = [] else: - self.subGate = subGate - self.subGate_nsprefix_ = None + self.sub_gates = sub_gates + self.sub_gates_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15359,8 +15358,8 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.subGate or + self.q10_settings is not None or + self.sub_gates or super(GateFractional, self).hasContent_() ): return True @@ -15404,11 +15403,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - for subGate_ in self.subGate: - namespaceprefix_ = self.subGate_nsprefix_ + ':' if (UseCapturedNS_ and self.subGate_nsprefix_) else '' + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + for subGate_ in self.sub_gates: + namespaceprefix_ = self.sub_gates_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_gates_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -15442,12 +15441,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.subGate.append(obj_) + self.sub_gates.append(obj_) obj_.original_tagname_ = 'subGate' super(GateFractional, self).buildChildren(child_, node, nodeName_, True) # end class GateFractional @@ -15458,24 +15457,24 @@ class GateHHInstantaneous(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, steadyState=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, steady_state=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHInstantaneous, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHInstantaneous, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15508,7 +15507,7 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.steadyState is not None or + self.steady_state is not None or super(GateHHInstantaneous, self).hasContent_() ): return True @@ -15552,9 +15551,9 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -15587,7 +15586,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHInstantaneous, self).buildChildren(child_, node, nodeName_, True) # end class GateHHInstantaneous @@ -15598,33 +15597,33 @@ class GateHHRatesInf(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, steadyState=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, steady_state=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesInf, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHRatesInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.forwardRate = forwardRate - self.forwardRate_nsprefix_ = None - self.reverseRate = reverseRate - self.reverseRate_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.forward_rate = forward_rate + self.forward_rate_nsprefix_ = None + self.reverse_rate = reverse_rate + self.reverse_rate_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15657,10 +15656,10 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.forwardRate is not None or - self.reverseRate is not None or - self.steadyState is not None or + self.q10_settings is not None or + self.forward_rate is not None or + self.reverse_rate is not None or + self.steady_state is not None or super(GateHHRatesInf, self).hasContent_() ): return True @@ -15704,18 +15703,18 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forwardRate is not None: - namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' - self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverseRate is not None: - namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' - self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forward_rate is not None: + namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' + self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverse_rate is not None: + namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' + self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -15748,22 +15747,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardRate = obj_ + self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseRate = obj_ + self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesInf @@ -15774,33 +15773,33 @@ class GateHHRatesTau(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesTau, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHRatesTau, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.forwardRate = forwardRate - self.forwardRate_nsprefix_ = None - self.reverseRate = reverseRate - self.reverseRate_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.forward_rate = forward_rate + self.forward_rate_nsprefix_ = None + self.reverse_rate = reverse_rate + self.reverse_rate_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15833,10 +15832,10 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.forwardRate is not None or - self.reverseRate is not None or - self.timeCourse is not None or + self.q10_settings is not None or + self.forward_rate is not None or + self.reverse_rate is not None or + self.time_course is not None or super(GateHHRatesTau, self).hasContent_() ): return True @@ -15880,18 +15879,18 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forwardRate is not None: - namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' - self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverseRate is not None: - namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' - self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forward_rate is not None: + namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' + self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverse_rate is not None: + namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' + self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -15924,22 +15923,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardRate = obj_ + self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseRate = obj_ + self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(GateHHRatesTau, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesTau @@ -15950,36 +15949,36 @@ class GateHHRatesTauInf(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, steadyState=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesTauInf, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHRatesTauInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.forwardRate = forwardRate - self.forwardRate_nsprefix_ = None - self.reverseRate = reverseRate - self.reverseRate_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.forward_rate = forward_rate + self.forward_rate_nsprefix_ = None + self.reverse_rate = reverse_rate + self.reverse_rate_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16012,11 +16011,11 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.forwardRate is not None or - self.reverseRate is not None or - self.timeCourse is not None or - self.steadyState is not None or + self.q10_settings is not None or + self.forward_rate is not None or + self.reverse_rate is not None or + self.time_course is not None or + self.steady_state is not None or super(GateHHRatesTauInf, self).hasContent_() ): return True @@ -16060,21 +16059,21 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forwardRate is not None: - namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' - self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverseRate is not None: - namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' - self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forward_rate is not None: + namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' + self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverse_rate is not None: + namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' + self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -16107,27 +16106,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardRate = obj_ + self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseRate = obj_ + self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesTauInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRatesTauInf @@ -16138,30 +16137,30 @@ class GateHHTauInf(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, timeCourse=None, steadyState=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, time_course=None, steady_state=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHTauInf, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHTauInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16194,9 +16193,9 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.timeCourse is not None or - self.steadyState is not None or + self.q10_settings is not None or + self.time_course is not None or + self.steady_state is not None or super(GateHHTauInf, self).hasContent_() ): return True @@ -16240,15 +16239,15 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -16281,17 +16280,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHTauInf, self).buildChildren(child_, node, nodeName_, True) # end class GateHHTauInf @@ -16302,30 +16301,30 @@ class GateHHRates(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forwardRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverseRate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRates, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHRates, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.forwardRate = forwardRate - self.forwardRate_nsprefix_ = None - self.reverseRate = reverseRate - self.reverseRate_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.forward_rate = forward_rate + self.forward_rate_nsprefix_ = None + self.reverse_rate = reverse_rate + self.reverse_rate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16358,9 +16357,9 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.forwardRate is not None or - self.reverseRate is not None or + self.q10_settings is not None or + self.forward_rate is not None or + self.reverse_rate is not None or super(GateHHRates, self).hasContent_() ): return True @@ -16404,15 +16403,15 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forwardRate is not None: - namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' - self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverseRate is not None: - namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' - self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forward_rate is not None: + namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' + self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverse_rate is not None: + namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' + self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -16445,17 +16444,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardRate = obj_ + self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseRate = obj_ + self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' super(GateHHRates, self).buildChildren(child_, node, nodeName_, True) # end class GateHHRates @@ -16468,46 +16467,46 @@ class GateHHUndetermined(Base): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('type_', 'gateTypes', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'gateTypes', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forwardRate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverseRate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 1, {'minOccurs': '0', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steadyState', 'HHVariable', 0, 1, {'minOccurs': '0', 'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('subGate', 'GateFractionalSubgate', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'forwardRate', 'type': 'HHRate'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('time_course', 'HHTime', 0, 1, {'minOccurs': '0', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 1, {'minOccurs': '0', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, type_=None, notes=None, q10Settings=None, forwardRate=None, reverseRate=None, timeCourse=None, steadyState=None, subGate=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, type=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, sub_gates=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHUndetermined, self).__init__(neuroLexId, id, **kwargs_) + super(GateHHUndetermined, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - self.forwardRate = forwardRate - self.forwardRate_nsprefix_ = None - self.reverseRate = reverseRate - self.reverseRate_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None - if subGate is None: - self.subGate = [] - else: - self.subGate = subGate - self.subGate_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + self.forward_rate = forward_rate + self.forward_rate_nsprefix_ = None + self.reverse_rate = reverse_rate + self.reverse_rate_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None + if sub_gates is None: + self.sub_gates = [] + else: + self.sub_gates = sub_gates + self.sub_gates_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16553,12 +16552,12 @@ def validate_gateTypes(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.forwardRate is not None or - self.reverseRate is not None or - self.timeCourse is not None or - self.steadyState is not None or - self.subGate or + self.q10_settings is not None or + self.forward_rate is not None or + self.reverse_rate is not None or + self.time_course is not None or + self.steady_state is not None or + self.sub_gates or super(GateHHUndetermined, self).hasContent_() ): return True @@ -16592,9 +16591,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHUndetermined', fromsubclass_=False, pretty_print=True): super(GateHHUndetermined, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) if pretty_print: @@ -16605,23 +16604,23 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - if self.forwardRate is not None: - namespaceprefix_ = self.forwardRate_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardRate_nsprefix_) else '' - self.forwardRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) - if self.reverseRate is not None: - namespaceprefix_ = self.reverseRate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseRate_nsprefix_) else '' - self.reverseRate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - for subGate_ in self.subGate: - namespaceprefix_ = self.subGate_nsprefix_ + ':' if (UseCapturedNS_ and self.subGate_nsprefix_) else '' + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + if self.forward_rate is not None: + namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' + self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) + if self.reverse_rate is not None: + namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' + self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + for subGate_ in self.sub_gates: + namespaceprefix_ = self.sub_gates_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_gates_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -16645,8 +16644,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_gateTypes(self.type_) # validate type gateTypes + self.type = value + self.validate_gateTypes(self.type) # validate type gateTypes super(GateHHUndetermined, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): if nodeName_ == 'notes': @@ -16660,32 +16659,32 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardRate = obj_ + self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseRate = obj_ + self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.subGate.append(obj_) + self.sub_gates.append(obj_) obj_.original_tagname_ = 'subGate' super(GateHHUndetermined, self).buildChildren(child_, node, nodeName_, True) # end class GateHHUndetermined @@ -16696,54 +16695,54 @@ class GateKS(Base): member_data_items_ = [ MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10Settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('closedState', 'ClosedState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'closedState', 'type': 'ClosedState'}, None), - MemberSpec_('openState', 'OpenState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'openState', 'type': 'OpenState'}, None), - MemberSpec_('forwardTransition', 'ForwardTransition', 1, 0, {'name': 'forwardTransition', 'type': 'ForwardTransition'}, 2), - MemberSpec_('reverseTransition', 'ReverseTransition', 1, 0, {'name': 'reverseTransition', 'type': 'ReverseTransition'}, 2), - MemberSpec_('tauInfTransition', 'TauInfTransition', 1, 0, {'name': 'tauInfTransition', 'type': 'TauInfTransition'}, 2), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), + MemberSpec_('closed_states', 'ClosedState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'closedState', 'type': 'ClosedState'}, None), + MemberSpec_('open_states', 'OpenState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'openState', 'type': 'OpenState'}, None), + MemberSpec_('forward_transition', 'ForwardTransition', 1, 0, {'name': 'forwardTransition', 'type': 'ForwardTransition'}, 2), + MemberSpec_('reverse_transition', 'ReverseTransition', 1, 0, {'name': 'reverseTransition', 'type': 'ReverseTransition'}, 2), + MemberSpec_('tau_inf_transition', 'TauInfTransition', 1, 0, {'name': 'tauInfTransition', 'type': 'TauInfTransition'}, 2), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, instances=None, notes=None, q10Settings=None, closedState=None, openState=None, forwardTransition=None, reverseTransition=None, tauInfTransition=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, closed_states=None, open_states=None, forward_transition=None, reverse_transition=None, tau_inf_transition=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateKS, self).__init__(neuroLexId, id, **kwargs_) + super(GateKS, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None - self.q10Settings = q10Settings - self.q10Settings_nsprefix_ = None - if closedState is None: - self.closedState = [] - else: - self.closedState = closedState - self.closedState_nsprefix_ = None - if openState is None: - self.openState = [] - else: - self.openState = openState - self.openState_nsprefix_ = None - if forwardTransition is None: - self.forwardTransition = [] - else: - self.forwardTransition = forwardTransition - self.forwardTransition_nsprefix_ = None - if reverseTransition is None: - self.reverseTransition = [] - else: - self.reverseTransition = reverseTransition - self.reverseTransition_nsprefix_ = None - if tauInfTransition is None: - self.tauInfTransition = [] - else: - self.tauInfTransition = tauInfTransition - self.tauInfTransition_nsprefix_ = None + self.q10_settings = q10_settings + self.q10_settings_nsprefix_ = None + if closed_states is None: + self.closed_states = [] + else: + self.closed_states = closed_states + self.closed_states_nsprefix_ = None + if open_states is None: + self.open_states = [] + else: + self.open_states = open_states + self.open_states_nsprefix_ = None + if forward_transition is None: + self.forward_transition = [] + else: + self.forward_transition = forward_transition + self.forward_transition_nsprefix_ = None + if reverse_transition is None: + self.reverse_transition = [] + else: + self.reverse_transition = reverse_transition + self.reverse_transition_nsprefix_ = None + if tau_inf_transition is None: + self.tau_inf_transition = [] + else: + self.tau_inf_transition = tau_inf_transition + self.tau_inf_transition_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16776,12 +16775,12 @@ def validate_PositiveInteger(self, value): def hasContent_(self): if ( self.notes is not None or - self.q10Settings is not None or - self.closedState or - self.openState or - self.forwardTransition or - self.reverseTransition or - self.tauInfTransition or + self.q10_settings is not None or + self.closed_states or + self.open_states or + self.forward_transition or + self.reverse_transition or + self.tau_inf_transition or super(GateKS, self).hasContent_() ): return True @@ -16825,23 +16824,23 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) - if self.q10Settings is not None: - namespaceprefix_ = self.q10Settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10Settings_nsprefix_) else '' - self.q10Settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) - for closedState_ in self.closedState: - namespaceprefix_ = self.closedState_nsprefix_ + ':' if (UseCapturedNS_ and self.closedState_nsprefix_) else '' + if self.q10_settings is not None: + namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' + self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) + for closedState_ in self.closed_states: + namespaceprefix_ = self.closed_states_nsprefix_ + ':' if (UseCapturedNS_ and self.closed_states_nsprefix_) else '' closedState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='closedState', pretty_print=pretty_print) - for openState_ in self.openState: - namespaceprefix_ = self.openState_nsprefix_ + ':' if (UseCapturedNS_ and self.openState_nsprefix_) else '' + for openState_ in self.open_states: + namespaceprefix_ = self.open_states_nsprefix_ + ':' if (UseCapturedNS_ and self.open_states_nsprefix_) else '' openState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='openState', pretty_print=pretty_print) - for forwardTransition_ in self.forwardTransition: - namespaceprefix_ = self.forwardTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.forwardTransition_nsprefix_) else '' + for forwardTransition_ in self.forward_transition: + namespaceprefix_ = self.forward_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_transition_nsprefix_) else '' forwardTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardTransition', pretty_print=pretty_print) - for reverseTransition_ in self.reverseTransition: - namespaceprefix_ = self.reverseTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.reverseTransition_nsprefix_) else '' + for reverseTransition_ in self.reverse_transition: + namespaceprefix_ = self.reverse_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_transition_nsprefix_) else '' reverseTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseTransition', pretty_print=pretty_print) - for tauInfTransition_ in self.tauInfTransition: - namespaceprefix_ = self.tauInfTransition_nsprefix_ + ':' if (UseCapturedNS_ and self.tauInfTransition_nsprefix_) else '' + for tauInfTransition_ in self.tau_inf_transition: + namespaceprefix_ = self.tau_inf_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.tau_inf_transition_nsprefix_) else '' tauInfTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tauInfTransition', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -16875,32 +16874,32 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10Settings = obj_ + self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'closedState': obj_ = ClosedState.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.closedState.append(obj_) + self.closed_states.append(obj_) obj_.original_tagname_ = 'closedState' elif nodeName_ == 'openState': obj_ = OpenState.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.openState.append(obj_) + self.open_states.append(obj_) obj_.original_tagname_ = 'openState' elif nodeName_ == 'forwardTransition': obj_ = ForwardTransition.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.forwardTransition.append(obj_) + self.forward_transition.append(obj_) obj_.original_tagname_ = 'forwardTransition' elif nodeName_ == 'reverseTransition': obj_ = ReverseTransition.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.reverseTransition.append(obj_) + self.reverse_transition.append(obj_) obj_.original_tagname_ = 'reverseTransition' elif nodeName_ == 'tauInfTransition': obj_ = TauInfTransition.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.tauInfTransition.append(obj_) + self.tau_inf_transition.append(obj_) obj_.original_tagname_ = 'tauInfTransition' super(GateKS, self).buildChildren(child_, node, nodeName_, True) # end class GateKS @@ -16911,26 +16910,26 @@ class TauInfTransition(Base): member_data_items_ = [ MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('steadyState', 'HHVariable', 0, 0, {'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('timeCourse', 'HHTime', 0, 0, {'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {'name': 'timeCourse', 'type': 'HHTime'}, None), ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, from_=None, to=None, steadyState=None, timeCourse=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, steady_state=None, time_course=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TauInfTransition, self).__init__(neuroLexId, id, **kwargs_) + super(TauInfTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) self.to_nsprefix_ = None - self.steadyState = steadyState - self.steadyState_nsprefix_ = None - self.timeCourse = timeCourse - self.timeCourse_nsprefix_ = None + self.steady_state = steady_state + self.steady_state_nsprefix_ = None + self.time_course = time_course + self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16955,8 +16954,8 @@ def validate_NmlId(self, value): validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.steadyState is not None or - self.timeCourse is not None or + self.steady_state is not None or + self.time_course is not None or super(TauInfTransition, self).hasContent_() ): return True @@ -16999,12 +16998,12 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - if self.steadyState is not None: - namespaceprefix_ = self.steadyState_nsprefix_ + ':' if (UseCapturedNS_ and self.steadyState_nsprefix_) else '' - self.steadyState.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - if self.timeCourse is not None: - namespaceprefix_ = self.timeCourse_nsprefix_ + ':' if (UseCapturedNS_ and self.timeCourse_nsprefix_) else '' - self.timeCourse.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) + if self.steady_state is not None: + namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' + self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) + if self.time_course is not None: + namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' + self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -17032,12 +17031,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.steadyState = obj_ + self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timeCourse = obj_ + self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(TauInfTransition, self).buildChildren(child_, node, nodeName_, True) # end class TauInfTransition @@ -17052,13 +17051,13 @@ class ReverseTransition(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ReverseTransition, self).__init__(neuroLexId, id, **kwargs_) + super(ReverseTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) @@ -17175,13 +17174,13 @@ class ForwardTransition(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ForwardTransition, self).__init__(neuroLexId, id, **kwargs_) + super(ForwardTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) @@ -17295,13 +17294,13 @@ class OpenState(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(OpenState, self).__init__(neuroLexId, id, **kwargs_) + super(OpenState, self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17372,13 +17371,13 @@ class ClosedState(Base): ] subclass = None superclass = Base - def __init__(self, neuroLexId=None, id=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ClosedState, self).__init__(neuroLexId, id, **kwargs_) + super(ClosedState, self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17449,26 +17448,26 @@ class IonChannelKS(Standalone): member_data_items_ = [ MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), - MemberSpec_('gateKS', 'GateKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateKS', 'type': 'GateKS'}, None), + MemberSpec_('gate_kses', 'GateKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateKS', 'type': 'GateKS'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, species=None, conductance=None, gateKS=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, species=None, conductance=None, gate_kses=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelKS, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(IonChannelKS, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.species = _cast(None, species) self.species_nsprefix_ = None self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None - if gateKS is None: - self.gateKS = [] + if gate_kses is None: + self.gate_kses = [] else: - self.gateKS = gateKS - self.gateKS_nsprefix_ = None + self.gate_kses = gate_kses + self.gate_kses_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17504,7 +17503,7 @@ def validate_Nml2Quantity_conductance(self, value): validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( - self.gateKS or + self.gate_kses or super(IonChannelKS, self).hasContent_() ): return True @@ -17547,8 +17546,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for gateKS_ in self.gateKS: - namespaceprefix_ = self.gateKS_nsprefix_ + ':' if (UseCapturedNS_ and self.gateKS_nsprefix_) else '' + for gateKS_ in self.gate_kses: + namespaceprefix_ = self.gate_kses_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_kses_nsprefix_) else '' gateKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateKS', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -17577,7 +17576,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'gateKS': obj_ = GateKS.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateKS.append(obj_) + self.gate_kses.append(obj_) obj_.original_tagname_ = 'gateKS' super(IonChannelKS, self).buildChildren(child_, node, nodeName_, True) # end class IonChannelKS @@ -17586,22 +17585,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IonChannelScalable(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10ConductanceScaling', 'Q10ConductanceScaling', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'q10ConductanceScaling', 'type': 'Q10ConductanceScaling'}, None), + MemberSpec_('q10_conductance_scalings', 'Q10ConductanceScaling', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'q10ConductanceScaling', 'type': 'Q10ConductanceScaling'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelScalable, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) - if q10ConductanceScaling is None: - self.q10ConductanceScaling = [] + super(IonChannelScalable, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + if q10_conductance_scalings is None: + self.q10_conductance_scalings = [] else: - self.q10ConductanceScaling = q10ConductanceScaling - self.q10ConductanceScaling_nsprefix_ = None + self.q10_conductance_scalings = q10_conductance_scalings + self.q10_conductance_scalings_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -17616,7 +17615,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.q10ConductanceScaling or + self.q10_conductance_scalings or super(IonChannelScalable, self).hasContent_() ): return True @@ -17661,8 +17660,8 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for q10ConductanceScaling_ in self.q10ConductanceScaling: - namespaceprefix_ = self.q10ConductanceScaling_nsprefix_ + ':' if (UseCapturedNS_ and self.q10ConductanceScaling_nsprefix_) else '' + for q10ConductanceScaling_ in self.q10_conductance_scalings: + namespaceprefix_ = self.q10_conductance_scalings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_conductance_scalings_nsprefix_) else '' q10ConductanceScaling_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10ConductanceScaling', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -17685,7 +17684,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'q10ConductanceScaling': obj_ = Q10ConductanceScaling.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.q10ConductanceScaling.append(obj_) + self.q10_conductance_scalings.append(obj_) obj_.original_tagname_ = 'q10ConductanceScaling' super(IonChannelScalable, self).buildChildren(child_, node, nodeName_, True) # end class IonChannelScalable @@ -17694,59 +17693,59 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class NeuroMLDocument(Standalone): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('include', 'IncludeType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'IncludeType'}, None), - MemberSpec_('extracellularProperties', 'ExtracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), - MemberSpec_('intracellularProperties', 'IntracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), + MemberSpec_('includes', 'IncludeType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'IncludeType'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('intracellular_properties', 'IntracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), MemberSpec_('morphology', 'Morphology', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), - MemberSpec_('ionChannel', 'IonChannel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannel', 'type': 'IonChannel'}, None), - MemberSpec_('ionChannelHH', 'IonChannelHH', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelHH', 'type': 'IonChannelHH'}, None), - MemberSpec_('ionChannelVShift', 'IonChannelVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelVShift', 'type': 'IonChannelVShift'}, None), - MemberSpec_('ionChannelKS', 'IonChannelKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelKS', 'type': 'IonChannelKS'}, None), - MemberSpec_('decayingPoolConcentrationModel', 'DecayingPoolConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'decayingPoolConcentrationModel', 'type': 'DecayingPoolConcentrationModel'}, None), - MemberSpec_('fixedFactorConcentrationModel', 'FixedFactorConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fixedFactorConcentrationModel', 'type': 'FixedFactorConcentrationModel'}, None), - MemberSpec_('alphaCurrentSynapse', 'AlphaCurrentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrentSynapse', 'type': 'AlphaCurrentSynapse'}, None), - MemberSpec_('alphaSynapse', 'AlphaSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaSynapse', 'type': 'AlphaSynapse'}, None), - MemberSpec_('expOneSynapse', 'ExpOneSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expOneSynapse', 'type': 'ExpOneSynapse'}, None), - MemberSpec_('expTwoSynapse', 'ExpTwoSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expTwoSynapse', 'type': 'ExpTwoSynapse'}, None), - MemberSpec_('expThreeSynapse', 'ExpThreeSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expThreeSynapse', 'type': 'ExpThreeSynapse'}, None), - MemberSpec_('blockingPlasticSynapse', 'BlockingPlasticSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'blockingPlasticSynapse', 'type': 'BlockingPlasticSynapse'}, None), - MemberSpec_('doubleSynapse', 'DoubleSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'doubleSynapse', 'type': 'DoubleSynapse'}, None), - MemberSpec_('gapJunction', 'GapJunction', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gapJunction', 'type': 'GapJunction'}, None), - MemberSpec_('silentSynapse', 'SilentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'silentSynapse', 'type': 'SilentSynapse'}, None), - MemberSpec_('linearGradedSynapse', 'LinearGradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'linearGradedSynapse', 'type': 'LinearGradedSynapse'}, None), - MemberSpec_('gradedSynapse', 'GradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gradedSynapse', 'type': 'GradedSynapse'}, None), - MemberSpec_('biophysicalProperties', 'BiophysicalProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), - MemberSpec_('cell', 'Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell', 'type': 'Cell'}, None), - MemberSpec_('cell2CaPools', 'Cell2CaPools', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell2CaPools', 'type': 'Cell2CaPools'}, None), - MemberSpec_('baseCell', 'BaseCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'baseCell', 'type': 'BaseCell'}, None), - MemberSpec_('iafTauCell', 'IafTauCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauCell', 'type': 'IafTauCell'}, None), - MemberSpec_('iafTauRefCell', 'IafTauRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauRefCell', 'type': 'IafTauRefCell'}, None), - MemberSpec_('iafCell', 'IafCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafCell', 'type': 'IafCell'}, None), - MemberSpec_('iafRefCell', 'IafRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafRefCell', 'type': 'IafRefCell'}, None), - MemberSpec_('izhikevichCell', 'IzhikevichCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevichCell', 'type': 'IzhikevichCell'}, None), - MemberSpec_('izhikevich2007Cell', 'Izhikevich2007Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevich2007Cell', 'type': 'Izhikevich2007Cell'}, None), - MemberSpec_('adExIaFCell', 'AdExIaFCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'adExIaFCell', 'type': 'AdExIaFCell'}, None), - MemberSpec_('fitzHughNagumoCell', 'FitzHughNagumoCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumoCell', 'type': 'FitzHughNagumoCell'}, None), - MemberSpec_('fitzHughNagumo1969Cell', 'FitzHughNagumo1969Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumo1969Cell', 'type': 'FitzHughNagumo1969Cell'}, None), - MemberSpec_('pinskyRinzelCA3Cell', 'PinskyRinzelCA3Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pinskyRinzelCA3Cell', 'type': 'PinskyRinzelCA3Cell'}, None), - MemberSpec_('pulseGenerator', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), - MemberSpec_('pulseGeneratorDL', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), - MemberSpec_('sineGenerator', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), - MemberSpec_('sineGeneratorDL', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), - MemberSpec_('rampGenerator', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), - MemberSpec_('rampGeneratorDL', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), - MemberSpec_('compoundInput', 'CompoundInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInput', 'type': 'CompoundInput'}, None), - MemberSpec_('compoundInputDL', 'CompoundInputDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInputDL', 'type': 'CompoundInputDL'}, None), - MemberSpec_('voltageClamp', 'VoltageClamp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClamp', 'type': 'VoltageClamp'}, None), - MemberSpec_('voltageClampTriple', 'VoltageClampTriple', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClampTriple', 'type': 'VoltageClampTriple'}, None), - MemberSpec_('spikeArray', 'SpikeArray', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeArray', 'type': 'SpikeArray'}, None), - MemberSpec_('timedSynapticInput', 'TimedSynapticInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'timedSynapticInput', 'type': 'TimedSynapticInput'}, None), - MemberSpec_('spikeGenerator', 'SpikeGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGenerator', 'type': 'SpikeGenerator'}, None), - MemberSpec_('spikeGeneratorRandom', 'SpikeGeneratorRandom', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRandom', 'type': 'SpikeGeneratorRandom'}, None), - MemberSpec_('spikeGeneratorPoisson', 'SpikeGeneratorPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorPoisson', 'type': 'SpikeGeneratorPoisson'}, None), - MemberSpec_('spikeGeneratorRefPoisson', 'SpikeGeneratorRefPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRefPoisson', 'type': 'SpikeGeneratorRefPoisson'}, None), - MemberSpec_('poissonFiringSynapse', 'PoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'poissonFiringSynapse', 'type': 'PoissonFiringSynapse'}, None), - MemberSpec_('transientPoissonFiringSynapse', 'TransientPoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'transientPoissonFiringSynapse', 'type': 'TransientPoissonFiringSynapse'}, None), + MemberSpec_('ion_channel', 'IonChannel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannel', 'type': 'IonChannel'}, None), + MemberSpec_('ion_channel_hhs', 'IonChannelHH', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelHH', 'type': 'IonChannelHH'}, None), + MemberSpec_('ion_channel_v_shifts', 'IonChannelVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelVShift', 'type': 'IonChannelVShift'}, None), + MemberSpec_('ion_channel_kses', 'IonChannelKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelKS', 'type': 'IonChannelKS'}, None), + MemberSpec_('decaying_pool_concentration_models', 'DecayingPoolConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'decayingPoolConcentrationModel', 'type': 'DecayingPoolConcentrationModel'}, None), + MemberSpec_('fixed_factor_concentration_models', 'FixedFactorConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fixedFactorConcentrationModel', 'type': 'FixedFactorConcentrationModel'}, None), + MemberSpec_('alpha_current_synapses', 'AlphaCurrentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrentSynapse', 'type': 'AlphaCurrentSynapse'}, None), + MemberSpec_('alpha_synapses', 'AlphaSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaSynapse', 'type': 'AlphaSynapse'}, None), + MemberSpec_('exp_one_synapses', 'ExpOneSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expOneSynapse', 'type': 'ExpOneSynapse'}, None), + MemberSpec_('exp_two_synapses', 'ExpTwoSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expTwoSynapse', 'type': 'ExpTwoSynapse'}, None), + MemberSpec_('exp_three_synapses', 'ExpThreeSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expThreeSynapse', 'type': 'ExpThreeSynapse'}, None), + MemberSpec_('blocking_plastic_synapses', 'BlockingPlasticSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'blockingPlasticSynapse', 'type': 'BlockingPlasticSynapse'}, None), + MemberSpec_('double_synapses', 'DoubleSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'doubleSynapse', 'type': 'DoubleSynapse'}, None), + MemberSpec_('gap_junctions', 'GapJunction', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gapJunction', 'type': 'GapJunction'}, None), + MemberSpec_('silent_synapses', 'SilentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'silentSynapse', 'type': 'SilentSynapse'}, None), + MemberSpec_('linear_graded_synapses', 'LinearGradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'linearGradedSynapse', 'type': 'LinearGradedSynapse'}, None), + MemberSpec_('graded_synapses', 'GradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gradedSynapse', 'type': 'GradedSynapse'}, None), + MemberSpec_('biophysical_properties', 'BiophysicalProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), + MemberSpec_('cells', 'Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell', 'type': 'Cell'}, None), + MemberSpec_('cell2_ca_poolses', 'Cell2CaPools', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell2CaPools', 'type': 'Cell2CaPools'}, None), + MemberSpec_('base_cells', 'BaseCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'baseCell', 'type': 'BaseCell'}, None), + MemberSpec_('iaf_tau_cells', 'IafTauCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauCell', 'type': 'IafTauCell'}, None), + MemberSpec_('iaf_tau_ref_cells', 'IafTauRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauRefCell', 'type': 'IafTauRefCell'}, None), + MemberSpec_('iaf_cells', 'IafCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafCell', 'type': 'IafCell'}, None), + MemberSpec_('iaf_ref_cells', 'IafRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafRefCell', 'type': 'IafRefCell'}, None), + MemberSpec_('izhikevich_cells', 'IzhikevichCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevichCell', 'type': 'IzhikevichCell'}, None), + MemberSpec_('izhikevich2007_cells', 'Izhikevich2007Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevich2007Cell', 'type': 'Izhikevich2007Cell'}, None), + MemberSpec_('ad_ex_ia_f_cells', 'AdExIaFCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'adExIaFCell', 'type': 'AdExIaFCell'}, None), + MemberSpec_('fitz_hugh_nagumo_cells', 'FitzHughNagumoCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumoCell', 'type': 'FitzHughNagumoCell'}, None), + MemberSpec_('fitz_hugh_nagumo1969_cells', 'FitzHughNagumo1969Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumo1969Cell', 'type': 'FitzHughNagumo1969Cell'}, None), + MemberSpec_('pinsky_rinzel_ca3_cells', 'PinskyRinzelCA3Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pinskyRinzelCA3Cell', 'type': 'PinskyRinzelCA3Cell'}, None), + MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), + MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), + MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), + MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), + MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), + MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), + MemberSpec_('compound_inputs', 'CompoundInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInput', 'type': 'CompoundInput'}, None), + MemberSpec_('compound_input_dls', 'CompoundInputDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInputDL', 'type': 'CompoundInputDL'}, None), + MemberSpec_('voltage_clamps', 'VoltageClamp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClamp', 'type': 'VoltageClamp'}, None), + MemberSpec_('voltage_clamp_triples', 'VoltageClampTriple', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClampTriple', 'type': 'VoltageClampTriple'}, None), + MemberSpec_('spike_arrays', 'SpikeArray', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeArray', 'type': 'SpikeArray'}, None), + MemberSpec_('timed_synaptic_inputs', 'TimedSynapticInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'timedSynapticInput', 'type': 'TimedSynapticInput'}, None), + MemberSpec_('spike_generators', 'SpikeGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGenerator', 'type': 'SpikeGenerator'}, None), + MemberSpec_('spike_generator_randoms', 'SpikeGeneratorRandom', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRandom', 'type': 'SpikeGeneratorRandom'}, None), + MemberSpec_('spike_generator_poissons', 'SpikeGeneratorPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorPoisson', 'type': 'SpikeGeneratorPoisson'}, None), + MemberSpec_('spike_generator_ref_poissons', 'SpikeGeneratorRefPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRefPoisson', 'type': 'SpikeGeneratorRefPoisson'}, None), + MemberSpec_('poisson_firing_synapses', 'PoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'poissonFiringSynapse', 'type': 'PoissonFiringSynapse'}, None), + MemberSpec_('transient_poisson_firing_synapses', 'TransientPoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'transientPoissonFiringSynapse', 'type': 'TransientPoissonFiringSynapse'}, None), MemberSpec_('IF_curr_alpha', 'IF_curr_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_alpha', 'type': 'IF_curr_alpha'}, None), MemberSpec_('IF_curr_exp', 'IF_curr_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_exp', 'type': 'IF_curr_exp'}, None), MemberSpec_('IF_cond_alpha', 'IF_cond_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_cond_alpha', 'type': 'IF_cond_alpha'}, None), @@ -17754,288 +17753,288 @@ class NeuroMLDocument(Standalone): MemberSpec_('EIF_cond_exp_isfa_ista', 'EIF_cond_exp_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_exp_isfa_ista', 'type': 'EIF_cond_exp_isfa_ista'}, None), MemberSpec_('EIF_cond_alpha_isfa_ista', 'EIF_cond_alpha_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_alpha_isfa_ista', 'type': 'EIF_cond_alpha_isfa_ista'}, None), MemberSpec_('HH_cond_exp', 'HH_cond_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'HH_cond_exp', 'type': 'HH_cond_exp'}, None), - MemberSpec_('expCondSynapse', 'ExpCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCondSynapse', 'type': 'ExpCondSynapse'}, None), - MemberSpec_('alphaCondSynapse', 'AlphaCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCondSynapse', 'type': 'AlphaCondSynapse'}, None), - MemberSpec_('expCurrSynapse', 'ExpCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCurrSynapse', 'type': 'ExpCurrSynapse'}, None), - MemberSpec_('alphaCurrSynapse', 'AlphaCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrSynapse', 'type': 'AlphaCurrSynapse'}, None), + MemberSpec_('exp_cond_synapses', 'ExpCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCondSynapse', 'type': 'ExpCondSynapse'}, None), + MemberSpec_('alpha_cond_synapses', 'AlphaCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCondSynapse', 'type': 'AlphaCondSynapse'}, None), + MemberSpec_('exp_curr_synapses', 'ExpCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCurrSynapse', 'type': 'ExpCurrSynapse'}, None), + MemberSpec_('alpha_curr_synapses', 'AlphaCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrSynapse', 'type': 'AlphaCurrSynapse'}, None), MemberSpec_('SpikeSourcePoisson', 'SpikeSourcePoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'SpikeSourcePoisson', 'type': 'SpikeSourcePoisson'}, None), - MemberSpec_('network', 'Network', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'network', 'type': 'Network'}, None), + MemberSpec_('networks', 'Network', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'network', 'type': 'Network'}, None), MemberSpec_('ComponentType', 'ComponentType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ComponentType', 'type': 'ComponentType'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, include=None, extracellularProperties=None, intracellularProperties=None, morphology=None, ionChannel=None, ionChannelHH=None, ionChannelVShift=None, ionChannelKS=None, decayingPoolConcentrationModel=None, fixedFactorConcentrationModel=None, alphaCurrentSynapse=None, alphaSynapse=None, expOneSynapse=None, expTwoSynapse=None, expThreeSynapse=None, blockingPlasticSynapse=None, doubleSynapse=None, gapJunction=None, silentSynapse=None, linearGradedSynapse=None, gradedSynapse=None, biophysicalProperties=None, cell=None, cell2CaPools=None, baseCell=None, iafTauCell=None, iafTauRefCell=None, iafCell=None, iafRefCell=None, izhikevichCell=None, izhikevich2007Cell=None, adExIaFCell=None, fitzHughNagumoCell=None, fitzHughNagumo1969Cell=None, pinskyRinzelCA3Cell=None, pulseGenerator=None, pulseGeneratorDL=None, sineGenerator=None, sineGeneratorDL=None, rampGenerator=None, rampGeneratorDL=None, compoundInput=None, compoundInputDL=None, voltageClamp=None, voltageClampTriple=None, spikeArray=None, timedSynapticInput=None, spikeGenerator=None, spikeGeneratorRandom=None, spikeGeneratorPoisson=None, spikeGeneratorRefPoisson=None, poissonFiringSynapse=None, transientPoissonFiringSynapse=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, expCondSynapse=None, alphaCondSynapse=None, expCurrSynapse=None, alphaCurrSynapse=None, SpikeSourcePoisson=None, network=None, ComponentType=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, includes=None, extracellular_properties=None, intracellular_properties=None, morphology=None, ion_channel=None, ion_channel_hhs=None, ion_channel_v_shifts=None, ion_channel_kses=None, decaying_pool_concentration_models=None, fixed_factor_concentration_models=None, alpha_current_synapses=None, alpha_synapses=None, exp_one_synapses=None, exp_two_synapses=None, exp_three_synapses=None, blocking_plastic_synapses=None, double_synapses=None, gap_junctions=None, silent_synapses=None, linear_graded_synapses=None, graded_synapses=None, biophysical_properties=None, cells=None, cell2_ca_poolses=None, base_cells=None, iaf_tau_cells=None, iaf_tau_ref_cells=None, iaf_cells=None, iaf_ref_cells=None, izhikevich_cells=None, izhikevich2007_cells=None, ad_ex_ia_f_cells=None, fitz_hugh_nagumo_cells=None, fitz_hugh_nagumo1969_cells=None, pinsky_rinzel_ca3_cells=None, pulse_generators=None, pulse_generator_dls=None, sine_generators=None, sine_generator_dls=None, ramp_generators=None, ramp_generator_dls=None, compound_inputs=None, compound_input_dls=None, voltage_clamps=None, voltage_clamp_triples=None, spike_arrays=None, timed_synaptic_inputs=None, spike_generators=None, spike_generator_randoms=None, spike_generator_poissons=None, spike_generator_ref_poissons=None, poisson_firing_synapses=None, transient_poisson_firing_synapses=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, exp_cond_synapses=None, alpha_cond_synapses=None, exp_curr_synapses=None, alpha_curr_synapses=None, SpikeSourcePoisson=None, networks=None, ComponentType=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(NeuroMLDocument, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - if include is None: - self.include = [] - else: - self.include = include - self.include_nsprefix_ = None - if extracellularProperties is None: - self.extracellularProperties = [] - else: - self.extracellularProperties = extracellularProperties - self.extracellularProperties_nsprefix_ = None - if intracellularProperties is None: - self.intracellularProperties = [] - else: - self.intracellularProperties = intracellularProperties - self.intracellularProperties_nsprefix_ = None + super(NeuroMLDocument, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + if includes is None: + self.includes = [] + else: + self.includes = includes + self.includes_nsprefix_ = None + if extracellular_properties is None: + self.extracellular_properties = [] + else: + self.extracellular_properties = extracellular_properties + self.extracellular_properties_nsprefix_ = None + if intracellular_properties is None: + self.intracellular_properties = [] + else: + self.intracellular_properties = intracellular_properties + self.intracellular_properties_nsprefix_ = None if morphology is None: self.morphology = [] else: self.morphology = morphology self.morphology_nsprefix_ = None - if ionChannel is None: - self.ionChannel = [] - else: - self.ionChannel = ionChannel - self.ionChannel_nsprefix_ = None - if ionChannelHH is None: - self.ionChannelHH = [] - else: - self.ionChannelHH = ionChannelHH - self.ionChannelHH_nsprefix_ = None - if ionChannelVShift is None: - self.ionChannelVShift = [] - else: - self.ionChannelVShift = ionChannelVShift - self.ionChannelVShift_nsprefix_ = None - if ionChannelKS is None: - self.ionChannelKS = [] - else: - self.ionChannelKS = ionChannelKS - self.ionChannelKS_nsprefix_ = None - if decayingPoolConcentrationModel is None: - self.decayingPoolConcentrationModel = [] - else: - self.decayingPoolConcentrationModel = decayingPoolConcentrationModel - self.decayingPoolConcentrationModel_nsprefix_ = None - if fixedFactorConcentrationModel is None: - self.fixedFactorConcentrationModel = [] - else: - self.fixedFactorConcentrationModel = fixedFactorConcentrationModel - self.fixedFactorConcentrationModel_nsprefix_ = None - if alphaCurrentSynapse is None: - self.alphaCurrentSynapse = [] - else: - self.alphaCurrentSynapse = alphaCurrentSynapse - self.alphaCurrentSynapse_nsprefix_ = None - if alphaSynapse is None: - self.alphaSynapse = [] - else: - self.alphaSynapse = alphaSynapse - self.alphaSynapse_nsprefix_ = None - if expOneSynapse is None: - self.expOneSynapse = [] - else: - self.expOneSynapse = expOneSynapse - self.expOneSynapse_nsprefix_ = None - if expTwoSynapse is None: - self.expTwoSynapse = [] - else: - self.expTwoSynapse = expTwoSynapse - self.expTwoSynapse_nsprefix_ = None - if expThreeSynapse is None: - self.expThreeSynapse = [] - else: - self.expThreeSynapse = expThreeSynapse - self.expThreeSynapse_nsprefix_ = None - if blockingPlasticSynapse is None: - self.blockingPlasticSynapse = [] - else: - self.blockingPlasticSynapse = blockingPlasticSynapse - self.blockingPlasticSynapse_nsprefix_ = None - if doubleSynapse is None: - self.doubleSynapse = [] - else: - self.doubleSynapse = doubleSynapse - self.doubleSynapse_nsprefix_ = None - if gapJunction is None: - self.gapJunction = [] - else: - self.gapJunction = gapJunction - self.gapJunction_nsprefix_ = None - if silentSynapse is None: - self.silentSynapse = [] - else: - self.silentSynapse = silentSynapse - self.silentSynapse_nsprefix_ = None - if linearGradedSynapse is None: - self.linearGradedSynapse = [] - else: - self.linearGradedSynapse = linearGradedSynapse - self.linearGradedSynapse_nsprefix_ = None - if gradedSynapse is None: - self.gradedSynapse = [] - else: - self.gradedSynapse = gradedSynapse - self.gradedSynapse_nsprefix_ = None - if biophysicalProperties is None: - self.biophysicalProperties = [] - else: - self.biophysicalProperties = biophysicalProperties - self.biophysicalProperties_nsprefix_ = None - if cell is None: - self.cell = [] - else: - self.cell = cell - self.cell_nsprefix_ = None - if cell2CaPools is None: - self.cell2CaPools = [] - else: - self.cell2CaPools = cell2CaPools - self.cell2CaPools_nsprefix_ = None - if baseCell is None: - self.baseCell = [] - else: - self.baseCell = baseCell - self.baseCell_nsprefix_ = None - if iafTauCell is None: - self.iafTauCell = [] - else: - self.iafTauCell = iafTauCell - self.iafTauCell_nsprefix_ = None - if iafTauRefCell is None: - self.iafTauRefCell = [] - else: - self.iafTauRefCell = iafTauRefCell - self.iafTauRefCell_nsprefix_ = None - if iafCell is None: - self.iafCell = [] - else: - self.iafCell = iafCell - self.iafCell_nsprefix_ = None - if iafRefCell is None: - self.iafRefCell = [] - else: - self.iafRefCell = iafRefCell - self.iafRefCell_nsprefix_ = None - if izhikevichCell is None: - self.izhikevichCell = [] - else: - self.izhikevichCell = izhikevichCell - self.izhikevichCell_nsprefix_ = None - if izhikevich2007Cell is None: - self.izhikevich2007Cell = [] - else: - self.izhikevich2007Cell = izhikevich2007Cell - self.izhikevich2007Cell_nsprefix_ = None - if adExIaFCell is None: - self.adExIaFCell = [] - else: - self.adExIaFCell = adExIaFCell - self.adExIaFCell_nsprefix_ = None - if fitzHughNagumoCell is None: - self.fitzHughNagumoCell = [] - else: - self.fitzHughNagumoCell = fitzHughNagumoCell - self.fitzHughNagumoCell_nsprefix_ = None - if fitzHughNagumo1969Cell is None: - self.fitzHughNagumo1969Cell = [] - else: - self.fitzHughNagumo1969Cell = fitzHughNagumo1969Cell - self.fitzHughNagumo1969Cell_nsprefix_ = None - if pinskyRinzelCA3Cell is None: - self.pinskyRinzelCA3Cell = [] - else: - self.pinskyRinzelCA3Cell = pinskyRinzelCA3Cell - self.pinskyRinzelCA3Cell_nsprefix_ = None - if pulseGenerator is None: - self.pulseGenerator = [] - else: - self.pulseGenerator = pulseGenerator - self.pulseGenerator_nsprefix_ = None - if pulseGeneratorDL is None: - self.pulseGeneratorDL = [] - else: - self.pulseGeneratorDL = pulseGeneratorDL - self.pulseGeneratorDL_nsprefix_ = None - if sineGenerator is None: - self.sineGenerator = [] - else: - self.sineGenerator = sineGenerator - self.sineGenerator_nsprefix_ = None - if sineGeneratorDL is None: - self.sineGeneratorDL = [] - else: - self.sineGeneratorDL = sineGeneratorDL - self.sineGeneratorDL_nsprefix_ = None - if rampGenerator is None: - self.rampGenerator = [] - else: - self.rampGenerator = rampGenerator - self.rampGenerator_nsprefix_ = None - if rampGeneratorDL is None: - self.rampGeneratorDL = [] - else: - self.rampGeneratorDL = rampGeneratorDL - self.rampGeneratorDL_nsprefix_ = None - if compoundInput is None: - self.compoundInput = [] - else: - self.compoundInput = compoundInput - self.compoundInput_nsprefix_ = None - if compoundInputDL is None: - self.compoundInputDL = [] - else: - self.compoundInputDL = compoundInputDL - self.compoundInputDL_nsprefix_ = None - if voltageClamp is None: - self.voltageClamp = [] - else: - self.voltageClamp = voltageClamp - self.voltageClamp_nsprefix_ = None - if voltageClampTriple is None: - self.voltageClampTriple = [] - else: - self.voltageClampTriple = voltageClampTriple - self.voltageClampTriple_nsprefix_ = None - if spikeArray is None: - self.spikeArray = [] - else: - self.spikeArray = spikeArray - self.spikeArray_nsprefix_ = None - if timedSynapticInput is None: - self.timedSynapticInput = [] - else: - self.timedSynapticInput = timedSynapticInput - self.timedSynapticInput_nsprefix_ = None - if spikeGenerator is None: - self.spikeGenerator = [] - else: - self.spikeGenerator = spikeGenerator - self.spikeGenerator_nsprefix_ = None - if spikeGeneratorRandom is None: - self.spikeGeneratorRandom = [] - else: - self.spikeGeneratorRandom = spikeGeneratorRandom - self.spikeGeneratorRandom_nsprefix_ = None - if spikeGeneratorPoisson is None: - self.spikeGeneratorPoisson = [] - else: - self.spikeGeneratorPoisson = spikeGeneratorPoisson - self.spikeGeneratorPoisson_nsprefix_ = None - if spikeGeneratorRefPoisson is None: - self.spikeGeneratorRefPoisson = [] - else: - self.spikeGeneratorRefPoisson = spikeGeneratorRefPoisson - self.spikeGeneratorRefPoisson_nsprefix_ = None - if poissonFiringSynapse is None: - self.poissonFiringSynapse = [] - else: - self.poissonFiringSynapse = poissonFiringSynapse - self.poissonFiringSynapse_nsprefix_ = None - if transientPoissonFiringSynapse is None: - self.transientPoissonFiringSynapse = [] - else: - self.transientPoissonFiringSynapse = transientPoissonFiringSynapse - self.transientPoissonFiringSynapse_nsprefix_ = None + if ion_channel is None: + self.ion_channel = [] + else: + self.ion_channel = ion_channel + self.ion_channel_nsprefix_ = None + if ion_channel_hhs is None: + self.ion_channel_hhs = [] + else: + self.ion_channel_hhs = ion_channel_hhs + self.ion_channel_hhs_nsprefix_ = None + if ion_channel_v_shifts is None: + self.ion_channel_v_shifts = [] + else: + self.ion_channel_v_shifts = ion_channel_v_shifts + self.ion_channel_v_shifts_nsprefix_ = None + if ion_channel_kses is None: + self.ion_channel_kses = [] + else: + self.ion_channel_kses = ion_channel_kses + self.ion_channel_kses_nsprefix_ = None + if decaying_pool_concentration_models is None: + self.decaying_pool_concentration_models = [] + else: + self.decaying_pool_concentration_models = decaying_pool_concentration_models + self.decaying_pool_concentration_models_nsprefix_ = None + if fixed_factor_concentration_models is None: + self.fixed_factor_concentration_models = [] + else: + self.fixed_factor_concentration_models = fixed_factor_concentration_models + self.fixed_factor_concentration_models_nsprefix_ = None + if alpha_current_synapses is None: + self.alpha_current_synapses = [] + else: + self.alpha_current_synapses = alpha_current_synapses + self.alpha_current_synapses_nsprefix_ = None + if alpha_synapses is None: + self.alpha_synapses = [] + else: + self.alpha_synapses = alpha_synapses + self.alpha_synapses_nsprefix_ = None + if exp_one_synapses is None: + self.exp_one_synapses = [] + else: + self.exp_one_synapses = exp_one_synapses + self.exp_one_synapses_nsprefix_ = None + if exp_two_synapses is None: + self.exp_two_synapses = [] + else: + self.exp_two_synapses = exp_two_synapses + self.exp_two_synapses_nsprefix_ = None + if exp_three_synapses is None: + self.exp_three_synapses = [] + else: + self.exp_three_synapses = exp_three_synapses + self.exp_three_synapses_nsprefix_ = None + if blocking_plastic_synapses is None: + self.blocking_plastic_synapses = [] + else: + self.blocking_plastic_synapses = blocking_plastic_synapses + self.blocking_plastic_synapses_nsprefix_ = None + if double_synapses is None: + self.double_synapses = [] + else: + self.double_synapses = double_synapses + self.double_synapses_nsprefix_ = None + if gap_junctions is None: + self.gap_junctions = [] + else: + self.gap_junctions = gap_junctions + self.gap_junctions_nsprefix_ = None + if silent_synapses is None: + self.silent_synapses = [] + else: + self.silent_synapses = silent_synapses + self.silent_synapses_nsprefix_ = None + if linear_graded_synapses is None: + self.linear_graded_synapses = [] + else: + self.linear_graded_synapses = linear_graded_synapses + self.linear_graded_synapses_nsprefix_ = None + if graded_synapses is None: + self.graded_synapses = [] + else: + self.graded_synapses = graded_synapses + self.graded_synapses_nsprefix_ = None + if biophysical_properties is None: + self.biophysical_properties = [] + else: + self.biophysical_properties = biophysical_properties + self.biophysical_properties_nsprefix_ = None + if cells is None: + self.cells = [] + else: + self.cells = cells + self.cells_nsprefix_ = None + if cell2_ca_poolses is None: + self.cell2_ca_poolses = [] + else: + self.cell2_ca_poolses = cell2_ca_poolses + self.cell2_ca_poolses_nsprefix_ = None + if base_cells is None: + self.base_cells = [] + else: + self.base_cells = base_cells + self.base_cells_nsprefix_ = None + if iaf_tau_cells is None: + self.iaf_tau_cells = [] + else: + self.iaf_tau_cells = iaf_tau_cells + self.iaf_tau_cells_nsprefix_ = None + if iaf_tau_ref_cells is None: + self.iaf_tau_ref_cells = [] + else: + self.iaf_tau_ref_cells = iaf_tau_ref_cells + self.iaf_tau_ref_cells_nsprefix_ = None + if iaf_cells is None: + self.iaf_cells = [] + else: + self.iaf_cells = iaf_cells + self.iaf_cells_nsprefix_ = None + if iaf_ref_cells is None: + self.iaf_ref_cells = [] + else: + self.iaf_ref_cells = iaf_ref_cells + self.iaf_ref_cells_nsprefix_ = None + if izhikevich_cells is None: + self.izhikevich_cells = [] + else: + self.izhikevich_cells = izhikevich_cells + self.izhikevich_cells_nsprefix_ = None + if izhikevich2007_cells is None: + self.izhikevich2007_cells = [] + else: + self.izhikevich2007_cells = izhikevich2007_cells + self.izhikevich2007_cells_nsprefix_ = None + if ad_ex_ia_f_cells is None: + self.ad_ex_ia_f_cells = [] + else: + self.ad_ex_ia_f_cells = ad_ex_ia_f_cells + self.ad_ex_ia_f_cells_nsprefix_ = None + if fitz_hugh_nagumo_cells is None: + self.fitz_hugh_nagumo_cells = [] + else: + self.fitz_hugh_nagumo_cells = fitz_hugh_nagumo_cells + self.fitz_hugh_nagumo_cells_nsprefix_ = None + if fitz_hugh_nagumo1969_cells is None: + self.fitz_hugh_nagumo1969_cells = [] + else: + self.fitz_hugh_nagumo1969_cells = fitz_hugh_nagumo1969_cells + self.fitz_hugh_nagumo1969_cells_nsprefix_ = None + if pinsky_rinzel_ca3_cells is None: + self.pinsky_rinzel_ca3_cells = [] + else: + self.pinsky_rinzel_ca3_cells = pinsky_rinzel_ca3_cells + self.pinsky_rinzel_ca3_cells_nsprefix_ = None + if pulse_generators is None: + self.pulse_generators = [] + else: + self.pulse_generators = pulse_generators + self.pulse_generators_nsprefix_ = None + if pulse_generator_dls is None: + self.pulse_generator_dls = [] + else: + self.pulse_generator_dls = pulse_generator_dls + self.pulse_generator_dls_nsprefix_ = None + if sine_generators is None: + self.sine_generators = [] + else: + self.sine_generators = sine_generators + self.sine_generators_nsprefix_ = None + if sine_generator_dls is None: + self.sine_generator_dls = [] + else: + self.sine_generator_dls = sine_generator_dls + self.sine_generator_dls_nsprefix_ = None + if ramp_generators is None: + self.ramp_generators = [] + else: + self.ramp_generators = ramp_generators + self.ramp_generators_nsprefix_ = None + if ramp_generator_dls is None: + self.ramp_generator_dls = [] + else: + self.ramp_generator_dls = ramp_generator_dls + self.ramp_generator_dls_nsprefix_ = None + if compound_inputs is None: + self.compound_inputs = [] + else: + self.compound_inputs = compound_inputs + self.compound_inputs_nsprefix_ = None + if compound_input_dls is None: + self.compound_input_dls = [] + else: + self.compound_input_dls = compound_input_dls + self.compound_input_dls_nsprefix_ = None + if voltage_clamps is None: + self.voltage_clamps = [] + else: + self.voltage_clamps = voltage_clamps + self.voltage_clamps_nsprefix_ = None + if voltage_clamp_triples is None: + self.voltage_clamp_triples = [] + else: + self.voltage_clamp_triples = voltage_clamp_triples + self.voltage_clamp_triples_nsprefix_ = None + if spike_arrays is None: + self.spike_arrays = [] + else: + self.spike_arrays = spike_arrays + self.spike_arrays_nsprefix_ = None + if timed_synaptic_inputs is None: + self.timed_synaptic_inputs = [] + else: + self.timed_synaptic_inputs = timed_synaptic_inputs + self.timed_synaptic_inputs_nsprefix_ = None + if spike_generators is None: + self.spike_generators = [] + else: + self.spike_generators = spike_generators + self.spike_generators_nsprefix_ = None + if spike_generator_randoms is None: + self.spike_generator_randoms = [] + else: + self.spike_generator_randoms = spike_generator_randoms + self.spike_generator_randoms_nsprefix_ = None + if spike_generator_poissons is None: + self.spike_generator_poissons = [] + else: + self.spike_generator_poissons = spike_generator_poissons + self.spike_generator_poissons_nsprefix_ = None + if spike_generator_ref_poissons is None: + self.spike_generator_ref_poissons = [] + else: + self.spike_generator_ref_poissons = spike_generator_ref_poissons + self.spike_generator_ref_poissons_nsprefix_ = None + if poisson_firing_synapses is None: + self.poisson_firing_synapses = [] + else: + self.poisson_firing_synapses = poisson_firing_synapses + self.poisson_firing_synapses_nsprefix_ = None + if transient_poisson_firing_synapses is None: + self.transient_poisson_firing_synapses = [] + else: + self.transient_poisson_firing_synapses = transient_poisson_firing_synapses + self.transient_poisson_firing_synapses_nsprefix_ = None if IF_curr_alpha is None: self.IF_curr_alpha = [] else: @@ -18071,36 +18070,36 @@ def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=N else: self.HH_cond_exp = HH_cond_exp self.HH_cond_exp_nsprefix_ = None - if expCondSynapse is None: - self.expCondSynapse = [] - else: - self.expCondSynapse = expCondSynapse - self.expCondSynapse_nsprefix_ = None - if alphaCondSynapse is None: - self.alphaCondSynapse = [] - else: - self.alphaCondSynapse = alphaCondSynapse - self.alphaCondSynapse_nsprefix_ = None - if expCurrSynapse is None: - self.expCurrSynapse = [] - else: - self.expCurrSynapse = expCurrSynapse - self.expCurrSynapse_nsprefix_ = None - if alphaCurrSynapse is None: - self.alphaCurrSynapse = [] - else: - self.alphaCurrSynapse = alphaCurrSynapse - self.alphaCurrSynapse_nsprefix_ = None + if exp_cond_synapses is None: + self.exp_cond_synapses = [] + else: + self.exp_cond_synapses = exp_cond_synapses + self.exp_cond_synapses_nsprefix_ = None + if alpha_cond_synapses is None: + self.alpha_cond_synapses = [] + else: + self.alpha_cond_synapses = alpha_cond_synapses + self.alpha_cond_synapses_nsprefix_ = None + if exp_curr_synapses is None: + self.exp_curr_synapses = [] + else: + self.exp_curr_synapses = exp_curr_synapses + self.exp_curr_synapses_nsprefix_ = None + if alpha_curr_synapses is None: + self.alpha_curr_synapses = [] + else: + self.alpha_curr_synapses = alpha_curr_synapses + self.alpha_curr_synapses_nsprefix_ = None if SpikeSourcePoisson is None: self.SpikeSourcePoisson = [] else: self.SpikeSourcePoisson = SpikeSourcePoisson self.SpikeSourcePoisson_nsprefix_ = None - if network is None: - self.network = [] + if networks is None: + self.networks = [] else: - self.network = network - self.network_nsprefix_ = None + self.networks = networks + self.networks_nsprefix_ = None if ComponentType is None: self.ComponentType = [] else: @@ -18119,59 +18118,59 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.include or - self.extracellularProperties or - self.intracellularProperties or + self.includes or + self.extracellular_properties or + self.intracellular_properties or self.morphology or - self.ionChannel or - self.ionChannelHH or - self.ionChannelVShift or - self.ionChannelKS or - self.decayingPoolConcentrationModel or - self.fixedFactorConcentrationModel or - self.alphaCurrentSynapse or - self.alphaSynapse or - self.expOneSynapse or - self.expTwoSynapse or - self.expThreeSynapse or - self.blockingPlasticSynapse or - self.doubleSynapse or - self.gapJunction or - self.silentSynapse or - self.linearGradedSynapse or - self.gradedSynapse or - self.biophysicalProperties or - self.cell or - self.cell2CaPools or - self.baseCell or - self.iafTauCell or - self.iafTauRefCell or - self.iafCell or - self.iafRefCell or - self.izhikevichCell or - self.izhikevich2007Cell or - self.adExIaFCell or - self.fitzHughNagumoCell or - self.fitzHughNagumo1969Cell or - self.pinskyRinzelCA3Cell or - self.pulseGenerator or - self.pulseGeneratorDL or - self.sineGenerator or - self.sineGeneratorDL or - self.rampGenerator or - self.rampGeneratorDL or - self.compoundInput or - self.compoundInputDL or - self.voltageClamp or - self.voltageClampTriple or - self.spikeArray or - self.timedSynapticInput or - self.spikeGenerator or - self.spikeGeneratorRandom or - self.spikeGeneratorPoisson or - self.spikeGeneratorRefPoisson or - self.poissonFiringSynapse or - self.transientPoissonFiringSynapse or + self.ion_channel or + self.ion_channel_hhs or + self.ion_channel_v_shifts or + self.ion_channel_kses or + self.decaying_pool_concentration_models or + self.fixed_factor_concentration_models or + self.alpha_current_synapses or + self.alpha_synapses or + self.exp_one_synapses or + self.exp_two_synapses or + self.exp_three_synapses or + self.blocking_plastic_synapses or + self.double_synapses or + self.gap_junctions or + self.silent_synapses or + self.linear_graded_synapses or + self.graded_synapses or + self.biophysical_properties or + self.cells or + self.cell2_ca_poolses or + self.base_cells or + self.iaf_tau_cells or + self.iaf_tau_ref_cells or + self.iaf_cells or + self.iaf_ref_cells or + self.izhikevich_cells or + self.izhikevich2007_cells or + self.ad_ex_ia_f_cells or + self.fitz_hugh_nagumo_cells or + self.fitz_hugh_nagumo1969_cells or + self.pinsky_rinzel_ca3_cells or + self.pulse_generators or + self.pulse_generator_dls or + self.sine_generators or + self.sine_generator_dls or + self.ramp_generators or + self.ramp_generator_dls or + self.compound_inputs or + self.compound_input_dls or + self.voltage_clamps or + self.voltage_clamp_triples or + self.spike_arrays or + self.timed_synaptic_inputs or + self.spike_generators or + self.spike_generator_randoms or + self.spike_generator_poissons or + self.spike_generator_ref_poissons or + self.poisson_firing_synapses or + self.transient_poisson_firing_synapses or self.IF_curr_alpha or self.IF_curr_exp or self.IF_cond_alpha or @@ -18179,12 +18178,12 @@ def hasContent_(self): self.EIF_cond_exp_isfa_ista or self.EIF_cond_alpha_isfa_ista or self.HH_cond_exp or - self.expCondSynapse or - self.alphaCondSynapse or - self.expCurrSynapse or - self.alphaCurrSynapse or + self.exp_cond_synapses or + self.alpha_cond_synapses or + self.exp_curr_synapses or + self.alpha_curr_synapses or self.SpikeSourcePoisson or - self.network or + self.networks or self.ComponentType or super(NeuroMLDocument, self).hasContent_() ): @@ -18222,164 +18221,164 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for include_ in self.include: - namespaceprefix_ = self.include_nsprefix_ + ':' if (UseCapturedNS_ and self.include_nsprefix_) else '' + for include_ in self.includes: + namespaceprefix_ = self.includes_nsprefix_ + ':' if (UseCapturedNS_ and self.includes_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) - for extracellularProperties_ in self.extracellularProperties: - namespaceprefix_ = self.extracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellularProperties_nsprefix_) else '' + for extracellularProperties_ in self.extracellular_properties: + namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - for intracellularProperties_ in self.intracellularProperties: - namespaceprefix_ = self.intracellularProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellularProperties_nsprefix_) else '' + for intracellularProperties_ in self.intracellular_properties: + namespaceprefix_ = self.intracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties_nsprefix_) else '' intracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) for morphology_ in self.morphology: namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' morphology_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) - for ionChannel_ in self.ionChannel: - namespaceprefix_ = self.ionChannel_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannel_nsprefix_) else '' + for ionChannel_ in self.ion_channel: + namespaceprefix_ = self.ion_channel_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_nsprefix_) else '' ionChannel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannel', pretty_print=pretty_print) - for ionChannelHH_ in self.ionChannelHH: - namespaceprefix_ = self.ionChannelHH_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelHH_nsprefix_) else '' + for ionChannelHH_ in self.ion_channel_hhs: + namespaceprefix_ = self.ion_channel_hhs_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_hhs_nsprefix_) else '' ionChannelHH_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelHH', pretty_print=pretty_print) - for ionChannelVShift_ in self.ionChannelVShift: - namespaceprefix_ = self.ionChannelVShift_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelVShift_nsprefix_) else '' + for ionChannelVShift_ in self.ion_channel_v_shifts: + namespaceprefix_ = self.ion_channel_v_shifts_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_v_shifts_nsprefix_) else '' ionChannelVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelVShift', pretty_print=pretty_print) - for ionChannelKS_ in self.ionChannelKS: - namespaceprefix_ = self.ionChannelKS_nsprefix_ + ':' if (UseCapturedNS_ and self.ionChannelKS_nsprefix_) else '' + for ionChannelKS_ in self.ion_channel_kses: + namespaceprefix_ = self.ion_channel_kses_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_kses_nsprefix_) else '' ionChannelKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelKS', pretty_print=pretty_print) - for decayingPoolConcentrationModel_ in self.decayingPoolConcentrationModel: - namespaceprefix_ = self.decayingPoolConcentrationModel_nsprefix_ + ':' if (UseCapturedNS_ and self.decayingPoolConcentrationModel_nsprefix_) else '' + for decayingPoolConcentrationModel_ in self.decaying_pool_concentration_models: + namespaceprefix_ = self.decaying_pool_concentration_models_nsprefix_ + ':' if (UseCapturedNS_ and self.decaying_pool_concentration_models_nsprefix_) else '' decayingPoolConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='decayingPoolConcentrationModel', pretty_print=pretty_print) - for fixedFactorConcentrationModel_ in self.fixedFactorConcentrationModel: - namespaceprefix_ = self.fixedFactorConcentrationModel_nsprefix_ + ':' if (UseCapturedNS_ and self.fixedFactorConcentrationModel_nsprefix_) else '' + for fixedFactorConcentrationModel_ in self.fixed_factor_concentration_models: + namespaceprefix_ = self.fixed_factor_concentration_models_nsprefix_ + ':' if (UseCapturedNS_ and self.fixed_factor_concentration_models_nsprefix_) else '' fixedFactorConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fixedFactorConcentrationModel', pretty_print=pretty_print) - for alphaCurrentSynapse_ in self.alphaCurrentSynapse: - namespaceprefix_ = self.alphaCurrentSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCurrentSynapse_nsprefix_) else '' + for alphaCurrentSynapse_ in self.alpha_current_synapses: + namespaceprefix_ = self.alpha_current_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_current_synapses_nsprefix_) else '' alphaCurrentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrentSynapse', pretty_print=pretty_print) - for alphaSynapse_ in self.alphaSynapse: - namespaceprefix_ = self.alphaSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaSynapse_nsprefix_) else '' + for alphaSynapse_ in self.alpha_synapses: + namespaceprefix_ = self.alpha_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_synapses_nsprefix_) else '' alphaSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaSynapse', pretty_print=pretty_print) - for expOneSynapse_ in self.expOneSynapse: - namespaceprefix_ = self.expOneSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expOneSynapse_nsprefix_) else '' + for expOneSynapse_ in self.exp_one_synapses: + namespaceprefix_ = self.exp_one_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_one_synapses_nsprefix_) else '' expOneSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expOneSynapse', pretty_print=pretty_print) - for expTwoSynapse_ in self.expTwoSynapse: - namespaceprefix_ = self.expTwoSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expTwoSynapse_nsprefix_) else '' + for expTwoSynapse_ in self.exp_two_synapses: + namespaceprefix_ = self.exp_two_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_two_synapses_nsprefix_) else '' expTwoSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expTwoSynapse', pretty_print=pretty_print) - for expThreeSynapse_ in self.expThreeSynapse: - namespaceprefix_ = self.expThreeSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expThreeSynapse_nsprefix_) else '' + for expThreeSynapse_ in self.exp_three_synapses: + namespaceprefix_ = self.exp_three_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_three_synapses_nsprefix_) else '' expThreeSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expThreeSynapse', pretty_print=pretty_print) - for blockingPlasticSynapse_ in self.blockingPlasticSynapse: - namespaceprefix_ = self.blockingPlasticSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.blockingPlasticSynapse_nsprefix_) else '' + for blockingPlasticSynapse_ in self.blocking_plastic_synapses: + namespaceprefix_ = self.blocking_plastic_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.blocking_plastic_synapses_nsprefix_) else '' blockingPlasticSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockingPlasticSynapse', pretty_print=pretty_print) - for doubleSynapse_ in self.doubleSynapse: - namespaceprefix_ = self.doubleSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.doubleSynapse_nsprefix_) else '' + for doubleSynapse_ in self.double_synapses: + namespaceprefix_ = self.double_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.double_synapses_nsprefix_) else '' doubleSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='doubleSynapse', pretty_print=pretty_print) - for gapJunction_ in self.gapJunction: - namespaceprefix_ = self.gapJunction_nsprefix_ + ':' if (UseCapturedNS_ and self.gapJunction_nsprefix_) else '' + for gapJunction_ in self.gap_junctions: + namespaceprefix_ = self.gap_junctions_nsprefix_ + ':' if (UseCapturedNS_ and self.gap_junctions_nsprefix_) else '' gapJunction_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gapJunction', pretty_print=pretty_print) - for silentSynapse_ in self.silentSynapse: - namespaceprefix_ = self.silentSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.silentSynapse_nsprefix_) else '' + for silentSynapse_ in self.silent_synapses: + namespaceprefix_ = self.silent_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.silent_synapses_nsprefix_) else '' silentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='silentSynapse', pretty_print=pretty_print) - for linearGradedSynapse_ in self.linearGradedSynapse: - namespaceprefix_ = self.linearGradedSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.linearGradedSynapse_nsprefix_) else '' + for linearGradedSynapse_ in self.linear_graded_synapses: + namespaceprefix_ = self.linear_graded_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.linear_graded_synapses_nsprefix_) else '' linearGradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linearGradedSynapse', pretty_print=pretty_print) - for gradedSynapse_ in self.gradedSynapse: - namespaceprefix_ = self.gradedSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.gradedSynapse_nsprefix_) else '' + for gradedSynapse_ in self.graded_synapses: + namespaceprefix_ = self.graded_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.graded_synapses_nsprefix_) else '' gradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gradedSynapse', pretty_print=pretty_print) - for biophysicalProperties_ in self.biophysicalProperties: - namespaceprefix_ = self.biophysicalProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties_nsprefix_) else '' + for biophysicalProperties_ in self.biophysical_properties: + namespaceprefix_ = self.biophysical_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties_nsprefix_) else '' biophysicalProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) - for cell_ in self.cell: - namespaceprefix_ = self.cell_nsprefix_ + ':' if (UseCapturedNS_ and self.cell_nsprefix_) else '' + for cell_ in self.cells: + namespaceprefix_ = self.cells_nsprefix_ + ':' if (UseCapturedNS_ and self.cells_nsprefix_) else '' cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell', pretty_print=pretty_print) - for cell2CaPools_ in self.cell2CaPools: - namespaceprefix_ = self.cell2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.cell2CaPools_nsprefix_) else '' + for cell2CaPools_ in self.cell2_ca_poolses: + namespaceprefix_ = self.cell2_ca_poolses_nsprefix_ + ':' if (UseCapturedNS_ and self.cell2_ca_poolses_nsprefix_) else '' cell2CaPools_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell2CaPools', pretty_print=pretty_print) - for baseCell_ in self.baseCell: - namespaceprefix_ = self.baseCell_nsprefix_ + ':' if (UseCapturedNS_ and self.baseCell_nsprefix_) else '' + for baseCell_ in self.base_cells: + namespaceprefix_ = self.base_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.base_cells_nsprefix_) else '' baseCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='baseCell', pretty_print=pretty_print) - for iafTauCell_ in self.iafTauCell: - namespaceprefix_ = self.iafTauCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafTauCell_nsprefix_) else '' + for iafTauCell_ in self.iaf_tau_cells: + namespaceprefix_ = self.iaf_tau_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_tau_cells_nsprefix_) else '' iafTauCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauCell', pretty_print=pretty_print) - for iafTauRefCell_ in self.iafTauRefCell: - namespaceprefix_ = self.iafTauRefCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafTauRefCell_nsprefix_) else '' + for iafTauRefCell_ in self.iaf_tau_ref_cells: + namespaceprefix_ = self.iaf_tau_ref_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_tau_ref_cells_nsprefix_) else '' iafTauRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauRefCell', pretty_print=pretty_print) - for iafCell_ in self.iafCell: - namespaceprefix_ = self.iafCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafCell_nsprefix_) else '' + for iafCell_ in self.iaf_cells: + namespaceprefix_ = self.iaf_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_cells_nsprefix_) else '' iafCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafCell', pretty_print=pretty_print) - for iafRefCell_ in self.iafRefCell: - namespaceprefix_ = self.iafRefCell_nsprefix_ + ':' if (UseCapturedNS_ and self.iafRefCell_nsprefix_) else '' + for iafRefCell_ in self.iaf_ref_cells: + namespaceprefix_ = self.iaf_ref_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_ref_cells_nsprefix_) else '' iafRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafRefCell', pretty_print=pretty_print) - for izhikevichCell_ in self.izhikevichCell: - namespaceprefix_ = self.izhikevichCell_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevichCell_nsprefix_) else '' + for izhikevichCell_ in self.izhikevich_cells: + namespaceprefix_ = self.izhikevich_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich_cells_nsprefix_) else '' izhikevichCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevichCell', pretty_print=pretty_print) - for izhikevich2007Cell_ in self.izhikevich2007Cell: - namespaceprefix_ = self.izhikevich2007Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich2007Cell_nsprefix_) else '' + for izhikevich2007Cell_ in self.izhikevich2007_cells: + namespaceprefix_ = self.izhikevich2007_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich2007_cells_nsprefix_) else '' izhikevich2007Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevich2007Cell', pretty_print=pretty_print) - for adExIaFCell_ in self.adExIaFCell: - namespaceprefix_ = self.adExIaFCell_nsprefix_ + ':' if (UseCapturedNS_ and self.adExIaFCell_nsprefix_) else '' + for adExIaFCell_ in self.ad_ex_ia_f_cells: + namespaceprefix_ = self.ad_ex_ia_f_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.ad_ex_ia_f_cells_nsprefix_) else '' adExIaFCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='adExIaFCell', pretty_print=pretty_print) - for fitzHughNagumoCell_ in self.fitzHughNagumoCell: - namespaceprefix_ = self.fitzHughNagumoCell_nsprefix_ + ':' if (UseCapturedNS_ and self.fitzHughNagumoCell_nsprefix_) else '' + for fitzHughNagumoCell_ in self.fitz_hugh_nagumo_cells: + namespaceprefix_ = self.fitz_hugh_nagumo_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.fitz_hugh_nagumo_cells_nsprefix_) else '' fitzHughNagumoCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumoCell', pretty_print=pretty_print) - for fitzHughNagumo1969Cell_ in self.fitzHughNagumo1969Cell: - namespaceprefix_ = self.fitzHughNagumo1969Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.fitzHughNagumo1969Cell_nsprefix_) else '' + for fitzHughNagumo1969Cell_ in self.fitz_hugh_nagumo1969_cells: + namespaceprefix_ = self.fitz_hugh_nagumo1969_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.fitz_hugh_nagumo1969_cells_nsprefix_) else '' fitzHughNagumo1969Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumo1969Cell', pretty_print=pretty_print) - for pinskyRinzelCA3Cell_ in self.pinskyRinzelCA3Cell: - namespaceprefix_ = self.pinskyRinzelCA3Cell_nsprefix_ + ':' if (UseCapturedNS_ and self.pinskyRinzelCA3Cell_nsprefix_) else '' + for pinskyRinzelCA3Cell_ in self.pinsky_rinzel_ca3_cells: + namespaceprefix_ = self.pinsky_rinzel_ca3_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.pinsky_rinzel_ca3_cells_nsprefix_) else '' pinskyRinzelCA3Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pinskyRinzelCA3Cell', pretty_print=pretty_print) - for pulseGenerator_ in self.pulseGenerator: - namespaceprefix_ = self.pulseGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGenerator_nsprefix_) else '' + for pulseGenerator_ in self.pulse_generators: + namespaceprefix_ = self.pulse_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generators_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) - for pulseGeneratorDL_ in self.pulseGeneratorDL: - namespaceprefix_ = self.pulseGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.pulseGeneratorDL_nsprefix_) else '' + for pulseGeneratorDL_ in self.pulse_generator_dls: + namespaceprefix_ = self.pulse_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generator_dls_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) - for sineGenerator_ in self.sineGenerator: - namespaceprefix_ = self.sineGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGenerator_nsprefix_) else '' + for sineGenerator_ in self.sine_generators: + namespaceprefix_ = self.sine_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generators_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) - for sineGeneratorDL_ in self.sineGeneratorDL: - namespaceprefix_ = self.sineGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.sineGeneratorDL_nsprefix_) else '' + for sineGeneratorDL_ in self.sine_generator_dls: + namespaceprefix_ = self.sine_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generator_dls_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) - for rampGenerator_ in self.rampGenerator: - namespaceprefix_ = self.rampGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGenerator_nsprefix_) else '' + for rampGenerator_ in self.ramp_generators: + namespaceprefix_ = self.ramp_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generators_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) - for rampGeneratorDL_ in self.rampGeneratorDL: - namespaceprefix_ = self.rampGeneratorDL_nsprefix_ + ':' if (UseCapturedNS_ and self.rampGeneratorDL_nsprefix_) else '' + for rampGeneratorDL_ in self.ramp_generator_dls: + namespaceprefix_ = self.ramp_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generator_dls_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) - for compoundInput_ in self.compoundInput: - namespaceprefix_ = self.compoundInput_nsprefix_ + ':' if (UseCapturedNS_ and self.compoundInput_nsprefix_) else '' + for compoundInput_ in self.compound_inputs: + namespaceprefix_ = self.compound_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.compound_inputs_nsprefix_) else '' compoundInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInput', pretty_print=pretty_print) - for compoundInputDL_ in self.compoundInputDL: - namespaceprefix_ = self.compoundInputDL_nsprefix_ + ':' if (UseCapturedNS_ and self.compoundInputDL_nsprefix_) else '' + for compoundInputDL_ in self.compound_input_dls: + namespaceprefix_ = self.compound_input_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.compound_input_dls_nsprefix_) else '' compoundInputDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInputDL', pretty_print=pretty_print) - for voltageClamp_ in self.voltageClamp: - namespaceprefix_ = self.voltageClamp_nsprefix_ + ':' if (UseCapturedNS_ and self.voltageClamp_nsprefix_) else '' + for voltageClamp_ in self.voltage_clamps: + namespaceprefix_ = self.voltage_clamps_nsprefix_ + ':' if (UseCapturedNS_ and self.voltage_clamps_nsprefix_) else '' voltageClamp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClamp', pretty_print=pretty_print) - for voltageClampTriple_ in self.voltageClampTriple: - namespaceprefix_ = self.voltageClampTriple_nsprefix_ + ':' if (UseCapturedNS_ and self.voltageClampTriple_nsprefix_) else '' + for voltageClampTriple_ in self.voltage_clamp_triples: + namespaceprefix_ = self.voltage_clamp_triples_nsprefix_ + ':' if (UseCapturedNS_ and self.voltage_clamp_triples_nsprefix_) else '' voltageClampTriple_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClampTriple', pretty_print=pretty_print) - for spikeArray_ in self.spikeArray: - namespaceprefix_ = self.spikeArray_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeArray_nsprefix_) else '' + for spikeArray_ in self.spike_arrays: + namespaceprefix_ = self.spike_arrays_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_arrays_nsprefix_) else '' spikeArray_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeArray', pretty_print=pretty_print) - for timedSynapticInput_ in self.timedSynapticInput: - namespaceprefix_ = self.timedSynapticInput_nsprefix_ + ':' if (UseCapturedNS_ and self.timedSynapticInput_nsprefix_) else '' + for timedSynapticInput_ in self.timed_synaptic_inputs: + namespaceprefix_ = self.timed_synaptic_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.timed_synaptic_inputs_nsprefix_) else '' timedSynapticInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timedSynapticInput', pretty_print=pretty_print) - for spikeGenerator_ in self.spikeGenerator: - namespaceprefix_ = self.spikeGenerator_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGenerator_nsprefix_) else '' + for spikeGenerator_ in self.spike_generators: + namespaceprefix_ = self.spike_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generators_nsprefix_) else '' spikeGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGenerator', pretty_print=pretty_print) - for spikeGeneratorRandom_ in self.spikeGeneratorRandom: - namespaceprefix_ = self.spikeGeneratorRandom_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorRandom_nsprefix_) else '' + for spikeGeneratorRandom_ in self.spike_generator_randoms: + namespaceprefix_ = self.spike_generator_randoms_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_randoms_nsprefix_) else '' spikeGeneratorRandom_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRandom', pretty_print=pretty_print) - for spikeGeneratorPoisson_ in self.spikeGeneratorPoisson: - namespaceprefix_ = self.spikeGeneratorPoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorPoisson_nsprefix_) else '' + for spikeGeneratorPoisson_ in self.spike_generator_poissons: + namespaceprefix_ = self.spike_generator_poissons_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_poissons_nsprefix_) else '' spikeGeneratorPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorPoisson', pretty_print=pretty_print) - for spikeGeneratorRefPoisson_ in self.spikeGeneratorRefPoisson: - namespaceprefix_ = self.spikeGeneratorRefPoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.spikeGeneratorRefPoisson_nsprefix_) else '' + for spikeGeneratorRefPoisson_ in self.spike_generator_ref_poissons: + namespaceprefix_ = self.spike_generator_ref_poissons_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_ref_poissons_nsprefix_) else '' spikeGeneratorRefPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRefPoisson', pretty_print=pretty_print) - for poissonFiringSynapse_ in self.poissonFiringSynapse: - namespaceprefix_ = self.poissonFiringSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.poissonFiringSynapse_nsprefix_) else '' + for poissonFiringSynapse_ in self.poisson_firing_synapses: + namespaceprefix_ = self.poisson_firing_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.poisson_firing_synapses_nsprefix_) else '' poissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='poissonFiringSynapse', pretty_print=pretty_print) - for transientPoissonFiringSynapse_ in self.transientPoissonFiringSynapse: - namespaceprefix_ = self.transientPoissonFiringSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.transientPoissonFiringSynapse_nsprefix_) else '' + for transientPoissonFiringSynapse_ in self.transient_poisson_firing_synapses: + namespaceprefix_ = self.transient_poisson_firing_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.transient_poisson_firing_synapses_nsprefix_) else '' transientPoissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='transientPoissonFiringSynapse', pretty_print=pretty_print) for IF_curr_alpha_ in self.IF_curr_alpha: namespaceprefix_ = self.IF_curr_alpha_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_curr_alpha_nsprefix_) else '' @@ -18402,23 +18401,23 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', for HH_cond_exp_ in self.HH_cond_exp: namespaceprefix_ = self.HH_cond_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.HH_cond_exp_nsprefix_) else '' HH_cond_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='HH_cond_exp', pretty_print=pretty_print) - for expCondSynapse_ in self.expCondSynapse: - namespaceprefix_ = self.expCondSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expCondSynapse_nsprefix_) else '' + for expCondSynapse_ in self.exp_cond_synapses: + namespaceprefix_ = self.exp_cond_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_cond_synapses_nsprefix_) else '' expCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCondSynapse', pretty_print=pretty_print) - for alphaCondSynapse_ in self.alphaCondSynapse: - namespaceprefix_ = self.alphaCondSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCondSynapse_nsprefix_) else '' + for alphaCondSynapse_ in self.alpha_cond_synapses: + namespaceprefix_ = self.alpha_cond_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_cond_synapses_nsprefix_) else '' alphaCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCondSynapse', pretty_print=pretty_print) - for expCurrSynapse_ in self.expCurrSynapse: - namespaceprefix_ = self.expCurrSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.expCurrSynapse_nsprefix_) else '' + for expCurrSynapse_ in self.exp_curr_synapses: + namespaceprefix_ = self.exp_curr_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_curr_synapses_nsprefix_) else '' expCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCurrSynapse', pretty_print=pretty_print) - for alphaCurrSynapse_ in self.alphaCurrSynapse: - namespaceprefix_ = self.alphaCurrSynapse_nsprefix_ + ':' if (UseCapturedNS_ and self.alphaCurrSynapse_nsprefix_) else '' + for alphaCurrSynapse_ in self.alpha_curr_synapses: + namespaceprefix_ = self.alpha_curr_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_curr_synapses_nsprefix_) else '' alphaCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrSynapse', pretty_print=pretty_print) for SpikeSourcePoisson_ in self.SpikeSourcePoisson: namespaceprefix_ = self.SpikeSourcePoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.SpikeSourcePoisson_nsprefix_) else '' SpikeSourcePoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpikeSourcePoisson', pretty_print=pretty_print) - for network_ in self.network: - namespaceprefix_ = self.network_nsprefix_ + ':' if (UseCapturedNS_ and self.network_nsprefix_) else '' + for network_ in self.networks: + namespaceprefix_ = self.networks_nsprefix_ + ':' if (UseCapturedNS_ and self.networks_nsprefix_) else '' network_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='network', pretty_print=pretty_print) for ComponentType_ in self.ComponentType: namespaceprefix_ = self.ComponentType_nsprefix_ + ':' if (UseCapturedNS_ and self.ComponentType_nsprefix_) else '' @@ -18440,18 +18439,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'include': obj_ = IncludeType.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.include.append(obj_) + self.includes.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.extracellularProperties.append(obj_) + self.extracellular_properties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.intracellularProperties.append(obj_) + self.intracellular_properties.append(obj_) obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'morphology': obj_ = Morphology.factory(parent_object_=self) @@ -18462,254 +18461,254 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class_obj_ = self.get_class_obj_(child_, IonChannel) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.ionChannel.append(obj_) + self.ion_channel.append(obj_) obj_.original_tagname_ = 'ionChannel' elif nodeName_ == 'ionChannelHH': obj_ = IonChannelHH.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.ionChannelHH.append(obj_) + self.ion_channel_hhs.append(obj_) obj_.original_tagname_ = 'ionChannelHH' elif nodeName_ == 'ionChannelVShift': obj_ = IonChannelVShift.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.ionChannelVShift.append(obj_) + self.ion_channel_v_shifts.append(obj_) obj_.original_tagname_ = 'ionChannelVShift' elif nodeName_ == 'ionChannelKS': obj_ = IonChannelKS.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.ionChannelKS.append(obj_) + self.ion_channel_kses.append(obj_) obj_.original_tagname_ = 'ionChannelKS' elif nodeName_ == 'decayingPoolConcentrationModel': class_obj_ = self.get_class_obj_(child_, DecayingPoolConcentrationModel) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.decayingPoolConcentrationModel.append(obj_) + self.decaying_pool_concentration_models.append(obj_) obj_.original_tagname_ = 'decayingPoolConcentrationModel' elif nodeName_ == 'fixedFactorConcentrationModel': obj_ = FixedFactorConcentrationModel.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.fixedFactorConcentrationModel.append(obj_) + self.fixed_factor_concentration_models.append(obj_) obj_.original_tagname_ = 'fixedFactorConcentrationModel' elif nodeName_ == 'alphaCurrentSynapse': obj_ = AlphaCurrentSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.alphaCurrentSynapse.append(obj_) + self.alpha_current_synapses.append(obj_) obj_.original_tagname_ = 'alphaCurrentSynapse' elif nodeName_ == 'alphaSynapse': obj_ = AlphaSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.alphaSynapse.append(obj_) + self.alpha_synapses.append(obj_) obj_.original_tagname_ = 'alphaSynapse' elif nodeName_ == 'expOneSynapse': obj_ = ExpOneSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.expOneSynapse.append(obj_) + self.exp_one_synapses.append(obj_) obj_.original_tagname_ = 'expOneSynapse' elif nodeName_ == 'expTwoSynapse': class_obj_ = self.get_class_obj_(child_, ExpTwoSynapse) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.expTwoSynapse.append(obj_) + self.exp_two_synapses.append(obj_) obj_.original_tagname_ = 'expTwoSynapse' elif nodeName_ == 'expThreeSynapse': obj_ = ExpThreeSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.expThreeSynapse.append(obj_) + self.exp_three_synapses.append(obj_) obj_.original_tagname_ = 'expThreeSynapse' elif nodeName_ == 'blockingPlasticSynapse': obj_ = BlockingPlasticSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.blockingPlasticSynapse.append(obj_) + self.blocking_plastic_synapses.append(obj_) obj_.original_tagname_ = 'blockingPlasticSynapse' elif nodeName_ == 'doubleSynapse': obj_ = DoubleSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.doubleSynapse.append(obj_) + self.double_synapses.append(obj_) obj_.original_tagname_ = 'doubleSynapse' elif nodeName_ == 'gapJunction': obj_ = GapJunction.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gapJunction.append(obj_) + self.gap_junctions.append(obj_) obj_.original_tagname_ = 'gapJunction' elif nodeName_ == 'silentSynapse': obj_ = SilentSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.silentSynapse.append(obj_) + self.silent_synapses.append(obj_) obj_.original_tagname_ = 'silentSynapse' elif nodeName_ == 'linearGradedSynapse': obj_ = LinearGradedSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.linearGradedSynapse.append(obj_) + self.linear_graded_synapses.append(obj_) obj_.original_tagname_ = 'linearGradedSynapse' elif nodeName_ == 'gradedSynapse': obj_ = GradedSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gradedSynapse.append(obj_) + self.graded_synapses.append(obj_) obj_.original_tagname_ = 'gradedSynapse' elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.biophysicalProperties.append(obj_) + self.biophysical_properties.append(obj_) obj_.original_tagname_ = 'biophysicalProperties' elif nodeName_ == 'cell': class_obj_ = self.get_class_obj_(child_, Cell) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.cell.append(obj_) + self.cells.append(obj_) obj_.original_tagname_ = 'cell' elif nodeName_ == 'cell2CaPools': obj_ = Cell2CaPools.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.cell2CaPools.append(obj_) + self.cell2_ca_poolses.append(obj_) obj_.original_tagname_ = 'cell2CaPools' elif nodeName_ == 'baseCell': class_obj_ = self.get_class_obj_(child_, BaseCell) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.baseCell.append(obj_) + self.base_cells.append(obj_) obj_.original_tagname_ = 'baseCell' elif nodeName_ == 'iafTauCell': class_obj_ = self.get_class_obj_(child_, IafTauCell) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.iafTauCell.append(obj_) + self.iaf_tau_cells.append(obj_) obj_.original_tagname_ = 'iafTauCell' elif nodeName_ == 'iafTauRefCell': obj_ = IafTauRefCell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.iafTauRefCell.append(obj_) + self.iaf_tau_ref_cells.append(obj_) obj_.original_tagname_ = 'iafTauRefCell' elif nodeName_ == 'iafCell': class_obj_ = self.get_class_obj_(child_, IafCell) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.iafCell.append(obj_) + self.iaf_cells.append(obj_) obj_.original_tagname_ = 'iafCell' elif nodeName_ == 'iafRefCell': obj_ = IafRefCell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.iafRefCell.append(obj_) + self.iaf_ref_cells.append(obj_) obj_.original_tagname_ = 'iafRefCell' elif nodeName_ == 'izhikevichCell': obj_ = IzhikevichCell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.izhikevichCell.append(obj_) + self.izhikevich_cells.append(obj_) obj_.original_tagname_ = 'izhikevichCell' elif nodeName_ == 'izhikevich2007Cell': obj_ = Izhikevich2007Cell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.izhikevich2007Cell.append(obj_) + self.izhikevich2007_cells.append(obj_) obj_.original_tagname_ = 'izhikevich2007Cell' elif nodeName_ == 'adExIaFCell': obj_ = AdExIaFCell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.adExIaFCell.append(obj_) + self.ad_ex_ia_f_cells.append(obj_) obj_.original_tagname_ = 'adExIaFCell' elif nodeName_ == 'fitzHughNagumoCell': obj_ = FitzHughNagumoCell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.fitzHughNagumoCell.append(obj_) + self.fitz_hugh_nagumo_cells.append(obj_) obj_.original_tagname_ = 'fitzHughNagumoCell' elif nodeName_ == 'fitzHughNagumo1969Cell': obj_ = FitzHughNagumo1969Cell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.fitzHughNagumo1969Cell.append(obj_) + self.fitz_hugh_nagumo1969_cells.append(obj_) obj_.original_tagname_ = 'fitzHughNagumo1969Cell' elif nodeName_ == 'pinskyRinzelCA3Cell': obj_ = PinskyRinzelCA3Cell.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.pinskyRinzelCA3Cell.append(obj_) + self.pinsky_rinzel_ca3_cells.append(obj_) obj_.original_tagname_ = 'pinskyRinzelCA3Cell' elif nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.pulseGenerator.append(obj_) + self.pulse_generators.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.pulseGeneratorDL.append(obj_) + self.pulse_generator_dls.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.sineGenerator.append(obj_) + self.sine_generators.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.sineGeneratorDL.append(obj_) + self.sine_generator_dls.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.rampGenerator.append(obj_) + self.ramp_generators.append(obj_) obj_.original_tagname_ = 'rampGenerator' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.rampGeneratorDL.append(obj_) + self.ramp_generator_dls.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' elif nodeName_ == 'compoundInput': obj_ = CompoundInput.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.compoundInput.append(obj_) + self.compound_inputs.append(obj_) obj_.original_tagname_ = 'compoundInput' elif nodeName_ == 'compoundInputDL': obj_ = CompoundInputDL.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.compoundInputDL.append(obj_) + self.compound_input_dls.append(obj_) obj_.original_tagname_ = 'compoundInputDL' elif nodeName_ == 'voltageClamp': obj_ = VoltageClamp.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.voltageClamp.append(obj_) + self.voltage_clamps.append(obj_) obj_.original_tagname_ = 'voltageClamp' elif nodeName_ == 'voltageClampTriple': obj_ = VoltageClampTriple.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.voltageClampTriple.append(obj_) + self.voltage_clamp_triples.append(obj_) obj_.original_tagname_ = 'voltageClampTriple' elif nodeName_ == 'spikeArray': obj_ = SpikeArray.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeArray.append(obj_) + self.spike_arrays.append(obj_) obj_.original_tagname_ = 'spikeArray' elif nodeName_ == 'timedSynapticInput': obj_ = TimedSynapticInput.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.timedSynapticInput.append(obj_) + self.timed_synaptic_inputs.append(obj_) obj_.original_tagname_ = 'timedSynapticInput' elif nodeName_ == 'spikeGenerator': obj_ = SpikeGenerator.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeGenerator.append(obj_) + self.spike_generators.append(obj_) obj_.original_tagname_ = 'spikeGenerator' elif nodeName_ == 'spikeGeneratorRandom': obj_ = SpikeGeneratorRandom.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeGeneratorRandom.append(obj_) + self.spike_generator_randoms.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRandom' elif nodeName_ == 'spikeGeneratorPoisson': class_obj_ = self.get_class_obj_(child_, SpikeGeneratorPoisson) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeGeneratorPoisson.append(obj_) + self.spike_generator_poissons.append(obj_) obj_.original_tagname_ = 'spikeGeneratorPoisson' elif nodeName_ == 'spikeGeneratorRefPoisson': obj_ = SpikeGeneratorRefPoisson.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.spikeGeneratorRefPoisson.append(obj_) + self.spike_generator_ref_poissons.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRefPoisson' elif nodeName_ == 'poissonFiringSynapse': obj_ = PoissonFiringSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.poissonFiringSynapse.append(obj_) + self.poisson_firing_synapses.append(obj_) obj_.original_tagname_ = 'poissonFiringSynapse' elif nodeName_ == 'transientPoissonFiringSynapse': obj_ = TransientPoissonFiringSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.transientPoissonFiringSynapse.append(obj_) + self.transient_poisson_firing_synapses.append(obj_) obj_.original_tagname_ = 'transientPoissonFiringSynapse' elif nodeName_ == 'IF_curr_alpha': obj_ = IF_curr_alpha.factory(parent_object_=self) @@ -18750,22 +18749,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'expCondSynapse': obj_ = ExpCondSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.expCondSynapse.append(obj_) + self.exp_cond_synapses.append(obj_) obj_.original_tagname_ = 'expCondSynapse' elif nodeName_ == 'alphaCondSynapse': obj_ = AlphaCondSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.alphaCondSynapse.append(obj_) + self.alpha_cond_synapses.append(obj_) obj_.original_tagname_ = 'alphaCondSynapse' elif nodeName_ == 'expCurrSynapse': obj_ = ExpCurrSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.expCurrSynapse.append(obj_) + self.exp_curr_synapses.append(obj_) obj_.original_tagname_ = 'expCurrSynapse' elif nodeName_ == 'alphaCurrSynapse': obj_ = AlphaCurrSynapse.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.alphaCurrSynapse.append(obj_) + self.alpha_curr_synapses.append(obj_) obj_.original_tagname_ = 'alphaCurrSynapse' elif nodeName_ == 'SpikeSourcePoisson': obj_ = SpikeSourcePoisson.factory(parent_object_=self) @@ -18775,7 +18774,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'network': obj_ = Network.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.network.append(obj_) + self.networks.append(obj_) obj_.original_tagname_ = 'network' elif nodeName_ == 'ComponentType': obj_ = ComponentType.factory(parent_object_=self) @@ -18949,13 +18948,13 @@ class BasePynnSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BasePynnSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BasePynnSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.tau_syn = _cast(float, tau_syn) self.tau_syn_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -19054,13 +19053,13 @@ class basePyNNCell(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(basePyNNCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.cm = _cast(float, cm) self.cm_nsprefix_ = None self.i_offset = _cast(float, i_offset) @@ -19193,34 +19192,34 @@ class ContinuousProjection(BaseProjection): (e.g. graded synapses)""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('continuousConnection', 'ContinuousConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnection', 'type': 'ContinuousConnection'}, None), - MemberSpec_('continuousConnectionInstance', 'ContinuousConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstance', 'type': 'ContinuousConnectionInstance'}, None), - MemberSpec_('continuousConnectionInstanceW', 'ContinuousConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstanceW', 'type': 'ContinuousConnectionInstanceW'}, None), + MemberSpec_('continuous_connections', 'ContinuousConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnection', 'type': 'ContinuousConnection'}, None), + MemberSpec_('continuous_connection_instances', 'ContinuousConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstance', 'type': 'ContinuousConnectionInstance'}, None), + MemberSpec_('continuous_connection_instance_ws', 'ContinuousConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstanceW', 'type': 'ContinuousConnectionInstanceW'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, continuousConnection=None, continuousConnectionInstance=None, continuousConnectionInstanceW=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, continuous_connections=None, continuous_connection_instances=None, continuous_connection_instance_ws=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousProjection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) - if continuousConnection is None: - self.continuousConnection = [] - else: - self.continuousConnection = continuousConnection - self.continuousConnection_nsprefix_ = None - if continuousConnectionInstance is None: - self.continuousConnectionInstance = [] - else: - self.continuousConnectionInstance = continuousConnectionInstance - self.continuousConnectionInstance_nsprefix_ = None - if continuousConnectionInstanceW is None: - self.continuousConnectionInstanceW = [] - else: - self.continuousConnectionInstanceW = continuousConnectionInstanceW - self.continuousConnectionInstanceW_nsprefix_ = None + super(ContinuousProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + if continuous_connections is None: + self.continuous_connections = [] + else: + self.continuous_connections = continuous_connections + self.continuous_connections_nsprefix_ = None + if continuous_connection_instances is None: + self.continuous_connection_instances = [] + else: + self.continuous_connection_instances = continuous_connection_instances + self.continuous_connection_instances_nsprefix_ = None + if continuous_connection_instance_ws is None: + self.continuous_connection_instance_ws = [] + else: + self.continuous_connection_instance_ws = continuous_connection_instance_ws + self.continuous_connection_instance_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19234,9 +19233,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.continuousConnection or - self.continuousConnectionInstance or - self.continuousConnectionInstanceW or + self.continuous_connections or + self.continuous_connection_instances or + self.continuous_connection_instance_ws or super(ContinuousProjection, self).hasContent_() ): return True @@ -19273,14 +19272,14 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for continuousConnection_ in self.continuousConnection: - namespaceprefix_ = self.continuousConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnection_nsprefix_) else '' + for continuousConnection_ in self.continuous_connections: + namespaceprefix_ = self.continuous_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connections_nsprefix_) else '' continuousConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnection', pretty_print=pretty_print) - for continuousConnectionInstance_ in self.continuousConnectionInstance: - namespaceprefix_ = self.continuousConnectionInstance_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnectionInstance_nsprefix_) else '' + for continuousConnectionInstance_ in self.continuous_connection_instances: + namespaceprefix_ = self.continuous_connection_instances_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connection_instances_nsprefix_) else '' continuousConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstance', pretty_print=pretty_print) - for continuousConnectionInstanceW_ in self.continuousConnectionInstanceW: - namespaceprefix_ = self.continuousConnectionInstanceW_nsprefix_ + ':' if (UseCapturedNS_ and self.continuousConnectionInstanceW_nsprefix_) else '' + for continuousConnectionInstanceW_ in self.continuous_connection_instance_ws: + namespaceprefix_ = self.continuous_connection_instance_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connection_instance_ws_nsprefix_) else '' continuousConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstanceW', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -19300,18 +19299,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class_obj_ = self.get_class_obj_(child_, ContinuousConnection) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.continuousConnection.append(obj_) + self.continuous_connections.append(obj_) obj_.original_tagname_ = 'continuousConnection' elif nodeName_ == 'continuousConnectionInstance': class_obj_ = self.get_class_obj_(child_, ContinuousConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.continuousConnectionInstance.append(obj_) + self.continuous_connection_instances.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstance' elif nodeName_ == 'continuousConnectionInstanceW': obj_ = ContinuousConnectionInstanceW.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.continuousConnectionInstanceW.append(obj_) + self.continuous_connection_instance_ws.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstanceW' super(ContinuousProjection, self).buildChildren(child_, node, nodeName_, True) @@ -19402,34 +19401,34 @@ class ElectricalProjection(BaseProjection): (gap junctions)""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('electricalConnection', 'ElectricalConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnection', 'type': 'ElectricalConnection'}, None), - MemberSpec_('electricalConnectionInstance', 'ElectricalConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstance', 'type': 'ElectricalConnectionInstance'}, None), - MemberSpec_('electricalConnectionInstanceW', 'ElectricalConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstanceW', 'type': 'ElectricalConnectionInstanceW'}, None), + MemberSpec_('electrical_connections', 'ElectricalConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnection', 'type': 'ElectricalConnection'}, None), + MemberSpec_('electrical_connection_instances', 'ElectricalConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstance', 'type': 'ElectricalConnectionInstance'}, None), + MemberSpec_('electrical_connection_instance_ws', 'ElectricalConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstanceW', 'type': 'ElectricalConnectionInstanceW'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, electricalConnection=None, electricalConnectionInstance=None, electricalConnectionInstanceW=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, electrical_connections=None, electrical_connection_instances=None, electrical_connection_instance_ws=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalProjection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) - if electricalConnection is None: - self.electricalConnection = [] - else: - self.electricalConnection = electricalConnection - self.electricalConnection_nsprefix_ = None - if electricalConnectionInstance is None: - self.electricalConnectionInstance = [] - else: - self.electricalConnectionInstance = electricalConnectionInstance - self.electricalConnectionInstance_nsprefix_ = None - if electricalConnectionInstanceW is None: - self.electricalConnectionInstanceW = [] - else: - self.electricalConnectionInstanceW = electricalConnectionInstanceW - self.electricalConnectionInstanceW_nsprefix_ = None + super(ElectricalProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + if electrical_connections is None: + self.electrical_connections = [] + else: + self.electrical_connections = electrical_connections + self.electrical_connections_nsprefix_ = None + if electrical_connection_instances is None: + self.electrical_connection_instances = [] + else: + self.electrical_connection_instances = electrical_connection_instances + self.electrical_connection_instances_nsprefix_ = None + if electrical_connection_instance_ws is None: + self.electrical_connection_instance_ws = [] + else: + self.electrical_connection_instance_ws = electrical_connection_instance_ws + self.electrical_connection_instance_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19443,9 +19442,9 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.electricalConnection or - self.electricalConnectionInstance or - self.electricalConnectionInstanceW or + self.electrical_connections or + self.electrical_connection_instances or + self.electrical_connection_instance_ws or super(ElectricalProjection, self).hasContent_() ): return True @@ -19482,14 +19481,14 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for electricalConnection_ in self.electricalConnection: - namespaceprefix_ = self.electricalConnection_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnection_nsprefix_) else '' + for electricalConnection_ in self.electrical_connections: + namespaceprefix_ = self.electrical_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connections_nsprefix_) else '' electricalConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnection', pretty_print=pretty_print) - for electricalConnectionInstance_ in self.electricalConnectionInstance: - namespaceprefix_ = self.electricalConnectionInstance_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnectionInstance_nsprefix_) else '' + for electricalConnectionInstance_ in self.electrical_connection_instances: + namespaceprefix_ = self.electrical_connection_instances_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connection_instances_nsprefix_) else '' electricalConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstance', pretty_print=pretty_print) - for electricalConnectionInstanceW_ in self.electricalConnectionInstanceW: - namespaceprefix_ = self.electricalConnectionInstanceW_nsprefix_ + ':' if (UseCapturedNS_ and self.electricalConnectionInstanceW_nsprefix_) else '' + for electricalConnectionInstanceW_ in self.electrical_connection_instance_ws: + namespaceprefix_ = self.electrical_connection_instance_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connection_instance_ws_nsprefix_) else '' electricalConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstanceW', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -19509,18 +19508,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class_obj_ = self.get_class_obj_(child_, ElectricalConnection) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.electricalConnection.append(obj_) + self.electrical_connections.append(obj_) obj_.original_tagname_ = 'electricalConnection' elif nodeName_ == 'electricalConnectionInstance': class_obj_ = self.get_class_obj_(child_, ElectricalConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.electricalConnectionInstance.append(obj_) + self.electrical_connection_instances.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstance' elif nodeName_ == 'electricalConnectionInstanceW': obj_ = ElectricalConnectionInstanceW.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.electricalConnectionInstanceW.append(obj_) + self.electrical_connection_instance_ws.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstanceW' super(ElectricalProjection, self).buildChildren(child_, node, nodeName_, True) @@ -19606,34 +19605,34 @@ class BaseConnectionNewFormat(BaseConnection): See BaseConnectionOldFormat""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('preCell', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('preSegment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('preFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('postCell', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('postSegment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('postFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('pre_cell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('pre_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('post_cell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('post_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnectionNewFormat, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) - self.preCell = _cast(None, preCell) - self.preCell_nsprefix_ = None - self.preSegment = _cast(int, preSegment) - self.preSegment_nsprefix_ = None - self.preFractionAlong = _cast(float, preFractionAlong) - self.preFractionAlong_nsprefix_ = None - self.postCell = _cast(None, postCell) - self.postCell_nsprefix_ = None - self.postSegment = _cast(int, postSegment) - self.postSegment_nsprefix_ = None - self.postFractionAlong = _cast(float, postFractionAlong) - self.postFractionAlong_nsprefix_ = None + super(BaseConnectionNewFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.pre_cell = _cast(None, pre_cell) + self.pre_cell_nsprefix_ = None + self.pre_segment = _cast(int, pre_segment) + self.pre_segment_nsprefix_ = None + self.pre_fraction_along = _cast(float, pre_fraction_along) + self.pre_fraction_along_nsprefix_ = None + self.post_cell = _cast(None, post_cell) + self.post_cell_nsprefix_ = None + self.post_segment = _cast(int, post_segment) + self.post_segment_nsprefix_ = None + self.post_fraction_along = _cast(float, post_fraction_along) + self.post_fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -19700,24 +19699,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseConnectionNewFormat'): super(BaseConnectionNewFormat, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConnectionNewFormat') - if self.preCell is not None and 'preCell' not in already_processed: - already_processed.add('preCell') - outfile.write(' preCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preCell), input_name='preCell')), )) - if self.preSegment != 0 and 'preSegment' not in already_processed: - already_processed.add('preSegment') - outfile.write(' preSegment="%s"' % self.gds_format_integer(self.preSegment, input_name='preSegment')) - if self.preFractionAlong != 0.5 and 'preFractionAlong' not in already_processed: - already_processed.add('preFractionAlong') - outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.preFractionAlong, input_name='preFractionAlong')) - if self.postCell is not None and 'postCell' not in already_processed: - already_processed.add('postCell') - outfile.write(' postCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postCell), input_name='postCell')), )) - if self.postSegment != 0 and 'postSegment' not in already_processed: - already_processed.add('postSegment') - outfile.write(' postSegment="%s"' % self.gds_format_integer(self.postSegment, input_name='postSegment')) - if self.postFractionAlong != 0.5 and 'postFractionAlong' not in already_processed: - already_processed.add('postFractionAlong') - outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.postFractionAlong, input_name='postFractionAlong')) + if self.pre_cell is not None and 'pre_cell' not in already_processed: + already_processed.add('pre_cell') + outfile.write(' preCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell), input_name='preCell')), )) + if self.pre_segment != 0 and 'pre_segment' not in already_processed: + already_processed.add('pre_segment') + outfile.write(' preSegment="%s"' % self.gds_format_integer(self.pre_segment, input_name='preSegment')) + if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: + already_processed.add('pre_fraction_along') + outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.pre_fraction_along, input_name='preFractionAlong')) + if self.post_cell is not None and 'post_cell' not in already_processed: + already_processed.add('post_cell') + outfile.write(' postCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell), input_name='postCell')), )) + if self.post_segment != 0 and 'post_segment' not in already_processed: + already_processed.add('post_segment') + outfile.write(' postSegment="%s"' % self.gds_format_integer(self.post_segment, input_name='postSegment')) + if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: + already_processed.add('post_fraction_along') + outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.post_fraction_along, input_name='postFractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -19744,37 +19743,37 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCell', node) if value is not None and 'preCell' not in already_processed: already_processed.add('preCell') - self.preCell = value + self.pre_cell = value value = find_attr_value_('preSegment', node) if value is not None and 'preSegment' not in already_processed: already_processed.add('preSegment') - self.preSegment = self.gds_parse_integer(value, node, 'preSegment') - if self.preSegment < 0: + self.pre_segment = self.gds_parse_integer(value, node, 'preSegment') + if self.pre_segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.preSegment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.pre_segment) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') value = self.gds_parse_float(value, node, 'preFractionAlong') self.preFractionAlong = value - self.validate_ZeroToOne(self.preFractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCell', node) if value is not None and 'postCell' not in already_processed: already_processed.add('postCell') - self.postCell = value + self.post_cell = value value = find_attr_value_('postSegment', node) if value is not None and 'postSegment' not in already_processed: already_processed.add('postSegment') - self.postSegment = self.gds_parse_integer(value, node, 'postSegment') - if self.postSegment < 0: + self.post_segment = self.gds_parse_integer(value, node, 'postSegment') + if self.post_segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.postSegment) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.post_segment) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') value = self.gds_parse_float(value, node, 'postFractionAlong') self.postFractionAlong = value - self.validate_ZeroToOne(self.postFractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -19792,34 +19791,34 @@ class BaseConnectionOldFormat(BaseConnection): superfluous, hence BaseConnectionNewFormat""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('preCellId', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('preSegmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('preFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('postCellId', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('postSegmentId', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('postFractionAlong', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('pre_cell_id', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('pre_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('post_cell_id', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('post_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnectionOldFormat, self).__init__(neuroLexId, id, extensiontype_, **kwargs_) - self.preCellId = _cast(None, preCellId) - self.preCellId_nsprefix_ = None - self.preSegmentId = _cast(int, preSegmentId) - self.preSegmentId_nsprefix_ = None - self.preFractionAlong = _cast(float, preFractionAlong) - self.preFractionAlong_nsprefix_ = None - self.postCellId = _cast(None, postCellId) - self.postCellId_nsprefix_ = None - self.postSegmentId = _cast(int, postSegmentId) - self.postSegmentId_nsprefix_ = None - self.postFractionAlong = _cast(float, postFractionAlong) - self.postFractionAlong_nsprefix_ = None + super(BaseConnectionOldFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + self.pre_cell_id = _cast(None, pre_cell_id) + self.pre_cell_id_nsprefix_ = None + self.pre_segment_id = _cast(int, pre_segment_id) + self.pre_segment_id_nsprefix_ = None + self.pre_fraction_along = _cast(float, pre_fraction_along) + self.pre_fraction_along_nsprefix_ = None + self.post_cell_id = _cast(None, post_cell_id) + self.post_cell_id_nsprefix_ = None + self.post_segment_id = _cast(int, post_segment_id) + self.post_segment_id_nsprefix_ = None + self.post_fraction_along = _cast(float, post_fraction_along) + self.post_fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -19886,24 +19885,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseConnectionOldFormat'): super(BaseConnectionOldFormat, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConnectionOldFormat') - if self.preCellId is not None and 'preCellId' not in already_processed: - already_processed.add('preCellId') - outfile.write(' preCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preCellId), input_name='preCellId')), )) - if self.preSegmentId != 0 and 'preSegmentId' not in already_processed: - already_processed.add('preSegmentId') - outfile.write(' preSegmentId="%s"' % self.gds_format_integer(self.preSegmentId, input_name='preSegmentId')) - if self.preFractionAlong != 0.5 and 'preFractionAlong' not in already_processed: - already_processed.add('preFractionAlong') - outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.preFractionAlong, input_name='preFractionAlong')) - if self.postCellId is not None and 'postCellId' not in already_processed: - already_processed.add('postCellId') - outfile.write(' postCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postCellId), input_name='postCellId')), )) - if self.postSegmentId != 0 and 'postSegmentId' not in already_processed: - already_processed.add('postSegmentId') - outfile.write(' postSegmentId="%s"' % self.gds_format_integer(self.postSegmentId, input_name='postSegmentId')) - if self.postFractionAlong != 0.5 and 'postFractionAlong' not in already_processed: - already_processed.add('postFractionAlong') - outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.postFractionAlong, input_name='postFractionAlong')) + if self.pre_cell_id is not None and 'pre_cell_id' not in already_processed: + already_processed.add('pre_cell_id') + outfile.write(' preCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell_id), input_name='preCellId')), )) + if self.pre_segment_id != 0 and 'pre_segment_id' not in already_processed: + already_processed.add('pre_segment_id') + outfile.write(' preSegmentId="%s"' % self.gds_format_integer(self.pre_segment_id, input_name='preSegmentId')) + if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: + already_processed.add('pre_fraction_along') + outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.pre_fraction_along, input_name='preFractionAlong')) + if self.post_cell_id is not None and 'post_cell_id' not in already_processed: + already_processed.add('post_cell_id') + outfile.write(' postCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell_id), input_name='postCellId')), )) + if self.post_segment_id != 0 and 'post_segment_id' not in already_processed: + already_processed.add('post_segment_id') + outfile.write(' postSegmentId="%s"' % self.gds_format_integer(self.post_segment_id, input_name='postSegmentId')) + if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: + already_processed.add('post_fraction_along') + outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.post_fraction_along, input_name='postFractionAlong')) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -19930,37 +19929,37 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCellId', node) if value is not None and 'preCellId' not in already_processed: already_processed.add('preCellId') - self.preCellId = value + self.pre_cell_id = value value = find_attr_value_('preSegmentId', node) if value is not None and 'preSegmentId' not in already_processed: already_processed.add('preSegmentId') - self.preSegmentId = self.gds_parse_integer(value, node, 'preSegmentId') - if self.preSegmentId < 0: + self.pre_segment_id = self.gds_parse_integer(value, node, 'preSegmentId') + if self.pre_segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.preSegmentId) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.pre_segment_id) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') value = self.gds_parse_float(value, node, 'preFractionAlong') self.preFractionAlong = value - self.validate_ZeroToOne(self.preFractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCellId', node) if value is not None and 'postCellId' not in already_processed: already_processed.add('postCellId') - self.postCellId = value + self.post_cell_id = value value = find_attr_value_('postSegmentId', node) if value is not None and 'postSegmentId' not in already_processed: already_processed.add('postSegmentId') - self.postSegmentId = self.gds_parse_integer(value, node, 'postSegmentId') - if self.postSegmentId < 0: + self.post_segment_id = self.gds_parse_integer(value, node, 'postSegmentId') + if self.post_segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - self.validate_NonNegativeInteger(self.postSegmentId) # validate type NonNegativeInteger + self.validate_NonNegativeInteger(self.post_segment_id) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') value = self.gds_parse_float(value, node, 'postFractionAlong') self.postFractionAlong = value - self.validate_ZeroToOne(self.postFractionAlong) # validate type ZeroToOne + self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -19978,30 +19977,30 @@ class Projection(BaseProjection): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('connection', 'Connection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connection', 'type': 'Connection'}, None), - MemberSpec_('connectionWD', 'ConnectionWD', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connectionWD', 'type': 'ConnectionWD'}, None), + MemberSpec_('connections', 'Connection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connection', 'type': 'Connection'}, None), + MemberSpec_('connection_wds', 'ConnectionWD', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connectionWD', 'type': 'ConnectionWD'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuroLexId=None, id=None, presynapticPopulation=None, postsynapticPopulation=None, synapse=None, connection=None, connectionWD=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, synapse=None, connections=None, connection_wds=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Projection, self).__init__(neuroLexId, id, presynapticPopulation, postsynapticPopulation, **kwargs_) + super(Projection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None - if connection is None: - self.connection = [] + if connections is None: + self.connections = [] else: - self.connection = connection - self.connection_nsprefix_ = None - if connectionWD is None: - self.connectionWD = [] + self.connections = connections + self.connections_nsprefix_ = None + if connection_wds is None: + self.connection_wds = [] else: - self.connectionWD = connectionWD - self.connectionWD_nsprefix_ = None + self.connection_wds = connection_wds + self.connection_wds_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20026,8 +20025,8 @@ def validate_NmlId(self, value): validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( - self.connection or - self.connectionWD or + self.connections or + self.connection_wds or super(Projection, self).hasContent_() ): return True @@ -20067,11 +20066,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for connection_ in self.connection: - namespaceprefix_ = self.connection_nsprefix_ + ':' if (UseCapturedNS_ and self.connection_nsprefix_) else '' + for connection_ in self.connections: + namespaceprefix_ = self.connections_nsprefix_ + ':' if (UseCapturedNS_ and self.connections_nsprefix_) else '' connection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connection', pretty_print=pretty_print) - for connectionWD_ in self.connectionWD: - namespaceprefix_ = self.connectionWD_nsprefix_ + ':' if (UseCapturedNS_ and self.connectionWD_nsprefix_) else '' + for connectionWD_ in self.connection_wds: + namespaceprefix_ = self.connection_wds_nsprefix_ + ':' if (UseCapturedNS_ and self.connection_wds_nsprefix_) else '' connectionWD_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connectionWD', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -20095,12 +20094,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'connection': obj_ = Connection.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.connection.append(obj_) + self.connections.append(obj_) obj_.original_tagname_ = 'connection' elif nodeName_ == 'connectionWD': obj_ = ConnectionWD.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.connectionWD.append(obj_) + self.connection_wds.append(obj_) obj_.original_tagname_ = 'connectionWD' super(Projection, self).buildChildren(child_, node, nodeName_, True) @@ -20202,19 +20201,19 @@ def __str__(self): class SpikeGeneratorRefPoisson(SpikeGeneratorPoisson): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('minimumISI', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('minimum_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = SpikeGeneratorPoisson - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, averageRate=None, minimumISI=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, minimum_isi=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorRefPoisson, self).__init__(neuroLexId, id, metaid, notes, property, annotation, averageRate, **kwargs_) - self.minimumISI = _cast(None, minimumISI) - self.minimumISI_nsprefix_ = None + super(SpikeGeneratorRefPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) + self.minimum_isi = _cast(None, minimum_isi) + self.minimum_isi_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20269,9 +20268,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeGeneratorRefPoisson'): super(SpikeGeneratorRefPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRefPoisson') - if self.minimumISI is not None and 'minimumISI' not in already_processed: - already_processed.add('minimumISI') - outfile.write(' minimumISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minimumISI), input_name='minimumISI')), )) + if self.minimum_isi is not None and 'minimum_isi' not in already_processed: + already_processed.add('minimum_isi') + outfile.write(' minimumISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minimum_isi), input_name='minimumISI')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRefPoisson', fromsubclass_=False, pretty_print=True): super(SpikeGeneratorRefPoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -20289,8 +20288,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('minimumISI', node) if value is not None and 'minimumISI' not in already_processed: already_processed.add('minimumISI') - self.minimumISI = value - self.validate_Nml2Quantity_time(self.minimumISI) # validate type Nml2Quantity_time + self.minimum_isi = value + self.validate_Nml2Quantity_time(self.minimum_isi) # validate type Nml2Quantity_time super(SpikeGeneratorRefPoisson, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(SpikeGeneratorRefPoisson, self).buildChildren(child_, node, nodeName_, True) @@ -20301,19 +20300,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ConcentrationModel_D(DecayingPoolConcentrationModel): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type_', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = DecayingPoolConcentrationModel - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, ion=None, restingConc=None, decayConstant=None, shellThickness=None, type_='decayingPoolConcentrationModel', gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, type='decayingPoolConcentrationModel', gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ConcentrationModel_D, self).__init__(neuroLexId, id, metaid, notes, property, annotation, ion, restingConc, decayConstant, shellThickness, **kwargs_) - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + super(ConcentrationModel_D, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) + self.type = _cast(None, type) + self.type_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20357,9 +20356,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConcentrationModel_D'): super(ConcentrationModel_D, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConcentrationModel_D') - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConcentrationModel_D', fromsubclass_=False, pretty_print=True): super(ConcentrationModel_D, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -20377,7 +20376,7 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value + self.type = value super(ConcentrationModel_D, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ConcentrationModel_D, self).buildChildren(child_, node, nodeName_, True) @@ -20391,13 +20390,13 @@ class ChannelDensityNernstCa2(ChannelDensityNernst): ] subclass = None superclass = ChannelDensityNernst - def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNernstCa2, self).__init__(neuroLexId, id, ionChannel, condDensity, segmentGroup, segment, ion, variableParameter, **kwargs_) + super(ChannelDensityNernstCa2, self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20465,19 +20464,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityVShift(ChannelDensity): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('vShift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = ChannelDensity - def __init__(self, neuroLexId=None, id=None, ionChannel=None, condDensity=None, erev=None, segmentGroup='all', segment=None, ion=None, variableParameter=None, vShift=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, v_shift=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityVShift, self).__init__(neuroLexId, id, ionChannel, condDensity, erev, segmentGroup, segment, ion, variableParameter, **kwargs_) - self.vShift = _cast(None, vShift) - self.vShift_nsprefix_ = None + super(ChannelDensityVShift, self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) + self.v_shift = _cast(None, v_shift) + self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20532,9 +20531,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityVShift'): super(ChannelDensityVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityVShift') - if self.vShift is not None and 'vShift' not in already_processed: - already_processed.add('vShift') - outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vShift), input_name='vShift')), )) + if self.v_shift is not None and 'v_shift' not in already_processed: + already_processed.add('v_shift') + outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v_shift), input_name='vShift')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityVShift', fromsubclass_=False, pretty_print=True): super(ChannelDensityVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -20552,8 +20551,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) if value is not None and 'vShift' not in already_processed: already_processed.add('vShift') - self.vShift = value - self.validate_Nml2Quantity_voltage(self.vShift) # validate type Nml2Quantity_voltage + self.v_shift = value + self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage super(ChannelDensityVShift, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ChannelDensityVShift, self).buildChildren(child_, node, nodeName_, True) @@ -20569,27 +20568,27 @@ class Cell(BaseCell): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('morphology_attr', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('biophysicalProperties_attr', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('biophysical_properties_attr', 'NmlId', 0, 1, {'use': 'optional'}), MemberSpec_('morphology', 'Morphology', 0, 1, {'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), - MemberSpec_('biophysicalProperties', 'BiophysicalProperties', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), + MemberSpec_('biophysical_properties', 'BiophysicalProperties', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, morphology_attr=None, biophysicalProperties_attr=None, morphology=None, biophysicalProperties=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.morphology_attr = _cast(None, morphology_attr) self.morphology_attr_nsprefix_ = None - self.biophysicalProperties_attr = _cast(None, biophysicalProperties_attr) - self.biophysicalProperties_attr_nsprefix_ = None + self.biophysical_properties_attr = _cast(None, biophysical_properties_attr) + self.biophysical_properties_attr_nsprefix_ = None self.morphology = morphology self.morphology_nsprefix_ = None - self.biophysicalProperties = biophysicalProperties - self.biophysicalProperties_nsprefix_ = None + self.biophysical_properties = biophysical_properties + self.biophysical_properties_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -20616,7 +20615,7 @@ def validate_NmlId(self, value): def hasContent_(self): if ( self.morphology is not None or - self.biophysicalProperties is not None or + self.biophysical_properties is not None or super(Cell, self).hasContent_() ): return True @@ -20650,9 +20649,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.morphology_attr is not None and 'morphology_attr' not in already_processed: already_processed.add('morphology_attr') outfile.write(' morphology=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.morphology_attr), input_name='morphology_attr')), )) - if self.biophysicalProperties_attr is not None and 'biophysicalProperties_attr' not in already_processed: - already_processed.add('biophysicalProperties_attr') - outfile.write(' biophysicalProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.biophysicalProperties_attr), input_name='biophysicalProperties_attr')), )) + if self.biophysical_properties_attr is not None and 'biophysical_properties_attr' not in already_processed: + already_processed.add('biophysical_properties_attr') + outfile.write(' biophysicalProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.biophysical_properties_attr), input_name='biophysical_properties_attr')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -20670,9 +20669,9 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', if self.morphology is not None: namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' self.morphology.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) - if self.biophysicalProperties is not None: - namespaceprefix_ = self.biophysicalProperties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties_nsprefix_) else '' - self.biophysicalProperties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) + if self.biophysical_properties is not None: + namespaceprefix_ = self.biophysical_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties_nsprefix_) else '' + self.biophysical_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -20691,10 +20690,10 @@ def buildAttributes(self, node, attrs, already_processed): self.morphology_attr = value self.validate_NmlId(self.morphology_attr) # validate type NmlId value = find_attr_value_('biophysicalProperties', node) - if value is not None and 'biophysicalProperties_attr' not in already_processed: - already_processed.add('biophysicalProperties_attr') - self.biophysicalProperties_attr = value - self.validate_NmlId(self.biophysicalProperties_attr) # validate type NmlId + if value is not None and 'biophysical_properties_attr' not in already_processed: + already_processed.add('biophysical_properties_attr') + self.biophysical_properties_attr = value + self.validate_NmlId(self.biophysical_properties_attr) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -20709,7 +20708,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.biophysicalProperties = obj_ + self.biophysical_properties = obj_ obj_.original_tagname_ = 'biophysicalProperties' super(Cell, self).buildChildren(child_, node, nodeName_, True) @@ -21011,22 +21010,22 @@ def summary(self): class PinskyRinzelCA3Cell(BaseCell): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('iSoma', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), - MemberSpec_('iDend', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), + MemberSpec_('i_soma', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), + MemberSpec_('i_dend', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), MemberSpec_('gc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gLs', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gLd', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gNa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gKdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gCa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gKahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gKC', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gNmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gAmpa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('eNa', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('eCa', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('eK', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('eL', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('g_ls', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_ld', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_na', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_kdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_ca', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_kahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_kc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_nmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('g_ampa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), + MemberSpec_('e_na', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('e_ca', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('e_k', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('e_l', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('qd0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), MemberSpec_('pp', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), MemberSpec_('alphac', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), @@ -21035,45 +21034,45 @@ class PinskyRinzelCA3Cell(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, iSoma=None, iDend=None, gc=None, gLs=None, gLd=None, gNa=None, gKdr=None, gCa=None, gKahp=None, gKC=None, gNmda=None, gAmpa=None, eNa=None, eCa=None, eK=None, eL=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, i_soma=None, i_dend=None, gc=None, g_ls=None, g_ld=None, g_na=None, g_kdr=None, g_ca=None, g_kahp=None, g_kc=None, g_nmda=None, g_ampa=None, e_na=None, e_ca=None, e_k=None, e_l=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PinskyRinzelCA3Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) - self.iSoma = _cast(None, iSoma) - self.iSoma_nsprefix_ = None - self.iDend = _cast(None, iDend) - self.iDend_nsprefix_ = None + super(PinskyRinzelCA3Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + self.i_soma = _cast(None, i_soma) + self.i_soma_nsprefix_ = None + self.i_dend = _cast(None, i_dend) + self.i_dend_nsprefix_ = None self.gc = _cast(None, gc) self.gc_nsprefix_ = None - self.gLs = _cast(None, gLs) - self.gLs_nsprefix_ = None - self.gLd = _cast(None, gLd) - self.gLd_nsprefix_ = None - self.gNa = _cast(None, gNa) - self.gNa_nsprefix_ = None - self.gKdr = _cast(None, gKdr) - self.gKdr_nsprefix_ = None - self.gCa = _cast(None, gCa) - self.gCa_nsprefix_ = None - self.gKahp = _cast(None, gKahp) - self.gKahp_nsprefix_ = None - self.gKC = _cast(None, gKC) - self.gKC_nsprefix_ = None - self.gNmda = _cast(None, gNmda) - self.gNmda_nsprefix_ = None - self.gAmpa = _cast(None, gAmpa) - self.gAmpa_nsprefix_ = None - self.eNa = _cast(None, eNa) - self.eNa_nsprefix_ = None - self.eCa = _cast(None, eCa) - self.eCa_nsprefix_ = None - self.eK = _cast(None, eK) - self.eK_nsprefix_ = None - self.eL = _cast(None, eL) - self.eL_nsprefix_ = None + self.g_ls = _cast(None, g_ls) + self.g_ls_nsprefix_ = None + self.g_ld = _cast(None, g_ld) + self.g_ld_nsprefix_ = None + self.g_na = _cast(None, g_na) + self.g_na_nsprefix_ = None + self.g_kdr = _cast(None, g_kdr) + self.g_kdr_nsprefix_ = None + self.g_ca = _cast(None, g_ca) + self.g_ca_nsprefix_ = None + self.g_kahp = _cast(None, g_kahp) + self.g_kahp_nsprefix_ = None + self.g_kc = _cast(None, g_kc) + self.g_kc_nsprefix_ = None + self.g_nmda = _cast(None, g_nmda) + self.g_nmda_nsprefix_ = None + self.g_ampa = _cast(None, g_ampa) + self.g_ampa_nsprefix_ = None + self.e_na = _cast(None, e_na) + self.e_na_nsprefix_ = None + self.e_ca = _cast(None, e_ca) + self.e_ca_nsprefix_ = None + self.e_k = _cast(None, e_k) + self.e_k_nsprefix_ = None + self.e_l = _cast(None, e_l) + self.e_l_nsprefix_ = None self.qd0 = _cast(None, qd0) self.qd0_nsprefix_ = None self.pp = _cast(None, pp) @@ -21182,54 +21181,54 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PinskyRinzelCA3Cell'): super(PinskyRinzelCA3Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PinskyRinzelCA3Cell') - if self.iSoma is not None and 'iSoma' not in already_processed: - already_processed.add('iSoma') - outfile.write(' iSoma=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.iSoma), input_name='iSoma')), )) - if self.iDend is not None and 'iDend' not in already_processed: - already_processed.add('iDend') - outfile.write(' iDend=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.iDend), input_name='iDend')), )) + if self.i_soma is not None and 'i_soma' not in already_processed: + already_processed.add('i_soma') + outfile.write(' iSoma=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.i_soma), input_name='iSoma')), )) + if self.i_dend is not None and 'i_dend' not in already_processed: + already_processed.add('i_dend') + outfile.write(' iDend=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.i_dend), input_name='iDend')), )) if self.gc is not None and 'gc' not in already_processed: already_processed.add('gc') outfile.write(' gc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gc), input_name='gc')), )) - if self.gLs is not None and 'gLs' not in already_processed: - already_processed.add('gLs') - outfile.write(' gLs=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gLs), input_name='gLs')), )) - if self.gLd is not None and 'gLd' not in already_processed: - already_processed.add('gLd') - outfile.write(' gLd=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gLd), input_name='gLd')), )) - if self.gNa is not None and 'gNa' not in already_processed: - already_processed.add('gNa') - outfile.write(' gNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gNa), input_name='gNa')), )) - if self.gKdr is not None and 'gKdr' not in already_processed: - already_processed.add('gKdr') - outfile.write(' gKdr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKdr), input_name='gKdr')), )) - if self.gCa is not None and 'gCa' not in already_processed: - already_processed.add('gCa') - outfile.write(' gCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gCa), input_name='gCa')), )) - if self.gKahp is not None and 'gKahp' not in already_processed: - already_processed.add('gKahp') - outfile.write(' gKahp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKahp), input_name='gKahp')), )) - if self.gKC is not None and 'gKC' not in already_processed: - already_processed.add('gKC') - outfile.write(' gKC=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gKC), input_name='gKC')), )) - if self.gNmda is not None and 'gNmda' not in already_processed: - already_processed.add('gNmda') - outfile.write(' gNmda=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gNmda), input_name='gNmda')), )) - if self.gAmpa is not None and 'gAmpa' not in already_processed: - already_processed.add('gAmpa') - outfile.write(' gAmpa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gAmpa), input_name='gAmpa')), )) - if self.eNa is not None and 'eNa' not in already_processed: - already_processed.add('eNa') - outfile.write(' eNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eNa), input_name='eNa')), )) - if self.eCa is not None and 'eCa' not in already_processed: - already_processed.add('eCa') - outfile.write(' eCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eCa), input_name='eCa')), )) - if self.eK is not None and 'eK' not in already_processed: - already_processed.add('eK') - outfile.write(' eK=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eK), input_name='eK')), )) - if self.eL is not None and 'eL' not in already_processed: - already_processed.add('eL') - outfile.write(' eL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.eL), input_name='eL')), )) + if self.g_ls is not None and 'g_ls' not in already_processed: + already_processed.add('g_ls') + outfile.write(' gLs=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ls), input_name='gLs')), )) + if self.g_ld is not None and 'g_ld' not in already_processed: + already_processed.add('g_ld') + outfile.write(' gLd=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ld), input_name='gLd')), )) + if self.g_na is not None and 'g_na' not in already_processed: + already_processed.add('g_na') + outfile.write(' gNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_na), input_name='gNa')), )) + if self.g_kdr is not None and 'g_kdr' not in already_processed: + already_processed.add('g_kdr') + outfile.write(' gKdr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kdr), input_name='gKdr')), )) + if self.g_ca is not None and 'g_ca' not in already_processed: + already_processed.add('g_ca') + outfile.write(' gCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ca), input_name='gCa')), )) + if self.g_kahp is not None and 'g_kahp' not in already_processed: + already_processed.add('g_kahp') + outfile.write(' gKahp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kahp), input_name='gKahp')), )) + if self.g_kc is not None and 'g_kc' not in already_processed: + already_processed.add('g_kc') + outfile.write(' gKC=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kc), input_name='gKC')), )) + if self.g_nmda is not None and 'g_nmda' not in already_processed: + already_processed.add('g_nmda') + outfile.write(' gNmda=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_nmda), input_name='gNmda')), )) + if self.g_ampa is not None and 'g_ampa' not in already_processed: + already_processed.add('g_ampa') + outfile.write(' gAmpa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ampa), input_name='gAmpa')), )) + if self.e_na is not None and 'e_na' not in already_processed: + already_processed.add('e_na') + outfile.write(' eNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_na), input_name='eNa')), )) + if self.e_ca is not None and 'e_ca' not in already_processed: + already_processed.add('e_ca') + outfile.write(' eCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_ca), input_name='eCa')), )) + if self.e_k is not None and 'e_k' not in already_processed: + already_processed.add('e_k') + outfile.write(' eK=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_k), input_name='eK')), )) + if self.e_l is not None and 'e_l' not in already_processed: + already_processed.add('e_l') + outfile.write(' eL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_l), input_name='eL')), )) if self.qd0 is not None and 'qd0' not in already_processed: already_processed.add('qd0') outfile.write(' qd0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.qd0), input_name='qd0')), )) @@ -21262,13 +21261,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('iSoma', node) if value is not None and 'iSoma' not in already_processed: already_processed.add('iSoma') - self.iSoma = value - self.validate_Nml2Quantity_currentDensity(self.iSoma) # validate type Nml2Quantity_currentDensity + self.i_soma = value + self.validate_Nml2Quantity_currentDensity(self.i_soma) # validate type Nml2Quantity_currentDensity value = find_attr_value_('iDend', node) if value is not None and 'iDend' not in already_processed: already_processed.add('iDend') - self.iDend = value - self.validate_Nml2Quantity_currentDensity(self.iDend) # validate type Nml2Quantity_currentDensity + self.i_dend = value + self.validate_Nml2Quantity_currentDensity(self.i_dend) # validate type Nml2Quantity_currentDensity value = find_attr_value_('gc', node) if value is not None and 'gc' not in already_processed: already_processed.add('gc') @@ -21277,68 +21276,68 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gLs', node) if value is not None and 'gLs' not in already_processed: already_processed.add('gLs') - self.gLs = value - self.validate_Nml2Quantity_conductanceDensity(self.gLs) # validate type Nml2Quantity_conductanceDensity + self.g_ls = value + self.validate_Nml2Quantity_conductanceDensity(self.g_ls) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gLd', node) if value is not None and 'gLd' not in already_processed: already_processed.add('gLd') - self.gLd = value - self.validate_Nml2Quantity_conductanceDensity(self.gLd) # validate type Nml2Quantity_conductanceDensity + self.g_ld = value + self.validate_Nml2Quantity_conductanceDensity(self.g_ld) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gNa', node) if value is not None and 'gNa' not in already_processed: already_processed.add('gNa') - self.gNa = value - self.validate_Nml2Quantity_conductanceDensity(self.gNa) # validate type Nml2Quantity_conductanceDensity + self.g_na = value + self.validate_Nml2Quantity_conductanceDensity(self.g_na) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKdr', node) if value is not None and 'gKdr' not in already_processed: already_processed.add('gKdr') - self.gKdr = value - self.validate_Nml2Quantity_conductanceDensity(self.gKdr) # validate type Nml2Quantity_conductanceDensity + self.g_kdr = value + self.validate_Nml2Quantity_conductanceDensity(self.g_kdr) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gCa', node) if value is not None and 'gCa' not in already_processed: already_processed.add('gCa') - self.gCa = value - self.validate_Nml2Quantity_conductanceDensity(self.gCa) # validate type Nml2Quantity_conductanceDensity + self.g_ca = value + self.validate_Nml2Quantity_conductanceDensity(self.g_ca) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKahp', node) if value is not None and 'gKahp' not in already_processed: already_processed.add('gKahp') - self.gKahp = value - self.validate_Nml2Quantity_conductanceDensity(self.gKahp) # validate type Nml2Quantity_conductanceDensity + self.g_kahp = value + self.validate_Nml2Quantity_conductanceDensity(self.g_kahp) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gKC', node) if value is not None and 'gKC' not in already_processed: already_processed.add('gKC') - self.gKC = value - self.validate_Nml2Quantity_conductanceDensity(self.gKC) # validate type Nml2Quantity_conductanceDensity + self.g_kc = value + self.validate_Nml2Quantity_conductanceDensity(self.g_kc) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gNmda', node) if value is not None and 'gNmda' not in already_processed: already_processed.add('gNmda') - self.gNmda = value - self.validate_Nml2Quantity_conductanceDensity(self.gNmda) # validate type Nml2Quantity_conductanceDensity + self.g_nmda = value + self.validate_Nml2Quantity_conductanceDensity(self.g_nmda) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('gAmpa', node) if value is not None and 'gAmpa' not in already_processed: already_processed.add('gAmpa') - self.gAmpa = value - self.validate_Nml2Quantity_conductanceDensity(self.gAmpa) # validate type Nml2Quantity_conductanceDensity + self.g_ampa = value + self.validate_Nml2Quantity_conductanceDensity(self.g_ampa) # validate type Nml2Quantity_conductanceDensity value = find_attr_value_('eNa', node) if value is not None and 'eNa' not in already_processed: already_processed.add('eNa') - self.eNa = value - self.validate_Nml2Quantity_voltage(self.eNa) # validate type Nml2Quantity_voltage + self.e_na = value + self.validate_Nml2Quantity_voltage(self.e_na) # validate type Nml2Quantity_voltage value = find_attr_value_('eCa', node) if value is not None and 'eCa' not in already_processed: already_processed.add('eCa') - self.eCa = value - self.validate_Nml2Quantity_voltage(self.eCa) # validate type Nml2Quantity_voltage + self.e_ca = value + self.validate_Nml2Quantity_voltage(self.e_ca) # validate type Nml2Quantity_voltage value = find_attr_value_('eK', node) if value is not None and 'eK' not in already_processed: already_processed.add('eK') - self.eK = value - self.validate_Nml2Quantity_voltage(self.eK) # validate type Nml2Quantity_voltage + self.e_k = value + self.validate_Nml2Quantity_voltage(self.e_k) # validate type Nml2Quantity_voltage value = find_attr_value_('eL', node) if value is not None and 'eL' not in already_processed: already_processed.add('eL') - self.eL = value - self.validate_Nml2Quantity_voltage(self.eL) # validate type Nml2Quantity_voltage + self.e_l = value + self.validate_Nml2Quantity_voltage(self.e_l) # validate type Nml2Quantity_voltage value = find_attr_value_('qd0', node) if value is not None and 'qd0' not in already_processed: already_processed.add('qd0') @@ -21383,13 +21382,13 @@ class FitzHughNagumo1969Cell(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FitzHughNagumo1969Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(FitzHughNagumo1969Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.a = _cast(None, a) self.a_nsprefix_ = None self.b = _cast(None, b) @@ -21532,13 +21531,13 @@ class FitzHughNagumoCell(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, I=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, I=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FitzHughNagumoCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(FitzHughNagumoCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.I = _cast(None, I) self.I_nsprefix_ = None def factory(*args_, **kwargs_): @@ -21633,13 +21632,13 @@ class BaseCellMembPotCap(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCellMembPotCap, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseCellMembPotCap, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.C = _cast(None, C) self.C_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -21750,13 +21749,13 @@ class IzhikevichCell(BaseCell): ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IzhikevichCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(IzhikevichCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.v0 = _cast(None, v0) self.v0_nsprefix_ = None self.thresh = _cast(None, thresh) @@ -21906,31 +21905,31 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IafCell(BaseCell): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leakReversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': 'required'}), - MemberSpec_('leakConductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('leak_conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, C=None, leakConductance=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) - self.leakReversal = _cast(None, leakReversal) - self.leakReversal_nsprefix_ = None + super(IafCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.leak_reversal = _cast(None, leak_reversal) + self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) self.thresh_nsprefix_ = None self.reset = _cast(None, reset) self.reset_nsprefix_ = None self.C = _cast(None, C) self.C_nsprefix_ = None - self.leakConductance = _cast(None, leakConductance) - self.leakConductance_nsprefix_ = None + self.leak_conductance = _cast(None, leak_conductance) + self.leak_conductance_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22008,9 +22007,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IafCell'): super(IafCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafCell') - if self.leakReversal is not None and 'leakReversal' not in already_processed: - already_processed.add('leakReversal') - outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakReversal), input_name='leakReversal')), )) + if self.leak_reversal is not None and 'leak_reversal' not in already_processed: + already_processed.add('leak_reversal') + outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_reversal), input_name='leakReversal')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) @@ -22020,9 +22019,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.C is not None and 'C' not in already_processed: already_processed.add('C') outfile.write(' C=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.C), input_name='C')), )) - if self.leakConductance is not None and 'leakConductance' not in already_processed: - already_processed.add('leakConductance') - outfile.write(' leakConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakConductance), input_name='leakConductance')), )) + if self.leak_conductance is not None and 'leak_conductance' not in already_processed: + already_processed.add('leak_conductance') + outfile.write(' leakConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_conductance), input_name='leakConductance')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -22048,8 +22047,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) if value is not None and 'leakReversal' not in already_processed: already_processed.add('leakReversal') - self.leakReversal = value - self.validate_Nml2Quantity_voltage(self.leakReversal) # validate type Nml2Quantity_voltage + self.leak_reversal = value + self.validate_Nml2Quantity_voltage(self.leak_reversal) # validate type Nml2Quantity_voltage value = find_attr_value_('thresh', node) if value is not None and 'thresh' not in already_processed: already_processed.add('thresh') @@ -22068,8 +22067,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakConductance', node) if value is not None and 'leakConductance' not in already_processed: already_processed.add('leakConductance') - self.leakConductance = value - self.validate_Nml2Quantity_conductance(self.leakConductance) # validate type Nml2Quantity_conductance + self.leak_conductance = value + self.validate_Nml2Quantity_conductance(self.leak_conductance) # validate type Nml2Quantity_conductance value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -22084,22 +22083,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IafTauCell(BaseCell): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leakReversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafTauCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) - self.leakReversal = _cast(None, leakReversal) - self.leakReversal_nsprefix_ = None + super(IafTauCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + self.leak_reversal = _cast(None, leak_reversal) + self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) self.thresh_nsprefix_ = None self.reset = _cast(None, reset) @@ -22172,9 +22171,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IafTauCell'): super(IafTauCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafTauCell') - if self.leakReversal is not None and 'leakReversal' not in already_processed: - already_processed.add('leakReversal') - outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leakReversal), input_name='leakReversal')), )) + if self.leak_reversal is not None and 'leak_reversal' not in already_processed: + already_processed.add('leak_reversal') + outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_reversal), input_name='leakReversal')), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) @@ -22209,8 +22208,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) if value is not None and 'leakReversal' not in already_processed: already_processed.add('leakReversal') - self.leakReversal = value - self.validate_Nml2Quantity_voltage(self.leakReversal) # validate type Nml2Quantity_voltage + self.leak_reversal = value + self.validate_Nml2Quantity_voltage(self.leak_reversal) # validate type Nml2Quantity_voltage value = find_attr_value_('thresh', node) if value is not None and 'thresh' not in already_processed: already_processed.add('thresh') @@ -22250,13 +22249,13 @@ class GradedSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GradedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(GradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None self.delta = _cast(None, delta) @@ -22412,13 +22411,13 @@ class LinearGradedSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(LinearGradedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(LinearGradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): @@ -22512,13 +22511,13 @@ class SilentSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SilentSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(SilentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22591,13 +22590,13 @@ class GapJunction(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GapJunction, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(GapJunction, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): @@ -22689,13 +22688,13 @@ class BaseCurrentBasedSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCurrentBasedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseCurrentBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22779,13 +22778,13 @@ class BaseVoltageDepSynapse(BaseSynapse): ] subclass = None superclass = BaseSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseVoltageDepSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseVoltageDepSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22871,72 +22870,72 @@ class IonChannel(IonChannelScalable): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('type_', 'channelTypes', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'channelTypes', 0, 1, {'use': 'optional'}), MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), - MemberSpec_('gate', 'GateHHUndetermined', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gate', 'type': 'GateHHUndetermined'}, 1), - MemberSpec_('gateHHrates', 'GateHHRates', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHrates', 'type': 'GateHHRates'}, 1), - MemberSpec_('gateHHratesTau', 'GateHHRatesTau', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTau', 'type': 'GateHHRatesTau'}, 1), - MemberSpec_('gateHHtauInf', 'GateHHTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHtauInf', 'type': 'GateHHTauInf'}, 1), - MemberSpec_('gateHHratesInf', 'GateHHRatesInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesInf', 'type': 'GateHHRatesInf'}, 1), - MemberSpec_('gateHHratesTauInf', 'GateHHRatesTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTauInf', 'type': 'GateHHRatesTauInf'}, 1), - MemberSpec_('gateHHInstantaneous', 'GateHHInstantaneous', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHInstantaneous', 'type': 'GateHHInstantaneous'}, 1), - MemberSpec_('gateFractional', 'GateFractional', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateFractional', 'type': 'GateFractional'}, 1), + MemberSpec_('gates', 'GateHHUndetermined', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gate', 'type': 'GateHHUndetermined'}, 1), + MemberSpec_('gate_hh_rates', 'GateHHRates', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHrates', 'type': 'GateHHRates'}, 1), + MemberSpec_('gate_h_hrates_taus', 'GateHHRatesTau', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTau', 'type': 'GateHHRatesTau'}, 1), + MemberSpec_('gate_hh_tau_infs', 'GateHHTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHtauInf', 'type': 'GateHHTauInf'}, 1), + MemberSpec_('gate_h_hrates_infs', 'GateHHRatesInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesInf', 'type': 'GateHHRatesInf'}, 1), + MemberSpec_('gate_h_hrates_tau_infs', 'GateHHRatesTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTauInf', 'type': 'GateHHRatesTauInf'}, 1), + MemberSpec_('gate_hh_instantaneouses', 'GateHHInstantaneous', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHInstantaneous', 'type': 'GateHHInstantaneous'}, 1), + MemberSpec_('gate_fractionals', 'GateFractional', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateFractional', 'type': 'GateFractional'}, 1), ] subclass = None superclass = IonChannelScalable - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannel, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, extensiontype_, **kwargs_) + super(IonChannel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) self.species = _cast(None, species) self.species_nsprefix_ = None - self.type_ = _cast(None, type_) - self.type__nsprefix_ = None + self.type = _cast(None, type) + self.type_nsprefix_ = None self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None - if gate is None: - self.gate = [] - else: - self.gate = gate - self.gate_nsprefix_ = None - if gateHHrates is None: - self.gateHHrates = [] - else: - self.gateHHrates = gateHHrates - self.gateHHrates_nsprefix_ = None - if gateHHratesTau is None: - self.gateHHratesTau = [] - else: - self.gateHHratesTau = gateHHratesTau - self.gateHHratesTau_nsprefix_ = None - if gateHHtauInf is None: - self.gateHHtauInf = [] - else: - self.gateHHtauInf = gateHHtauInf - self.gateHHtauInf_nsprefix_ = None - if gateHHratesInf is None: - self.gateHHratesInf = [] - else: - self.gateHHratesInf = gateHHratesInf - self.gateHHratesInf_nsprefix_ = None - if gateHHratesTauInf is None: - self.gateHHratesTauInf = [] - else: - self.gateHHratesTauInf = gateHHratesTauInf - self.gateHHratesTauInf_nsprefix_ = None - if gateHHInstantaneous is None: - self.gateHHInstantaneous = [] - else: - self.gateHHInstantaneous = gateHHInstantaneous - self.gateHHInstantaneous_nsprefix_ = None - if gateFractional is None: - self.gateFractional = [] - else: - self.gateFractional = gateFractional - self.gateFractional_nsprefix_ = None + if gates is None: + self.gates = [] + else: + self.gates = gates + self.gates_nsprefix_ = None + if gate_hh_rates is None: + self.gate_hh_rates = [] + else: + self.gate_hh_rates = gate_hh_rates + self.gate_hh_rates_nsprefix_ = None + if gate_h_hrates_taus is None: + self.gate_h_hrates_taus = [] + else: + self.gate_h_hrates_taus = gate_h_hrates_taus + self.gate_h_hrates_taus_nsprefix_ = None + if gate_hh_tau_infs is None: + self.gate_hh_tau_infs = [] + else: + self.gate_hh_tau_infs = gate_hh_tau_infs + self.gate_hh_tau_infs_nsprefix_ = None + if gate_h_hrates_infs is None: + self.gate_h_hrates_infs = [] + else: + self.gate_h_hrates_infs = gate_h_hrates_infs + self.gate_h_hrates_infs_nsprefix_ = None + if gate_h_hrates_tau_infs is None: + self.gate_h_hrates_tau_infs = [] + else: + self.gate_h_hrates_tau_infs = gate_h_hrates_tau_infs + self.gate_h_hrates_tau_infs_nsprefix_ = None + if gate_hh_instantaneouses is None: + self.gate_hh_instantaneouses = [] + else: + self.gate_hh_instantaneouses = gate_hh_instantaneouses + self.gate_hh_instantaneouses_nsprefix_ = None + if gate_fractionals is None: + self.gate_fractionals = [] + else: + self.gate_fractionals = gate_fractionals + self.gate_fractionals_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22986,14 +22985,14 @@ def validate_Nml2Quantity_conductance(self, value): validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] def hasContent_(self): if ( - self.gate or - self.gateHHrates or - self.gateHHratesTau or - self.gateHHtauInf or - self.gateHHratesInf or - self.gateHHratesTauInf or - self.gateHHInstantaneous or - self.gateFractional or + self.gates or + self.gate_hh_rates or + self.gate_h_hrates_taus or + self.gate_hh_tau_infs or + self.gate_h_hrates_infs or + self.gate_h_hrates_tau_infs or + self.gate_hh_instantaneouses or + self.gate_fractionals or super(IonChannel, self).hasContent_() ): return True @@ -23027,9 +23026,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.species is not None and 'species' not in already_processed: already_processed.add('species') outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) - if self.type_ is not None and 'type_' not in already_processed: - already_processed.add('type_') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), )) + if self.type is not None and 'type' not in already_processed: + already_processed.add('type') + outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) @@ -23047,29 +23046,29 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for gate_ in self.gate: - namespaceprefix_ = self.gate_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_nsprefix_) else '' + for gate_ in self.gates: + namespaceprefix_ = self.gates_nsprefix_ + ':' if (UseCapturedNS_ and self.gates_nsprefix_) else '' gate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gate', pretty_print=pretty_print) - for gateHHrates_ in self.gateHHrates: - namespaceprefix_ = self.gateHHrates_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHrates_nsprefix_) else '' + for gateHHrates_ in self.gate_hh_rates: + namespaceprefix_ = self.gate_hh_rates_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_rates_nsprefix_) else '' gateHHrates_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHrates', pretty_print=pretty_print) - for gateHHratesTau_ in self.gateHHratesTau: - namespaceprefix_ = self.gateHHratesTau_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesTau_nsprefix_) else '' + for gateHHratesTau_ in self.gate_h_hrates_taus: + namespaceprefix_ = self.gate_h_hrates_taus_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_taus_nsprefix_) else '' gateHHratesTau_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTau', pretty_print=pretty_print) - for gateHHtauInf_ in self.gateHHtauInf: - namespaceprefix_ = self.gateHHtauInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHtauInf_nsprefix_) else '' + for gateHHtauInf_ in self.gate_hh_tau_infs: + namespaceprefix_ = self.gate_hh_tau_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_tau_infs_nsprefix_) else '' gateHHtauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHtauInf', pretty_print=pretty_print) - for gateHHratesInf_ in self.gateHHratesInf: - namespaceprefix_ = self.gateHHratesInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesInf_nsprefix_) else '' + for gateHHratesInf_ in self.gate_h_hrates_infs: + namespaceprefix_ = self.gate_h_hrates_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_infs_nsprefix_) else '' gateHHratesInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesInf', pretty_print=pretty_print) - for gateHHratesTauInf_ in self.gateHHratesTauInf: - namespaceprefix_ = self.gateHHratesTauInf_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHratesTauInf_nsprefix_) else '' + for gateHHratesTauInf_ in self.gate_h_hrates_tau_infs: + namespaceprefix_ = self.gate_h_hrates_tau_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_tau_infs_nsprefix_) else '' gateHHratesTauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTauInf', pretty_print=pretty_print) - for gateHHInstantaneous_ in self.gateHHInstantaneous: - namespaceprefix_ = self.gateHHInstantaneous_nsprefix_ + ':' if (UseCapturedNS_ and self.gateHHInstantaneous_nsprefix_) else '' + for gateHHInstantaneous_ in self.gate_hh_instantaneouses: + namespaceprefix_ = self.gate_hh_instantaneouses_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_instantaneouses_nsprefix_) else '' gateHHInstantaneous_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHInstantaneous', pretty_print=pretty_print) - for gateFractional_ in self.gateFractional: - namespaceprefix_ = self.gateFractional_nsprefix_ + ':' if (UseCapturedNS_ and self.gateFractional_nsprefix_) else '' + for gateFractional_ in self.gate_fractionals: + namespaceprefix_ = self.gate_fractionals_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_fractionals_nsprefix_) else '' gateFractional_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateFractional', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ @@ -23091,8 +23090,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) if value is not None and 'type' not in already_processed: already_processed.add('type') - self.type_ = value - self.validate_channelTypes(self.type_) # validate type channelTypes + self.type = value + self.validate_channelTypes(self.type) # validate type channelTypes value = find_attr_value_('conductance', node) if value is not None and 'conductance' not in already_processed: already_processed.add('conductance') @@ -23107,42 +23106,42 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'gate': obj_ = GateHHUndetermined.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gate.append(obj_) + self.gates.append(obj_) obj_.original_tagname_ = 'gate' elif nodeName_ == 'gateHHrates': obj_ = GateHHRates.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHrates.append(obj_) + self.gate_hh_rates.append(obj_) obj_.original_tagname_ = 'gateHHrates' elif nodeName_ == 'gateHHratesTau': obj_ = GateHHRatesTau.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHratesTau.append(obj_) + self.gate_h_hrates_taus.append(obj_) obj_.original_tagname_ = 'gateHHratesTau' elif nodeName_ == 'gateHHtauInf': obj_ = GateHHTauInf.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHtauInf.append(obj_) + self.gate_hh_tau_infs.append(obj_) obj_.original_tagname_ = 'gateHHtauInf' elif nodeName_ == 'gateHHratesInf': obj_ = GateHHRatesInf.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHratesInf.append(obj_) + self.gate_h_hrates_infs.append(obj_) obj_.original_tagname_ = 'gateHHratesInf' elif nodeName_ == 'gateHHratesTauInf': obj_ = GateHHRatesTauInf.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHratesTauInf.append(obj_) + self.gate_h_hrates_tau_infs.append(obj_) obj_.original_tagname_ = 'gateHHratesTauInf' elif nodeName_ == 'gateHHInstantaneous': obj_ = GateHHInstantaneous.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateHHInstantaneous.append(obj_) + self.gate_hh_instantaneouses.append(obj_) obj_.original_tagname_ = 'gateHHInstantaneous' elif nodeName_ == 'gateFractional': obj_ = GateFractional.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.gateFractional.append(obj_) + self.gate_fractionals.append(obj_) obj_.original_tagname_ = 'gateFractional' super(IonChannel, self).buildChildren(child_, node, nodeName_, True) # end class IonChannel @@ -23154,13 +23153,13 @@ class AlphaCurrSynapse(BasePynnSynapse): ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCurrSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) + super(AlphaCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23231,13 +23230,13 @@ class ExpCurrSynapse(BasePynnSynapse): ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpCurrSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) + super(ExpCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23309,13 +23308,13 @@ class AlphaCondSynapse(BasePynnSynapse): ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCondSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) + super(AlphaCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): @@ -23397,13 +23396,13 @@ class ExpCondSynapse(BasePynnSynapse): ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpCondSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, tau_syn, **kwargs_) + super(ExpCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): @@ -23493,13 +23492,13 @@ class HH_cond_exp(basePyNNCell): ] subclass = None superclass = basePyNNCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(HH_cond_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) + super(HH_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) self.v_offset = _cast(float, v_offset) self.v_offset_nsprefix_ = None self.e_rev_E = _cast(float, e_rev_E) @@ -23665,13 +23664,13 @@ class basePyNNIaFCell(basePyNNCell): ] subclass = None superclass = basePyNNCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNIaFCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) + super(basePyNNIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) self.tau_m = _cast(float, tau_m) self.tau_m_nsprefix_ = None self.tau_refrac = _cast(float, tau_refrac) @@ -23803,22 +23802,22 @@ class ContinuousConnection(BaseConnectionNewFormat): """Individual continuous/analog synaptic connection""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('preComponent', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('postComponent', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('pre_component', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('post_component', 'NmlId', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnection, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, extensiontype_, **kwargs_) - self.preComponent = _cast(None, preComponent) - self.preComponent_nsprefix_ = None - self.postComponent = _cast(None, postComponent) - self.postComponent_nsprefix_ = None + super(ContinuousConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + self.pre_component = _cast(None, pre_component) + self.pre_component_nsprefix_ = None + self.post_component = _cast(None, post_component) + self.post_component_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -23873,12 +23872,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ContinuousConnection'): super(ContinuousConnection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContinuousConnection') - if self.preComponent is not None and 'preComponent' not in already_processed: - already_processed.add('preComponent') - outfile.write(' preComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.preComponent), input_name='preComponent')), )) - if self.postComponent is not None and 'postComponent' not in already_processed: - already_processed.add('postComponent') - outfile.write(' postComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postComponent), input_name='postComponent')), )) + if self.pre_component is not None and 'pre_component' not in already_processed: + already_processed.add('pre_component') + outfile.write(' preComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_component), input_name='preComponent')), )) + if self.post_component is not None and 'post_component' not in already_processed: + already_processed.add('post_component') + outfile.write(' postComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_component), input_name='postComponent')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -23905,13 +23904,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preComponent', node) if value is not None and 'preComponent' not in already_processed: already_processed.add('preComponent') - self.preComponent = value - self.validate_NmlId(self.preComponent) # validate type NmlId + self.pre_component = value + self.validate_NmlId(self.pre_component) # validate type NmlId value = find_attr_value_('postComponent', node) if value is not None and 'postComponent' not in already_processed: already_processed.add('postComponent') - self.postComponent = value - self.validate_NmlId(self.postComponent) # validate type NmlId + self.post_component = value + self.validate_NmlId(self.post_component) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -23975,13 +23974,13 @@ class ElectricalConnection(BaseConnectionNewFormat): ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnection, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, extensiontype_, **kwargs_) + super(ElectricalConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -24132,13 +24131,13 @@ class ConnectionWD(BaseConnectionOldFormat): ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', weight=None, delay=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', weight=None, delay=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ConnectionWD, self).__init__(neuroLexId, id, preCellId, preSegmentId, preFractionAlong, postCellId, postSegmentId, postFractionAlong, **kwargs_) + super(ConnectionWD, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None self.delay = _cast(None, delay) @@ -24297,13 +24296,13 @@ class Connection(BaseConnectionOldFormat): ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuroLexId=None, id=None, preCellId=None, preSegmentId='0', preFractionAlong='0.5', postCellId=None, postSegmentId='0', postFractionAlong='0.5', gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Connection, self).__init__(neuroLexId, id, preCellId, preSegmentId, preFractionAlong, postCellId, postSegmentId, postFractionAlong, **kwargs_) + super(Connection, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -24415,19 +24414,19 @@ def __str__(self): class Cell2CaPools(Cell): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('biophysicalProperties2CaPools', 'BiophysicalProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties2CaPools', 'type': 'BiophysicalProperties2CaPools'}, None), + MemberSpec_('biophysical_properties2_ca_pools', 'BiophysicalProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties2CaPools', 'type': 'BiophysicalProperties2CaPools'}, None), ] subclass = None superclass = Cell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, morphology_attr=None, biophysicalProperties_attr=None, morphology=None, biophysicalProperties=None, biophysicalProperties2CaPools=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, biophysical_properties2_ca_pools=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Cell2CaPools, self).__init__(neuroLexId, id, metaid, notes, property, annotation, morphology_attr, biophysicalProperties_attr, morphology, biophysicalProperties, **kwargs_) - self.biophysicalProperties2CaPools = biophysicalProperties2CaPools - self.biophysicalProperties2CaPools_nsprefix_ = None + super(Cell2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) + self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools + self.biophysical_properties2_ca_pools_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -24441,7 +24440,7 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.biophysicalProperties2CaPools is not None or + self.biophysical_properties2_ca_pools is not None or super(Cell2CaPools, self).hasContent_() ): return True @@ -24478,9 +24477,9 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - if self.biophysicalProperties2CaPools is not None: - namespaceprefix_ = self.biophysicalProperties2CaPools_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysicalProperties2CaPools_nsprefix_) else '' - self.biophysicalProperties2CaPools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties2CaPools', pretty_print=pretty_print) + if self.biophysical_properties2_ca_pools is not None: + namespaceprefix_ = self.biophysical_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties2_ca_pools_nsprefix_) else '' + self.biophysical_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties2CaPools', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -24498,7 +24497,7 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'biophysicalProperties2CaPools': obj_ = BiophysicalProperties2CaPools.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.biophysicalProperties2CaPools = obj_ + self.biophysical_properties2_ca_pools = obj_ obj_.original_tagname_ = 'biophysicalProperties2CaPools' super(Cell2CaPools, self).buildChildren(child_, node, nodeName_, True) # end class Cell2CaPools @@ -24507,12 +24506,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class AdExIaFCell(BaseCellMembPotCap): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('gL', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('g_l', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), MemberSpec_('EL', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('VT', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('delT', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('del_t', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), MemberSpec_('tauw', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), MemberSpec_('a', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), @@ -24520,15 +24519,15 @@ class AdExIaFCell(BaseCellMembPotCap): ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, gL=None, EL=None, reset=None, VT=None, thresh=None, delT=None, tauw=None, refract=None, a=None, b=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, g_l=None, EL=None, reset=None, VT=None, thresh=None, del_t=None, tauw=None, refract=None, a=None, b=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AdExIaFCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, C, **kwargs_) - self.gL = _cast(None, gL) - self.gL_nsprefix_ = None + super(AdExIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + self.g_l = _cast(None, g_l) + self.g_l_nsprefix_ = None self.EL = _cast(None, EL) self.EL_nsprefix_ = None self.reset = _cast(None, reset) @@ -24537,8 +24536,8 @@ def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=N self.VT_nsprefix_ = None self.thresh = _cast(None, thresh) self.thresh_nsprefix_ = None - self.delT = _cast(None, delT) - self.delT_nsprefix_ = None + self.del_t = _cast(None, del_t) + self.del_t_nsprefix_ = None self.tauw = _cast(None, tauw) self.tauw_nsprefix_ = None self.refract = _cast(None, refract) @@ -24634,9 +24633,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AdExIaFCell'): super(AdExIaFCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdExIaFCell') - if self.gL is not None and 'gL' not in already_processed: - already_processed.add('gL') - outfile.write(' gL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gL), input_name='gL')), )) + if self.g_l is not None and 'g_l' not in already_processed: + already_processed.add('g_l') + outfile.write(' gL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_l), input_name='gL')), )) if self.EL is not None and 'EL' not in already_processed: already_processed.add('EL') outfile.write(' EL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EL), input_name='EL')), )) @@ -24649,9 +24648,9 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) - if self.delT is not None and 'delT' not in already_processed: - already_processed.add('delT') - outfile.write(' delT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delT), input_name='delT')), )) + if self.del_t is not None and 'del_t' not in already_processed: + already_processed.add('del_t') + outfile.write(' delT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.del_t), input_name='delT')), )) if self.tauw is not None and 'tauw' not in already_processed: already_processed.add('tauw') outfile.write(' tauw=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauw), input_name='tauw')), )) @@ -24681,8 +24680,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gL', node) if value is not None and 'gL' not in already_processed: already_processed.add('gL') - self.gL = value - self.validate_Nml2Quantity_conductance(self.gL) # validate type Nml2Quantity_conductance + self.g_l = value + self.validate_Nml2Quantity_conductance(self.g_l) # validate type Nml2Quantity_conductance value = find_attr_value_('EL', node) if value is not None and 'EL' not in already_processed: already_processed.add('EL') @@ -24706,8 +24705,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delT', node) if value is not None and 'delT' not in already_processed: already_processed.add('delT') - self.delT = value - self.validate_Nml2Quantity_voltage(self.delT) # validate type Nml2Quantity_voltage + self.del_t = value + self.validate_Nml2Quantity_voltage(self.del_t) # validate type Nml2Quantity_voltage value = find_attr_value_('tauw', node) if value is not None and 'tauw' not in already_processed: already_processed.add('tauw') @@ -24750,13 +24749,13 @@ class Izhikevich2007Cell(BaseCellMembPotCap): ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Izhikevich2007Cell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, C, **kwargs_) + super(Izhikevich2007Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) self.v0 = _cast(None, v0) self.v0_nsprefix_ = None self.k = _cast(None, k) @@ -24973,13 +24972,13 @@ class IafRefCell(IafCell): ] subclass = None superclass = IafCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, C=None, leakConductance=None, refract=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, refract=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafRefCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, leakReversal, thresh, reset, C, leakConductance, **kwargs_) + super(IafRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) self.refract = _cast(None, refract) self.refract_nsprefix_ = None def factory(*args_, **kwargs_): @@ -25072,13 +25071,13 @@ class IafTauRefCell(IafTauCell): ] subclass = None superclass = IafTauCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, leakReversal=None, thresh=None, reset=None, tau=None, refract=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, refract=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafTauRefCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, leakReversal, thresh, reset, tau, **kwargs_) + super(IafTauRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) self.refract = _cast(None, refract) self.refract_nsprefix_ = None def factory(*args_, **kwargs_): @@ -25169,26 +25168,26 @@ class DoubleSynapse(BaseVoltageDepSynapse): member_data_items_ = [ MemberSpec_('synapse1', 'NmlId', 0, 0, {'use': 'required'}), MemberSpec_('synapse2', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('synapse1Path', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('synapse2Path', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('synapse1_path', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('synapse2_path', 'xs:string', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, synapse1=None, synapse2=None, synapse1Path=None, synapse2Path=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse1=None, synapse2=None, synapse1_path=None, synapse2_path=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(DoubleSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(DoubleSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse1 = _cast(None, synapse1) self.synapse1_nsprefix_ = None self.synapse2 = _cast(None, synapse2) self.synapse2_nsprefix_ = None - self.synapse1Path = _cast(None, synapse1Path) - self.synapse1Path_nsprefix_ = None - self.synapse2Path = _cast(None, synapse2Path) - self.synapse2Path_nsprefix_ = None + self.synapse1_path = _cast(None, synapse1_path) + self.synapse1_path_nsprefix_ = None + self.synapse2_path = _cast(None, synapse2_path) + self.synapse2_path_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25249,12 +25248,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.synapse2 is not None and 'synapse2' not in already_processed: already_processed.add('synapse2') outfile.write(' synapse2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2), input_name='synapse2')), )) - if self.synapse1Path is not None and 'synapse1Path' not in already_processed: - already_processed.add('synapse1Path') - outfile.write(' synapse1Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1Path), input_name='synapse1Path')), )) - if self.synapse2Path is not None and 'synapse2Path' not in already_processed: - already_processed.add('synapse2Path') - outfile.write(' synapse2Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2Path), input_name='synapse2Path')), )) + if self.synapse1_path is not None and 'synapse1_path' not in already_processed: + already_processed.add('synapse1_path') + outfile.write(' synapse1Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1_path), input_name='synapse1Path')), )) + if self.synapse2_path is not None and 'synapse2_path' not in already_processed: + already_processed.add('synapse2_path') + outfile.write(' synapse2Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2_path), input_name='synapse2Path')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoubleSynapse', fromsubclass_=False, pretty_print=True): super(DoubleSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -25282,11 +25281,11 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse1Path', node) if value is not None and 'synapse1Path' not in already_processed: already_processed.add('synapse1Path') - self.synapse1Path = value + self.synapse1_path = value value = find_attr_value_('synapse2Path', node) if value is not None and 'synapse2Path' not in already_processed: already_processed.add('synapse2Path') - self.synapse2Path = value + self.synapse2_path = value super(DoubleSynapse, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(DoubleSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -25302,13 +25301,13 @@ class AlphaCurrentSynapse(BaseCurrentBasedSynapse): ] subclass = None superclass = BaseCurrentBasedSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, tau=None, ibase=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau=None, ibase=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCurrentSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, **kwargs_) + super(AlphaCurrentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.tau = _cast(None, tau) self.tau_nsprefix_ = None self.ibase = _cast(None, ibase) @@ -25424,13 +25423,13 @@ class BaseConductanceBasedSynapseTwo(BaseVoltageDepSynapse): ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConductanceBasedSynapseTwo, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseConductanceBasedSynapseTwo, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase1 = _cast(None, gbase1) self.gbase1_nsprefix_ = None self.gbase2 = _cast(None, gbase2) @@ -25568,13 +25567,13 @@ class BaseConductanceBasedSynapse(BaseVoltageDepSynapse): ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConductanceBasedSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, extensiontype_, **kwargs_) + super(BaseConductanceBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase = _cast(None, gbase) self.gbase_nsprefix_ = None self.erev = _cast(None, erev) @@ -25700,19 +25699,19 @@ class IonChannelVShift(IonChannel): is determined by the individual gates.""" __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('vShift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), ] subclass = None superclass = IonChannel - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, vShift=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, v_shift=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelVShift, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, species, type_, conductance, gate, gateHHrates, gateHHratesTau, gateHHtauInf, gateHHratesInf, gateHHratesTauInf, gateHHInstantaneous, gateFractional, **kwargs_) - self.vShift = _cast(None, vShift) - self.vShift_nsprefix_ = None + super(IonChannelVShift, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + self.v_shift = _cast(None, v_shift) + self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25767,9 +25766,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelVShift'): super(IonChannelVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelVShift') - if self.vShift is not None and 'vShift' not in already_processed: - already_processed.add('vShift') - outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vShift), input_name='vShift')), )) + if self.v_shift is not None and 'v_shift' not in already_processed: + already_processed.add('v_shift') + outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v_shift), input_name='vShift')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelVShift', fromsubclass_=False, pretty_print=True): super(IonChannelVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -25787,8 +25786,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) if value is not None and 'vShift' not in already_processed: already_processed.add('vShift') - self.vShift = value - self.validate_Nml2Quantity_voltage(self.vShift) # validate type Nml2Quantity_voltage + self.v_shift = value + self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage super(IonChannelVShift, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(IonChannelVShift, self).buildChildren(child_, node, nodeName_, True) @@ -25806,13 +25805,13 @@ class IonChannelHH(IonChannel): ] subclass = None superclass = IonChannel - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, q10ConductanceScaling=None, species=None, type_=None, conductance=None, gate=None, gateHHrates=None, gateHHratesTau=None, gateHHtauInf=None, gateHHratesInf=None, gateHHratesTauInf=None, gateHHInstantaneous=None, gateFractional=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelHH, self).__init__(neuroLexId, id, metaid, notes, property, annotation, q10ConductanceScaling, species, type_, conductance, gate, gateHHrates, gateHHratesTau, gateHHtauInf, gateHHratesInf, gateHHratesTauInf, gateHHInstantaneous, gateFractional, **kwargs_) + super(IonChannelHH, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25883,13 +25882,13 @@ class IF_curr_exp(basePyNNIaFCell): ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_curr_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(IF_curr_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25960,13 +25959,13 @@ class IF_curr_alpha(basePyNNIaFCell): ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_curr_alpha, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(IF_curr_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26039,13 +26038,13 @@ class basePyNNIaFCondCell(basePyNNIaFCell): ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNIaFCondCell, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) + super(basePyNNIaFCondCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) self.e_rev_E = _cast(float, e_rev_E) self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) @@ -26150,13 +26149,13 @@ class ContinuousConnectionInstance(ContinuousConnection): ] subclass = None superclass = ContinuousConnection - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnectionInstance, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, preComponent, postComponent, extensiontype_, **kwargs_) + super(ContinuousConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26255,13 +26254,13 @@ class ElectricalConnectionInstance(ElectricalConnection): ] subclass = None superclass = ElectricalConnection - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnectionInstance, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, synapse, extensiontype_, **kwargs_) + super(ElectricalConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26354,25 +26353,25 @@ def __str__(self): class ExpThreeSynapse(BaseConductanceBasedSynapseTwo): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tauDecay1', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tauDecay2', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tauRise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay1', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay2', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapseTwo - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase1=None, gbase2=None, erev=None, tauDecay1=None, tauDecay2=None, tauRise=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, tau_decay1=None, tau_decay2=None, tau_rise=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpThreeSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase1, gbase2, erev, **kwargs_) - self.tauDecay1 = _cast(None, tauDecay1) - self.tauDecay1_nsprefix_ = None - self.tauDecay2 = _cast(None, tauDecay2) - self.tauDecay2_nsprefix_ = None - self.tauRise = _cast(None, tauRise) - self.tauRise_nsprefix_ = None + super(ExpThreeSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) + self.tau_decay1 = _cast(None, tau_decay1) + self.tau_decay1_nsprefix_ = None + self.tau_decay2 = _cast(None, tau_decay2) + self.tau_decay2_nsprefix_ = None + self.tau_rise = _cast(None, tau_rise) + self.tau_rise_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26427,15 +26426,15 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpThreeSynapse'): super(ExpThreeSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpThreeSynapse') - if self.tauDecay1 is not None and 'tauDecay1' not in already_processed: - already_processed.add('tauDecay1') - outfile.write(' tauDecay1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay1), input_name='tauDecay1')), )) - if self.tauDecay2 is not None and 'tauDecay2' not in already_processed: - already_processed.add('tauDecay2') - outfile.write(' tauDecay2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay2), input_name='tauDecay2')), )) - if self.tauRise is not None and 'tauRise' not in already_processed: - already_processed.add('tauRise') - outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRise), input_name='tauRise')), )) + if self.tau_decay1 is not None and 'tau_decay1' not in already_processed: + already_processed.add('tau_decay1') + outfile.write(' tauDecay1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay1), input_name='tauDecay1')), )) + if self.tau_decay2 is not None and 'tau_decay2' not in already_processed: + already_processed.add('tau_decay2') + outfile.write(' tauDecay2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay2), input_name='tauDecay2')), )) + if self.tau_rise is not None and 'tau_rise' not in already_processed: + already_processed.add('tau_rise') + outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rise), input_name='tauRise')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpThreeSynapse', fromsubclass_=False, pretty_print=True): super(ExpThreeSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -26453,18 +26452,18 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay1', node) if value is not None and 'tauDecay1' not in already_processed: already_processed.add('tauDecay1') - self.tauDecay1 = value - self.validate_Nml2Quantity_time(self.tauDecay1) # validate type Nml2Quantity_time + self.tau_decay1 = value + self.validate_Nml2Quantity_time(self.tau_decay1) # validate type Nml2Quantity_time value = find_attr_value_('tauDecay2', node) if value is not None and 'tauDecay2' not in already_processed: already_processed.add('tauDecay2') - self.tauDecay2 = value - self.validate_Nml2Quantity_time(self.tauDecay2) # validate type Nml2Quantity_time + self.tau_decay2 = value + self.validate_Nml2Quantity_time(self.tau_decay2) # validate type Nml2Quantity_time value = find_attr_value_('tauRise', node) if value is not None and 'tauRise' not in already_processed: already_processed.add('tauRise') - self.tauRise = value - self.validate_Nml2Quantity_time(self.tauRise) # validate type Nml2Quantity_time + self.tau_rise = value + self.validate_Nml2Quantity_time(self.tau_rise) # validate type Nml2Quantity_time super(ExpThreeSynapse, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpThreeSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -26475,22 +26474,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ExpTwoSynapse(BaseConductanceBasedSynapse): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tauDecay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tauRise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, tauRise=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpTwoSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, extensiontype_, **kwargs_) - self.tauDecay = _cast(None, tauDecay) - self.tauDecay_nsprefix_ = None - self.tauRise = _cast(None, tauRise) - self.tauRise_nsprefix_ = None + super(ExpTwoSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) + self.tau_decay = _cast(None, tau_decay) + self.tau_decay_nsprefix_ = None + self.tau_rise = _cast(None, tau_rise) + self.tau_rise_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26546,12 +26545,12 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpTwoSynapse'): super(ExpTwoSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpTwoSynapse') - if self.tauDecay is not None and 'tauDecay' not in already_processed: - already_processed.add('tauDecay') - outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay), input_name='tauDecay')), )) - if self.tauRise is not None and 'tauRise' not in already_processed: - already_processed.add('tauRise') - outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauRise), input_name='tauRise')), )) + if self.tau_decay is not None and 'tau_decay' not in already_processed: + already_processed.add('tau_decay') + outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay), input_name='tauDecay')), )) + if self.tau_rise is not None and 'tau_rise' not in already_processed: + already_processed.add('tau_rise') + outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rise), input_name='tauRise')), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') @@ -26577,13 +26576,13 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) if value is not None and 'tauDecay' not in already_processed: already_processed.add('tauDecay') - self.tauDecay = value - self.validate_Nml2Quantity_time(self.tauDecay) # validate type Nml2Quantity_time + self.tau_decay = value + self.validate_Nml2Quantity_time(self.tau_decay) # validate type Nml2Quantity_time value = find_attr_value_('tauRise', node) if value is not None and 'tauRise' not in already_processed: already_processed.add('tauRise') - self.tauRise = value - self.validate_Nml2Quantity_time(self.tauRise) # validate type Nml2Quantity_time + self.tau_rise = value + self.validate_Nml2Quantity_time(self.tau_rise) # validate type Nml2Quantity_time value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') @@ -26598,19 +26597,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ExpOneSynapse(BaseConductanceBasedSynapse): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tauDecay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpOneSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, **kwargs_) - self.tauDecay = _cast(None, tauDecay) - self.tauDecay_nsprefix_ = None + super(ExpOneSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + self.tau_decay = _cast(None, tau_decay) + self.tau_decay_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26665,9 +26664,9 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpOneSynapse'): super(ExpOneSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpOneSynapse') - if self.tauDecay is not None and 'tauDecay' not in already_processed: - already_processed.add('tauDecay') - outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauDecay), input_name='tauDecay')), )) + if self.tau_decay is not None and 'tau_decay' not in already_processed: + already_processed.add('tau_decay') + outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay), input_name='tauDecay')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpOneSynapse', fromsubclass_=False, pretty_print=True): super(ExpOneSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) def build(self, node, gds_collector_=None): @@ -26685,8 +26684,8 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) if value is not None and 'tauDecay' not in already_processed: already_processed.add('tauDecay') - self.tauDecay = value - self.validate_Nml2Quantity_time(self.tauDecay) # validate type Nml2Quantity_time + self.tau_decay = value + self.validate_Nml2Quantity_time(self.tau_decay) # validate type Nml2Quantity_time super(ExpOneSynapse, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(ExpOneSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -26701,13 +26700,13 @@ class AlphaSynapse(BaseConductanceBasedSynapse): ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tau=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, **kwargs_) + super(AlphaSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) self.tau = _cast(None, tau) self.tau_nsprefix_ = None def factory(*args_, **kwargs_): @@ -26804,13 +26803,13 @@ class EIF_cond_exp_isfa_ista(basePyNNIaFCondCell): ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(EIF_cond_exp_isfa_ista, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) + super(EIF_cond_exp_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) self.a = _cast(float, a) self.a_nsprefix_ = None self.b = _cast(float, b) @@ -26944,13 +26943,13 @@ class IF_cond_exp(basePyNNIaFCondCell): ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_cond_exp, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(IF_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27021,13 +27020,13 @@ class IF_cond_alpha(basePyNNIaFCondCell): ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_cond_alpha, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(IF_cond_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27101,13 +27100,13 @@ class ContinuousConnectionInstanceW(ContinuousConnectionInstance): ] subclass = None superclass = ContinuousConnectionInstance - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', preComponent=None, postComponent=None, weight=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, weight=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnectionInstanceW, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, preComponent, postComponent, **kwargs_) + super(ContinuousConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -27202,13 +27201,13 @@ class ElectricalConnectionInstanceW(ElectricalConnectionInstance): ] subclass = None superclass = ElectricalConnectionInstance - def __init__(self, neuroLexId=None, id=None, preCell=None, preSegment='0', preFractionAlong='0.5', postCell=None, postSegment='0', postFractionAlong='0.5', synapse=None, weight=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, weight=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnectionInstanceW, self).__init__(neuroLexId, id, preCell, preSegment, preFractionAlong, postCell, postSegment, postFractionAlong, synapse, **kwargs_) + super(ElectricalConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -27295,22 +27294,22 @@ def __str__(self): class BlockingPlasticSynapse(ExpTwoSynapse): __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('plasticityMechanism', 'PlasticityMechanism', 0, 1, {'minOccurs': '0', 'name': 'plasticityMechanism', 'type': 'PlasticityMechanism'}, None), - MemberSpec_('blockMechanism', 'BlockMechanism', 0, 1, {'minOccurs': '0', 'name': 'blockMechanism', 'type': 'BlockMechanism'}, None), + MemberSpec_('plasticity_mechanism', 'PlasticityMechanism', 0, 1, {'minOccurs': '0', 'name': 'plasticityMechanism', 'type': 'PlasticityMechanism'}, None), + MemberSpec_('block_mechanism', 'BlockMechanism', 0, 1, {'minOccurs': '0', 'name': 'blockMechanism', 'type': 'BlockMechanism'}, None), ] subclass = None superclass = ExpTwoSynapse - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, gbase=None, erev=None, tauDecay=None, tauRise=None, plasticityMechanism=None, blockMechanism=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, plasticity_mechanism=None, block_mechanism=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BlockingPlasticSynapse, self).__init__(neuroLexId, id, metaid, notes, property, annotation, gbase, erev, tauDecay, tauRise, **kwargs_) - self.plasticityMechanism = plasticityMechanism - self.plasticityMechanism_nsprefix_ = None - self.blockMechanism = blockMechanism - self.blockMechanism_nsprefix_ = None + super(BlockingPlasticSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) + self.plasticity_mechanism = plasticity_mechanism + self.plasticity_mechanism_nsprefix_ = None + self.block_mechanism = block_mechanism + self.block_mechanism_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27324,8 +27323,8 @@ def factory(*args_, **kwargs_): factory = staticmethod(factory) def hasContent_(self): if ( - self.plasticityMechanism is not None or - self.blockMechanism is not None or + self.plasticity_mechanism is not None or + self.block_mechanism is not None or super(BlockingPlasticSynapse, self).hasContent_() ): return True @@ -27362,12 +27361,12 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - if self.plasticityMechanism is not None: - namespaceprefix_ = self.plasticityMechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.plasticityMechanism_nsprefix_) else '' - self.plasticityMechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plasticityMechanism', pretty_print=pretty_print) - if self.blockMechanism is not None: - namespaceprefix_ = self.blockMechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.blockMechanism_nsprefix_) else '' - self.blockMechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockMechanism', pretty_print=pretty_print) + if self.plasticity_mechanism is not None: + namespaceprefix_ = self.plasticity_mechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.plasticity_mechanism_nsprefix_) else '' + self.plasticity_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plasticityMechanism', pretty_print=pretty_print) + if self.block_mechanism is not None: + namespaceprefix_ = self.block_mechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.block_mechanism_nsprefix_) else '' + self.block_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockMechanism', pretty_print=pretty_print) def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -27385,12 +27384,12 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec if nodeName_ == 'plasticityMechanism': obj_ = PlasticityMechanism.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.plasticityMechanism = obj_ + self.plasticity_mechanism = obj_ obj_.original_tagname_ = 'plasticityMechanism' elif nodeName_ == 'blockMechanism': obj_ = BlockMechanism.factory(parent_object_=self) obj_.build(child_, gds_collector_=gds_collector_) - self.blockMechanism = obj_ + self.block_mechanism = obj_ obj_.original_tagname_ = 'blockMechanism' super(BlockingPlasticSynapse, self).buildChildren(child_, node, nodeName_, True) # end class BlockingPlasticSynapse @@ -27402,13 +27401,13 @@ class EIF_cond_alpha_isfa_ista(EIF_cond_exp_isfa_ista): ] subclass = None superclass = EIF_cond_exp_isfa_ista - def __init__(self, neuroLexId=None, id=None, metaid=None, notes=None, property=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, gds_collector_=None, **kwargs_): + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, gds_collector_=None, **kwargs_): self.gds_collector_ = gds_collector_ self.gds_elementtree_node_ = None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(EIF_cond_alpha_isfa_ista, self).__init__(neuroLexId, id, metaid, notes, property, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) + super(EIF_cond_alpha_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27529,12 +27528,12 @@ def parse(inFileName, silence=False, print_warnings=True): if not SaveElementTreeNode: doc = None rootNode = None -## if not silence: -## sys.stdout.write('\n') -## rootObj.export( -## sys.stdout, 0, name_=rootTag, -## namespacedef_=namespacedefs, -## pretty_print=True) + if not silence: + sys.stdout.write('\n') + rootObj.export( + sys.stdout, 0, name_=rootTag, + namespacedef_=namespacedefs, + pretty_print=True) if print_warnings and len(gds_collector.get_messages()) > 0: separator = ('-' * 50) + '\n' sys.stderr.write(separator) @@ -27563,12 +27562,12 @@ def parseEtree(inFileName, silence=False, print_warnings=True): if not SaveElementTreeNode: doc = None rootNode = None -## if not silence: -## content = etree_.tostring( -## rootElement, pretty_print=True, -## xml_declaration=True, encoding="utf-8") -## sys.stdout.write(str(content)) -## sys.stdout.write('\n') + if not silence: + content = etree_.tostring( + rootElement, pretty_print=True, + xml_declaration=True, encoding="utf-8") + sys.stdout.write(str(content)) + sys.stdout.write('\n') if print_warnings and len(gds_collector.get_messages()) > 0: separator = ('-' * 50) + '\n' sys.stderr.write(separator) @@ -27599,11 +27598,11 @@ def parseString(inString, silence=False, print_warnings=True): rootObj.build(rootNode, gds_collector_=gds_collector) if not SaveElementTreeNode: rootNode = None -## if not silence: -## sys.stdout.write('\n') -## rootObj.export( -## sys.stdout, 0, name_=rootTag, -## namespacedef_='') + if not silence: + sys.stdout.write('\n') + rootObj.export( + sys.stdout, 0, name_=rootTag, + namespacedef_='') if print_warnings and len(gds_collector.get_messages()) > 0: separator = ('-' * 50) + '\n' sys.stderr.write(separator) @@ -27629,12 +27628,12 @@ def parseLiteral(inFileName, silence=False, print_warnings=True): if not SaveElementTreeNode: doc = None rootNode = None -## if not silence: -## sys.stdout.write('#from nml import *\n\n') -## sys.stdout.write('import nml as model_\n\n') -## sys.stdout.write('rootObj = model_.rootClass(\n') -## rootObj.exportLiteral(sys.stdout, 0, name_=rootTag) -## sys.stdout.write(')\n') + if not silence: + sys.stdout.write('#from nml import *\n\n') + sys.stdout.write('import nml as model_\n\n') + sys.stdout.write('rootObj = model_.rootClass(\n') + rootObj.exportLiteral(sys.stdout, 0, name_=rootTag) + sys.stdout.write(')\n') if print_warnings and len(gds_collector.get_messages()) > 0: separator = ('-' * 50) + '\n' sys.stderr.write(separator) From df160d6cb766d76ff201be593dcef75932269890 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 11:41:03 +0000 Subject: [PATCH 20/27] chore(nml.py): update readme to note generateds_config usage --- neuroml/nml/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/neuroml/nml/README.md b/neuroml/nml/README.md index 245c930c..6c550771 100644 --- a/neuroml/nml/README.md +++ b/neuroml/nml/README.md @@ -17,6 +17,16 @@ You may have to add the current folder to your PYTHONPATH, i.e. export PYTHONPATH=$PYTHONPATH:. +Note that generateDS.py will import the generateds_config.py file and run it. +Your output should, therefore, include lines of the form: + + generateds_config.py is being processed + Saving NameTable to csv file: name_table.csv + Saving name changes table to csv file: changed_names.csv + + +If these are not included in the output, generateds_config.py has not run, and the generated nml.py file will be incorrect. + ### Changelog #### March 26, 2020 From 87d3e572dc28f9f121496259b4f8936ecc822e43 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 11:42:46 +0000 Subject: [PATCH 21/27] style: whitespace fixes --- neuroml/test/test_xml_parser.py | 42 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/neuroml/test/test_xml_parser.py b/neuroml/test/test_xml_parser.py index 1fa8473f..2fa1824d 100644 --- a/neuroml/test/test_xml_parser.py +++ b/neuroml/test/test_xml_parser.py @@ -15,39 +15,39 @@ except ImportError: import unittest + class TestNeuroMLXMLParser(unittest.TestCase): - + def test_parse(self): - base_dir = os.path.dirname(__file__) #base_dir = '.' - + logging.basicConfig(level=logging.INFO, format="%(name)-19s %(levelname)-5s - %(message)s") - - for f in ['simplenet.nml','testh5.nml','pyr_4_sym.cell.nml','MediumNet.net.nml','complete.nml']: - + + for f in ['simplenet.nml','testh5.nml','pyr_4_sym.cell.nml','MediumNet.net.nml','complete.nml']: + file_name = base_dir+'/../examples/test_files/'+f nml_doc0 = loaders.read_neuroml2_file(file_name, include_includes=True, verbose=True) - + summary0 = nml_doc0.summary(show_includes=False,show_non_network=False) print('\n'+summary0) from neuroml.hdf5.DefaultNetworkHandler import DefaultNetworkHandler - nmlHandler = DefaultNetworkHandler() + nmlHandler = DefaultNetworkHandler() - currParser = NeuroMLXMLParser(nmlHandler) + currParser = NeuroMLXMLParser(nmlHandler) currParser.parse(file_name) print('-------------------------------\n\n') - nmlHandler = NetworkBuilder() + nmlHandler = NetworkBuilder() - currParser = NeuroMLXMLParser(nmlHandler) + currParser = NeuroMLXMLParser(nmlHandler) currParser.parse(file_name) @@ -63,32 +63,28 @@ def test_parse(self): import neuroml.writers as writers writers.NeuroMLWriter.write(nml_doc, nml_file) print("Written network file to: "+nml_file) - - + def runTest(self): print("Running tests in TestNeuroMLXMLParser") - - - + + def compare(s1,s2): - if s1==s2: print("Same!") return - + l1 = s1.split('\n') l2 = s2.split('\n') - + for i in range(min(len(l1),len(l2))): if not l1[i]==l2[i]: print("Mismatch at line %i:\n>>> %s\n<<< %s"%(i,l1[i],l2[i])) if len(l1)!=len(l2): print("Different number of lines!") - + assert(s1==s2) - + if __name__ == '__main__': - tnxp = TestNeuroMLXMLParser() - tnxp.test_parse() \ No newline at end of file + tnxp.test_parse() From 702d9b3e30d04a678e8b9fc1c35e647c9743547d Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 14:37:40 +0000 Subject: [PATCH 22/27] chore(nml.py): regenerate with newest generateds.py --- neuroml/nml/nml.py | 1489 ++++++++++++++++++++++++++++++++------------ 1 file changed, 1097 insertions(+), 392 deletions(-) diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index f55154e2..617b98e3 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # -# Generated Fri Mar 26 11:39:57 2021 by generateDS.py version 2.35.5. +# Generated Fri Mar 26 14:33:58 2021 by generateDS.py version 2.38.3. # Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] # # Command line options: @@ -11,25 +11,29 @@ # ('--user-methods', 'helper_methods.py') # # Command line arguments: -# ./NeuroML_v2.1.xsd +# NeuroML_v2.1.xsd # # Command line: -# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" ./NeuroML_v2.1.xsd +# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" NeuroML_v2.1.xsd # # Current working directory (os.getcwd()): # nml # +import sys +try: + ModulenotfoundExp_ = ModuleNotFoundError +except NameError: + ModulenotfoundExp_ = ImportError from six.moves import zip_longest import os -import sys import re as re_ import base64 import datetime as datetime_ import decimal as decimal_ try: from lxml import etree as etree_ -except ImportError: +except ModulenotfoundExp_ : from xml.etree import ElementTree as etree_ @@ -108,11 +112,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): try: from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ -except ImportError: +except ModulenotfoundExp_ : GenerateDSNamespaceDefs_ = {} try: from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ -except ImportError: +except ModulenotfoundExp_ : GenerateDSNamespaceTypePrefixes_ = {} # @@ -123,7 +127,7 @@ def parsexmlstring_(instring, parser=None, **kwargs): # try: from generatedscollector import GdsCollector as GdsCollector_ -except ImportError: +except ModulenotfoundExp_ : class GdsCollector_(object): @@ -157,7 +161,7 @@ def write_messages(self, outstream): try: from enum import Enum -except ImportError: +except ModulenotfoundExp_ : Enum = object # @@ -169,7 +173,7 @@ def write_messages(self, outstream): try: from generatedssuper import GeneratedsSuper -except ImportError as exp: +except ModulenotfoundExp_ as exp: class GeneratedsSuper(object): __hash__ = object.__hash__ @@ -212,6 +216,8 @@ def gds_validate_integer(self, input_data, node=None, input_name=''): raise_parse_error(node, 'Requires integer value') return value def gds_format_integer_list(self, input_data, input_name=''): + if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): + input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_integer_list( self, input_data, node=None, input_name=''): @@ -220,7 +226,7 @@ def gds_validate_integer_list( try: int(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of integer valuess') + raise_parse_error(node, 'Requires sequence of integer values') return values def gds_format_float(self, input_data, input_name=''): return ('%.15f' % input_data).rstrip('0') @@ -237,6 +243,8 @@ def gds_validate_float(self, input_data, node=None, input_name=''): raise_parse_error(node, 'Requires float value') return value def gds_format_float_list(self, input_data, input_name=''): + if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): + input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_float_list( self, input_data, node=None, input_name=''): @@ -248,7 +256,12 @@ def gds_validate_float_list( raise_parse_error(node, 'Requires sequence of float values') return values def gds_format_decimal(self, input_data, input_name=''): - return ('%0.10f' % input_data).rstrip('0') + return_value = '%s' % input_data + if '.' in return_value: + return_value = return_value.rstrip('0') + if return_value.endswith('.'): + return_value = return_value.rstrip('.') + return return_value def gds_parse_decimal(self, input_data, node=None, input_name=''): try: decimal_value = decimal_.Decimal(input_data) @@ -262,7 +275,9 @@ def gds_validate_decimal(self, input_data, node=None, input_name=''): raise_parse_error(node, 'Requires decimal value') return value def gds_format_decimal_list(self, input_data, input_name=''): - return '%s' % ' '.join(input_data) + if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): + input_data = [str(s) for s in input_data] + return ' '.join([self.gds_format_decimal(item) for item in input_data]) def gds_validate_decimal_list( self, input_data, node=None, input_name=''): values = input_data.split() @@ -273,7 +288,7 @@ def gds_validate_decimal_list( raise_parse_error(node, 'Requires sequence of decimal values') return values def gds_format_double(self, input_data, input_name=''): - return '%e' % input_data + return '%s' % input_data def gds_parse_double(self, input_data, node=None, input_name=''): try: fval_ = float(input_data) @@ -287,6 +302,8 @@ def gds_validate_double(self, input_data, node=None, input_name=''): raise_parse_error(node, 'Requires double or float value') return value def gds_format_double_list(self, input_data, input_name=''): + if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): + input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_double_list( self, input_data, node=None, input_name=''): @@ -316,6 +333,8 @@ def gds_validate_boolean(self, input_data, node=None, input_name=''): '(one of True, 1, False, 0)') return input_data def gds_format_boolean_list(self, input_data, input_name=''): + if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): + input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_boolean_list( self, input_data, node=None, input_name=''): @@ -767,7 +786,10 @@ def find_attr_value_(attr_name, node): value = attrs.get(attr_name) elif len(attr_parts) == 2: prefix, name = attr_parts - namespace = node.nsmap.get(prefix) + if prefix == 'xml': + namespace = 'http://www.w3.org/XML/1998/namespace' + else: + namespace = node.nsmap.get(prefix) if namespace is not None: value = attrs.get('{%s}%s' % (namespace, name, )) return value @@ -848,7 +870,7 @@ def exportSimple(self, outfile, level, name): self.name, base64.b64encode(self.value), self.name)) - def to_etree(self, element): + def to_etree(self, element, mapping_=None, nsmap_=None): if self.category == MixedContainer.CategoryText: # Prevent exporting empty content as empty lines. if self.value.strip(): @@ -868,7 +890,7 @@ def to_etree(self, element): subelement.text = self.to_etree_simple() else: # category == MixedContainer.CategoryComplex self.value.to_etree(element) - def to_etree_simple(self): + def to_etree_simple(self, mapping_=None, nsmap_=None): if self.content_type == MixedContainer.TypeString: text = self.value elif (self.content_type == MixedContainer.TypeInteger or @@ -946,27 +968,27 @@ def _cast(typ, value): # -class BlockTypes(Enum): +class BlockTypes(str, Enum): VOLTAGE_CONC_DEP_BLOCK_MECHANISM='voltageConcDepBlockMechanism' -class Metric(Enum): +class Metric(str, Enum): """Allowed metrics for InhomogeneousParam""" PATH_LENGTHFROMROOT='Path Length from root' -class PlasticityTypes(Enum): +class PlasticityTypes(str, Enum): TSODYKS_MARKRAM_DEP_MECHANISM='tsodyksMarkramDepMechanism' TSODYKS_MARKRAM_DEP_FAC_MECHANISM='tsodyksMarkramDepFacMechanism' -class ZeroOrOne(Enum): +class ZeroOrOne(str, Enum): """Value which is either 0 or 1""" _0='0' _1='1' -class allowedSpaces(Enum): +class allowedSpaces(str, Enum): EUCLIDEAN__1_D='Euclidean_1D' EUCLIDEAN__2_D='Euclidean_2D' EUCLIDEAN__3_D='Euclidean_3D' @@ -975,12 +997,12 @@ class allowedSpaces(Enum): GRID__3_D='Grid_3D' -class channelTypes(Enum): +class channelTypes(str, Enum): ION_CHANNEL_PASSIVE='ionChannelPassive' ION_CHANNEL_HH='ionChannelHH' -class gateTypes(Enum): +class gateTypes(str, Enum): GATE_H_HRATES='gateHHrates' GATE_H_HRATES_TAU='gateHHratesTau' GATE_H_HTAU_INF='gateHHtauInf' @@ -991,12 +1013,12 @@ class gateTypes(Enum): GATE_FRACTIONAL='gateFractional' -class networkTypes(Enum): +class networkTypes(str, Enum): NETWORK='network' NETWORK_WITH_TEMPERATURE='networkWithTemperature' -class populationTypes(Enum): +class populationTypes(str, Enum): POPULATION='population' POPULATION_LIST='populationList' @@ -1046,7 +1068,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Property': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1138,7 +1160,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Annotation': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1160,8 +1182,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xm eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -1278,7 +1303,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ComponentType': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1454,7 +1479,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Constant': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1565,7 +1590,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Exposure': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1668,7 +1693,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'NamedDimensionalType': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1786,7 +1811,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'NamedDimensionalVariable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1872,7 +1897,7 @@ def __init__(self, name=None, dimension=None, description=None, gds_collector_=N self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Parameter, self).__init__(name, dimension, description, **kwargs_) + super(globals().get("Parameter"), self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1899,7 +1924,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Parameter': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -1950,7 +1975,7 @@ def __init__(self, name=None, dimension=None, description=None, default_value=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(LEMS_Property, self).__init__(name, dimension, description, **kwargs_) + super(globals().get("LEMS_Property"), self).__init__(name, dimension, description, **kwargs_) self.default_value = _cast(float, default_value) self.default_value_nsprefix_ = None def factory(*args_, **kwargs_): @@ -1979,7 +2004,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'LEMS_Property': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2017,7 +2042,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'defaultValue' not in already_processed: already_processed.add('defaultValue') value = self.gds_parse_double(value, node, 'defaultValue') - self.defaultValue = value + self.default_value = value super(LEMS_Property, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): super(LEMS_Property, self).buildChildren(child_, node, nodeName_, True) @@ -2037,7 +2062,7 @@ def __init__(self, name=None, dimension=None, description=None, gds_collector_=N self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Requirement, self).__init__(name, dimension, description, **kwargs_) + super(globals().get("Requirement"), self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2064,7 +2089,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Requirement': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2146,7 +2171,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InstanceRequirement': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2260,7 +2285,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Dynamics': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2346,7 +2371,7 @@ def __init__(self, name=None, dimension=None, description=None, exposure=None, v self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(DerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) + super(globals().get("DerivedVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) self.value = _cast(None, value) self.value_nsprefix_ = None self.select = _cast(None, select) @@ -2377,7 +2402,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'DerivedVariable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2441,7 +2466,7 @@ def __init__(self, name=None, dimension=None, description=None, exposure=None, g self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(StateVariable, self).__init__(name, dimension, description, exposure, **kwargs_) + super(globals().get("StateVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2468,7 +2493,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'StateVariable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2520,7 +2545,7 @@ def __init__(self, name=None, dimension=None, description=None, exposure=None, C self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ConditionalDerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) + super(globals().get("ConditionalDerivedVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) if Case is None: self.Case = [] else: @@ -2553,7 +2578,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ConditionalDerivedVariable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2646,7 +2671,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Case': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2738,7 +2763,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'TimeDerivative': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2827,7 +2852,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IncludeType': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -2934,7 +2959,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Q10ConductanceScaling': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3067,7 +3092,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Q10Settings': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3216,7 +3241,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'HHRate': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3354,7 +3379,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'HHVariable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3506,7 +3531,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'HHTime': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3679,7 +3704,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BlockMechanism': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3842,7 +3867,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'PlasticityMechanism': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -3892,7 +3917,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'initReleaseProb' not in already_processed: already_processed.add('initReleaseProb') value = self.gds_parse_float(value, node, 'initReleaseProb') - self.initReleaseProb = value + self.init_release_prob = value self.validate_ZeroToOne(self.init_release_prob) # validate type ZeroToOne value = find_attr_value_('tauRec', node) if value is not None and 'tauRec' not in already_processed: @@ -3976,7 +4001,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SegmentParent': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4022,7 +4047,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') value = self.gds_parse_float(value, node, 'fractionAlong') - self.fractionAlong = value + self.fraction_along = value self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass @@ -4091,7 +4116,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Point3DWithDiam': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4220,7 +4245,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ProximalDetails': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4256,7 +4281,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'translationStart' not in already_processed: already_processed.add('translationStart') value = self.gds_parse_double(value, node, 'translationStart') - self.translationStart = value + self.translation_start = value def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class ProximalDetails @@ -4303,7 +4328,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'DistalDetails': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4339,7 +4364,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'normalizationEnd' not in already_processed: already_processed.add('normalizationEnd') value = self.gds_parse_double(value, node, 'normalizationEnd') - self.normalizationEnd = value + self.normalization_end = value def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class DistalDetails @@ -4394,7 +4419,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Member': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4490,7 +4515,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Include': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4577,7 +4602,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Path': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4677,7 +4702,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SubTree': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4781,7 +4806,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SegmentEndPoint': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -4947,7 +4972,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'MembraneProperties': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5108,7 +5133,7 @@ def __init__(self, channel_populations=None, channel_densities=None, channel_den self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(MembraneProperties2CaPools, self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) + super(globals().get("MembraneProperties2CaPools"), self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) if channel_density_nernst_ca2s is None: self.channel_density_nernst_ca2s = [] else: @@ -5141,7 +5166,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'MembraneProperties2CaPools': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5260,7 +5285,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ValueAcrossSegOrSegGroup': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5377,7 +5402,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'VariableParameter': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5480,7 +5505,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InhomogeneousValue': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5548,7 +5573,7 @@ def __init__(self, value=None, segment_groups='all', segments=None, id=None, con self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Species, self).__init__(value, segment_groups, segments, **kwargs_) + super(globals().get("Species"), self).__init__(value, segment_groups, segments, **kwargs_) self.id = _cast(None, id) self.id_nsprefix_ = None self.concentration_model = _cast(None, concentration_model) @@ -5607,7 +5632,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Species': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5737,7 +5762,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IntracellularProperties': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5815,7 +5840,7 @@ def __init__(self, species=None, resistivities=None, gds_collector_=None, **kwar self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IntracellularProperties2CaPools, self).__init__(species, resistivities, **kwargs_) + super(globals().get("IntracellularProperties2CaPools"), self).__init__(species, resistivities, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5842,7 +5867,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IntracellularProperties2CaPools': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -5924,7 +5949,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExtracellularPropertiesLocal': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6027,7 +6052,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpaceStructure': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6078,32 +6103,32 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xSpacing' not in already_processed: already_processed.add('xSpacing') value = self.gds_parse_float(value, node, 'xSpacing') - self.xSpacing = value + self.x_spacing = value value = find_attr_value_('ySpacing', node) if value is not None and 'ySpacing' not in already_processed: already_processed.add('ySpacing') value = self.gds_parse_float(value, node, 'ySpacing') - self.ySpacing = value + self.y_spacing = value value = find_attr_value_('zSpacing', node) if value is not None and 'zSpacing' not in already_processed: already_processed.add('zSpacing') value = self.gds_parse_float(value, node, 'zSpacing') - self.zSpacing = value + self.z_spacing = value value = find_attr_value_('xStart', node) if value is not None and 'xStart' not in already_processed: already_processed.add('xStart') value = self.gds_parse_float(value, node, 'xStart') - self.xStart = value + self.x_start = value value = find_attr_value_('yStart', node) if value is not None and 'yStart' not in already_processed: already_processed.add('yStart') value = self.gds_parse_float(value, node, 'yStart') - self.yStart = value + self.y_start = value value = find_attr_value_('zStart', node) if value is not None and 'zStart' not in already_processed: already_processed.add('zStart') value = self.gds_parse_float(value, node, 'zStart') - self.zStart = value + self.z_start = value def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): pass # end class SpaceStructure @@ -6172,7 +6197,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Layout': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6282,7 +6307,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='U eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'UnstructuredLayout': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6380,7 +6405,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'RandomLayout': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6478,7 +6503,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GridLayout': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6592,7 +6617,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Instance': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6730,7 +6755,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Location': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -6868,7 +6893,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SynapticConnection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7002,7 +7027,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExplicitInput': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7190,7 +7215,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Input': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7269,7 +7294,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') value = self.gds_parse_float(value, node, 'fractionAlong') - self.fractionAlong = value + self.fraction_along = value self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: @@ -7318,7 +7343,7 @@ def __init__(self, id=None, target=None, destination=None, segment_id=None, frac self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InputW, self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) + super(globals().get("InputW"), self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -7347,7 +7372,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InputW': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7458,7 +7483,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseWithoutId': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7527,7 +7552,7 @@ def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseNonNegativeIntegerId, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + super(globals().get("BaseNonNegativeIntegerId"), self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(int, id) self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -7565,7 +7590,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseNonNegativeIntegerId': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7640,7 +7665,7 @@ def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Base, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + super(globals().get("Base"), self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(None, id) self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -7681,7 +7706,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Base': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7757,7 +7782,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Standalone, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("Standalone"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.metaid = _cast(None, metaid) self.metaid_nsprefix_ = None self.notes = notes @@ -7821,7 +7846,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Standalone': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -7925,7 +7950,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeSourcePoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SpikeSourcePoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.start = _cast(None, start) self.start_nsprefix_ = None self.duration = _cast(None, duration) @@ -7980,7 +8005,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeSourcePoisson': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8060,7 +8085,7 @@ def __init__(self, neuro_lex_id=None, id=None, populations=None, component=None, self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InputList, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("InputList"), self).__init__(neuro_lex_id, id, **kwargs_) self.populations = _cast(None, populations) self.populations_nsprefix_ = None self.component = _cast(None, component) @@ -8114,7 +8139,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InputList': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8258,7 +8283,7 @@ def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("BaseConnection"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8286,7 +8311,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseConnection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8352,7 +8377,7 @@ def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, post self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseProjection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("BaseProjection"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.presynaptic_population = _cast(None, presynaptic_population) self.presynaptic_population_nsprefix_ = None self.postsynaptic_population = _cast(None, postsynaptic_population) @@ -8395,7 +8420,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseProjection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8475,7 +8500,7 @@ def __init__(self, neuro_lex_id=None, id=None, select=None, anytypeobjs_=None, g self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CellSet, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("CellSet"), self).__init__(neuro_lex_id, id, **kwargs_) self.select = _cast(None, select) self.select_nsprefix_ = None if anytypeobjs_ is None: @@ -8509,7 +8534,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'CellSet': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8535,8 +8560,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -8579,7 +8607,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Population, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("Population"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.component = _cast(None, component) self.component_nsprefix_ = None self.size = _cast(int, size) @@ -8655,7 +8683,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Population': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8806,7 +8834,7 @@ def __init__(self, neuro_lex_id=None, id=None, spaces=None, anytypeobjs_=None, g self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Region, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("Region"), self).__init__(neuro_lex_id, id, **kwargs_) self.spaces = _cast(None, spaces) self.spaces_nsprefix_ = None if anytypeobjs_ is None: @@ -8851,7 +8879,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Region': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -8877,8 +8905,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -8918,7 +8949,7 @@ def __init__(self, neuro_lex_id=None, id=None, based_on=None, structure=None, gd self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Space, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("Space"), self).__init__(neuro_lex_id, id, **kwargs_) self.based_on = _cast(None, based_on) self.based_on_nsprefix_ = None self.structure = structure @@ -8963,7 +8994,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Space': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9045,7 +9076,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Network, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("Network"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.type = _cast(None, type) self.type_nsprefix_ = None self.temperature = _cast(None, temperature) @@ -9166,7 +9197,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Network': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9388,7 +9419,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TransientPoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("TransientPoissonFiringSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.average_rate = _cast(None, average_rate) self.average_rate_nsprefix_ = None self.delay = _cast(None, delay) @@ -9447,7 +9478,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'TransientPoissonFiringSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9538,7 +9569,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("PoissonFiringSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.average_rate = _cast(None, average_rate) self.average_rate_nsprefix_ = None self.synapse = _cast(None, synapse) @@ -9582,7 +9613,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'PoissonFiringSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9655,7 +9686,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("SpikeGeneratorPoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.average_rate = _cast(None, average_rate) self.average_rate_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -9696,7 +9727,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeGeneratorPoisson': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9768,7 +9799,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorRandom, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SpikeGeneratorRandom"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.max_isi = _cast(None, max_isi) self.max_isi_nsprefix_ = None self.min_isi = _cast(None, min_isi) @@ -9810,7 +9841,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeGeneratorRandom': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9877,7 +9908,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SpikeGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.period = _cast(None, period) self.period_nsprefix_ = None def factory(*args_, **kwargs_): @@ -9917,7 +9948,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeGenerator': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -9978,7 +10009,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TimedSynapticInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("TimedSynapticInput"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None self.spike_target = _cast(None, spike_target) @@ -10026,7 +10057,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'TimedSynapticInput': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10103,7 +10134,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeArray, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SpikeArray"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if spikes is None: self.spikes = [] else: @@ -10136,7 +10167,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeArray': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10198,7 +10229,7 @@ def __init__(self, neuro_lex_id=None, id=None, time=None, gds_collector_=None, * self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Spike, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("Spike"), self).__init__(neuro_lex_id, id, **kwargs_) self.time = _cast(None, time) self.time_nsprefix_ = None def factory(*args_, **kwargs_): @@ -10238,7 +10269,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Spike': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10303,7 +10334,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(VoltageClampTriple, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("VoltageClampTriple"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.active = _cast(float, active) self.active_nsprefix_ = None self.delay = _cast(None, delay) @@ -10390,7 +10421,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'VoltageClampTriple': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10501,7 +10532,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(VoltageClamp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("VoltageClamp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -10569,7 +10600,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'VoltageClamp': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10654,7 +10685,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CompoundInputDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("CompoundInputDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if pulse_generator_dls is None: self.pulse_generator_dls = [] else: @@ -10699,7 +10730,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'CompoundInputDL': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10779,7 +10810,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(CompoundInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("CompoundInput"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if pulse_generators is None: self.pulse_generators = [] else: @@ -10824,7 +10855,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'CompoundInput': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -10906,7 +10937,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(RampGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("RampGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -10965,7 +10996,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'RampGeneratorDL': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11060,7 +11091,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(RampGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("RampGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -11119,7 +11150,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'RampGenerator': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11214,7 +11245,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SineGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SineGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.phase = _cast(None, phase) @@ -11273,7 +11304,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SineGeneratorDL': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11368,7 +11399,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SineGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SineGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.phase = _cast(None, phase) @@ -11438,7 +11469,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SineGenerator': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11533,7 +11564,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PulseGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("PulseGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -11588,7 +11619,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'PulseGeneratorDL': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11667,7 +11698,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PulseGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("PulseGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) self.delay_nsprefix_ = None self.duration = _cast(None, duration) @@ -11722,7 +11753,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'PulseGenerator': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11799,7 +11830,7 @@ def __init__(self, neuro_lex_id=None, id=None, source=None, type=None, anytypeob self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ReactionScheme, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ReactionScheme"), self).__init__(neuro_lex_id, id, **kwargs_) self.source = _cast(None, source) self.source_nsprefix_ = None self.type = _cast(None, type) @@ -11835,7 +11866,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ReactionScheme': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -11864,8 +11895,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -11907,7 +11941,7 @@ def __init__(self, neuro_lex_id=None, id=None, species=None, gds_collector_=None self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExtracellularProperties, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ExtracellularProperties"), self).__init__(neuro_lex_id, id, **kwargs_) if species is None: self.species = [] else: @@ -11940,7 +11974,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExtracellularProperties': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12016,7 +12050,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityGHK2, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelDensityGHK2"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) @@ -12075,7 +12109,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityGHK2': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12180,7 +12214,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, permeability=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityGHK, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelDensityGHK"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.permeability = _cast(None, permeability) @@ -12239,7 +12273,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityGHK': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12345,7 +12379,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNernst, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("ChannelDensityNernst"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) @@ -12411,7 +12445,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityNernst': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12541,7 +12575,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensity, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("ChannelDensity"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) @@ -12628,7 +12662,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensity': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12764,7 +12798,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, varia self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniformGHK, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelDensityNonUniformGHK"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) @@ -12812,7 +12846,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniformGHK': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -12902,7 +12936,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, varia self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniformNernst, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelDensityNonUniformNernst"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) @@ -12950,7 +12984,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniformNernst': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13041,7 +13075,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, erev=None, ion= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNonUniform, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelDensityNonUniform"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.erev = _cast(None, erev) @@ -13102,7 +13136,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniform': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13204,7 +13238,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, number=None, er self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelPopulation, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ChannelPopulation"), self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) self.ion_channel_nsprefix_ = None self.number = _cast(int, number) @@ -13279,7 +13313,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelPopulation': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13394,7 +13428,7 @@ def __init__(self, value=None, segment_groups='all', segments=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Resistivity, self).__init__(value, segment_groups, segments, **kwargs_) + super(globals().get("Resistivity"), self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13421,7 +13455,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Resistivity': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13473,7 +13507,7 @@ def __init__(self, value=None, segment_groups='all', segments=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InitMembPotential, self).__init__(value, segment_groups, segments, **kwargs_) + super(globals().get("InitMembPotential"), self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13500,7 +13534,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InitMembPotential': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13552,7 +13586,7 @@ def __init__(self, value=None, segment_groups='all', segments=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpecificCapacitance, self).__init__(value, segment_groups, segments, **kwargs_) + super(globals().get("SpecificCapacitance"), self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13579,7 +13613,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpecificCapacitance': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13631,7 +13665,7 @@ def __init__(self, value=None, segment_groups='all', segments=None, gds_collecto self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeThresh, self).__init__(value, segment_groups, segments, **kwargs_) + super(globals().get("SpikeThresh"), self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13658,7 +13692,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeThresh': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13714,7 +13748,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BiophysicalProperties2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("BiophysicalProperties2CaPools"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.membrane_properties2_ca_pools = membrane_properties2_ca_pools self.membrane_properties2_ca_pools_nsprefix_ = None self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools @@ -13750,7 +13784,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BiophysicalProperties2CaPools': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13833,7 +13867,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BiophysicalProperties, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("BiophysicalProperties"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.membrane_properties = membrane_properties self.membrane_properties_nsprefix_ = None self.intracellular_properties = intracellular_properties @@ -13869,7 +13903,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BiophysicalProperties': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -13952,7 +13986,7 @@ def __init__(self, neuro_lex_id=None, id=None, variable=None, metric=None, proxi self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(InhomogeneousParameter, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("InhomogeneousParameter"), self).__init__(neuro_lex_id, id, **kwargs_) self.variable = _cast(None, variable) self.variable_nsprefix_ = None self.metric = _cast(None, metric) @@ -14002,7 +14036,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'InhomogeneousParameter': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14094,7 +14128,7 @@ def __init__(self, neuro_lex_id=None, id=None, notes=None, properties=None, anno self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SegmentGroup, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("SegmentGroup"), self).__init__(neuro_lex_id, id, **kwargs_) self.notes = notes self.validate_Notes(self.notes) self.notes_nsprefix_ = None @@ -14174,7 +14208,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SegmentGroup': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14309,7 +14343,7 @@ def __init__(self, neuro_lex_id=None, id=None, name=None, parent=None, proximal= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Segment, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("Segment"), self).__init__(neuro_lex_id, id, **kwargs_) self.name = _cast(None, name) self.name_nsprefix_ = None self.parent = parent @@ -14347,7 +14381,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Segment': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14508,7 +14542,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Morphology, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("Morphology"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if segments is None: self.segments = [] else: @@ -14547,7 +14581,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Morphology': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14619,7 +14653,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14647,7 +14681,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14709,7 +14743,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14737,7 +14771,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14804,7 +14838,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FixedFactorConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("FixedFactorConcentrationModel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.ion = _cast(None, ion) self.ion_nsprefix_ = None self.resting_conc = _cast(None, resting_conc) @@ -14883,7 +14917,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'FixedFactorConcentrationModel': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -14970,7 +15004,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(DecayingPoolConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("DecayingPoolConcentrationModel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.ion = _cast(None, ion) self.ion_nsprefix_ = None self.resting_conc = _cast(None, resting_conc) @@ -15050,7 +15084,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'DecayingPoolConcentrationModel': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15149,7 +15183,7 @@ def __init__(self, neuro_lex_id=None, id=None, fractional_conductance=None, note self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateFractionalSubgate, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateFractionalSubgate"), self).__init__(neuro_lex_id, id, **kwargs_) self.fractional_conductance = _cast(None, fractional_conductance) self.fractional_conductance_nsprefix_ = None self.notes = notes @@ -15212,7 +15246,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateFractionalSubgate': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15313,7 +15347,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateFractional, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateFractional"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -15373,7 +15407,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateFractional': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15467,7 +15501,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, stead self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHInstantaneous, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHInstantaneous"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -15521,7 +15555,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHInstantaneous': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15610,7 +15644,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesInf, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHRatesInf"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -15673,7 +15707,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHRatesInf': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15786,7 +15820,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesTau, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHRatesTau"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -15849,7 +15883,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHRatesTau': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -15963,7 +15997,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRatesTauInf, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHRatesTauInf"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -16029,7 +16063,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHRatesTauInf': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -16149,7 +16183,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHTauInf, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHTauInf"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -16209,7 +16243,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHTauInf': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -16313,7 +16347,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHRates, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHRates"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -16373,7 +16407,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHRates': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -16484,7 +16518,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, type=None, notes= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateHHUndetermined, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateHHUndetermined"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.type = _cast(None, type) @@ -16571,7 +16605,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateHHUndetermined': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -16710,7 +16744,7 @@ def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_s self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GateKS, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("GateKS"), self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) self.instances_nsprefix_ = None self.notes = notes @@ -16794,7 +16828,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GateKS': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -16921,7 +16955,7 @@ def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, steady_state self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(TauInfTransition, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("TauInfTransition"), self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) @@ -16969,7 +17003,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'TauInfTransition': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17057,7 +17091,7 @@ def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_ self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ReverseTransition, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ReverseTransition"), self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) @@ -17104,7 +17138,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ReverseTransition': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17133,8 +17167,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -17180,7 +17217,7 @@ def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_ self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ForwardTransition, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ForwardTransition"), self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) self.from__nsprefix_ = None self.to = _cast(None, to) @@ -17227,7 +17264,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ForwardTransition': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17256,8 +17293,11 @@ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', eol_ = '\n' else: eol_ = '' - for obj_ in self.anytypeobjs_: - obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + if not fromsubclass_: + for obj_ in self.anytypeobjs_: + showIndent(outfile, level, pretty_print) + outfile.write(obj_) + outfile.write('\n') def build(self, node, gds_collector_=None): self.gds_collector_ = gds_collector_ if SaveElementTreeNode: @@ -17300,7 +17340,7 @@ def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(OpenState, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("OpenState"), self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17327,7 +17367,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='O eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'OpenState': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17377,7 +17417,7 @@ def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ClosedState, self).__init__(neuro_lex_id, id, **kwargs_) + super(globals().get("ClosedState"), self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17404,7 +17444,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ClosedState': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17458,7 +17498,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelKS, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("IonChannelKS"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.species = _cast(None, species) self.species_nsprefix_ = None self.conductance = _cast(None, conductance) @@ -17517,7 +17557,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IonChannelKS': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17595,7 +17635,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelScalable, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("IonChannelScalable"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) if q10_conductance_scalings is None: self.q10_conductance_scalings = [] else: @@ -17629,7 +17669,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IonChannelScalable': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -17769,7 +17809,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(NeuroMLDocument, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("NeuroMLDocument"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if includes is None: self.includes = [] else: @@ -18198,7 +18238,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'NeuroMLDocument': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -18954,7 +18994,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BasePynnSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BasePynnSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.tau_syn = _cast(float, tau_syn) self.tau_syn_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -18984,7 +19024,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BasePynnSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19059,7 +19099,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("basePyNNCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.cm = _cast(float, cm) self.cm_nsprefix_ = None self.i_offset = _cast(float, i_offset) @@ -19097,7 +19137,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'basePyNNCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19204,7 +19244,7 @@ def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, post self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(globals().get("ContinuousProjection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) if continuous_connections is None: self.continuous_connections = [] else: @@ -19249,7 +19289,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ContinuousProjection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19413,7 +19453,7 @@ def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, post self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(globals().get("ElectricalProjection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) if electrical_connections is None: self.electrical_connections = [] else: @@ -19458,7 +19498,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ElectricalProjection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19620,7 +19660,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnectionNewFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("BaseConnectionNewFormat"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.pre_cell = _cast(None, pre_cell) self.pre_cell_nsprefix_ = None self.pre_segment = _cast(int, pre_segment) @@ -19683,7 +19723,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseConnectionNewFormat': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19755,7 +19795,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') value = self.gds_parse_float(value, node, 'preFractionAlong') - self.preFractionAlong = value + self.pre_fraction_along = value self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCell', node) if value is not None and 'postCell' not in already_processed: @@ -19772,7 +19812,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') value = self.gds_parse_float(value, node, 'postFractionAlong') - self.postFractionAlong = value + self.post_fraction_along = value self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: @@ -19806,7 +19846,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConnectionOldFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(globals().get("BaseConnectionOldFormat"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.pre_cell_id = _cast(None, pre_cell_id) self.pre_cell_id_nsprefix_ = None self.pre_segment_id = _cast(int, pre_segment_id) @@ -19869,7 +19909,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseConnectionOldFormat': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -19941,7 +19981,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') value = self.gds_parse_float(value, node, 'preFractionAlong') - self.preFractionAlong = value + self.pre_fraction_along = value self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCellId', node) if value is not None and 'postCellId' not in already_processed: @@ -19958,7 +19998,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') value = self.gds_parse_float(value, node, 'postFractionAlong') - self.postFractionAlong = value + self.post_fraction_along = value self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: @@ -19988,7 +20028,7 @@ def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, post self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Projection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(globals().get("Projection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None if connections is None: @@ -20040,7 +20080,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Projection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -20211,7 +20251,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SpikeGeneratorRefPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) + super(globals().get("SpikeGeneratorRefPoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) self.minimum_isi = _cast(None, minimum_isi) self.minimum_isi_nsprefix_ = None def factory(*args_, **kwargs_): @@ -20251,7 +20291,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SpikeGeneratorRefPoisson': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -20310,7 +20350,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ConcentrationModel_D, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) + super(globals().get("ConcentrationModel_D"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) self.type = _cast(None, type) self.type_nsprefix_ = None def factory(*args_, **kwargs_): @@ -20339,7 +20379,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ConcentrationModel_D': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -20396,7 +20436,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityNernstCa2, self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) + super(globals().get("ChannelDensityNernstCa2"), self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20423,7 +20463,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityNernstCa2': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -20474,7 +20514,7 @@ def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=No self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ChannelDensityVShift, self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) + super(globals().get("ChannelDensityVShift"), self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) self.v_shift = _cast(None, v_shift) self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): @@ -20514,7 +20554,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ChannelDensityVShift': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -20580,7 +20620,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.morphology_attr = _cast(None, morphology_attr) self.morphology_attr_nsprefix_ = None self.biophysical_properties_attr = _cast(None, biophysical_properties_attr) @@ -20629,7 +20669,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Cell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21040,7 +21080,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(PinskyRinzelCA3Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("PinskyRinzelCA3Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.i_soma = _cast(None, i_soma) self.i_soma_nsprefix_ = None self.i_dend = _cast(None, i_dend) @@ -21164,7 +21204,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'PinskyRinzelCA3Cell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21388,7 +21428,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FitzHughNagumo1969Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("FitzHughNagumo1969Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.a = _cast(None, a) self.a_nsprefix_ = None self.b = _cast(None, b) @@ -21438,7 +21478,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'FitzHughNagumo1969Cell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21537,7 +21577,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(FitzHughNagumoCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("FitzHughNagumoCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.I = _cast(None, I) self.I_nsprefix_ = None def factory(*args_, **kwargs_): @@ -21577,7 +21617,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'FitzHughNagumoCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21638,7 +21678,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCellMembPotCap, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseCellMembPotCap"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.C = _cast(None, C) self.C_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -21679,7 +21719,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseCellMembPotCap': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21755,7 +21795,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IzhikevichCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("IzhikevichCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.v0 = _cast(None, v0) self.v0_nsprefix_ = None self.thresh = _cast(None, thresh) @@ -21816,7 +21856,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IzhikevichCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -21919,7 +21959,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("IafCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.leak_reversal = _cast(None, leak_reversal) self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) @@ -21990,7 +22030,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IafCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22096,7 +22136,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafTauCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("IafTauCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.leak_reversal = _cast(None, leak_reversal) self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) @@ -22154,7 +22194,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IafTauCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22255,7 +22295,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("GradedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None self.delta = _cast(None, delta) @@ -22325,7 +22365,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GradedSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22417,7 +22457,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(LinearGradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("LinearGradedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): @@ -22457,7 +22497,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'LinearGradedSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22517,7 +22557,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(SilentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("SilentSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22544,7 +22584,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'SilentSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22596,7 +22636,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(GapJunction, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("GapJunction"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): @@ -22636,7 +22676,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'GapJunction': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22694,7 +22734,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseCurrentBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseCurrentBasedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22722,7 +22762,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseCurrentBasedSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22784,7 +22824,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseVoltageDepSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseVoltageDepSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22812,7 +22852,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseVoltageDepSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -22889,7 +22929,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) + super(globals().get("IonChannel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) self.species = _cast(None, species) self.species_nsprefix_ = None self.type = _cast(None, type) @@ -23006,7 +23046,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IonChannel': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23159,7 +23199,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(globals().get("AlphaCurrSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23186,7 +23226,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'AlphaCurrSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23236,7 +23276,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(globals().get("ExpCurrSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23263,7 +23303,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExpCurrSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23314,7 +23354,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(globals().get("AlphaCondSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): @@ -23343,7 +23383,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'AlphaCondSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23402,7 +23442,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(globals().get("ExpCondSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): @@ -23431,7 +23471,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExpCondSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23498,7 +23538,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(HH_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) + super(globals().get("HH_cond_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) self.v_offset = _cast(float, v_offset) self.v_offset_nsprefix_ = None self.e_rev_E = _cast(float, e_rev_E) @@ -23543,7 +23583,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'HH_cond_exp': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23670,7 +23710,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) + super(globals().get("basePyNNIaFCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) self.tau_m = _cast(float, tau_m) self.tau_m_nsprefix_ = None self.tau_refrac = _cast(float, tau_refrac) @@ -23708,7 +23748,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'basePyNNIaFCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23813,7 +23853,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + super(globals().get("ContinuousConnection"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) self.pre_component = _cast(None, pre_component) self.pre_component_nsprefix_ = None self.post_component = _cast(None, post_component) @@ -23856,7 +23896,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ContinuousConnection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -23980,7 +24020,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + super(globals().get("ElectricalConnection"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) self.synapse = _cast(None, synapse) self.synapse_nsprefix_ = None self.extensiontype_ = extensiontype_ @@ -24021,7 +24061,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ElectricalConnection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24137,7 +24177,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ConnectionWD, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + super(globals().get("ConnectionWD"), self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None self.delay = _cast(None, delay) @@ -24179,7 +24219,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ConnectionWD': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24302,7 +24342,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id= self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Connection, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + super(globals().get("Connection"), self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -24329,7 +24369,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Connection': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24424,7 +24464,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Cell2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) + super(globals().get("Cell2CaPools"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools self.biophysical_properties2_ca_pools_nsprefix_ = None def factory(*args_, **kwargs_): @@ -24454,7 +24494,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Cell2CaPools': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24525,7 +24565,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AdExIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + super(globals().get("AdExIaFCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) self.g_l = _cast(None, g_l) self.g_l_nsprefix_ = None self.EL = _cast(None, EL) @@ -24616,7 +24656,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'AdExIaFCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24755,7 +24795,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(Izhikevich2007Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + super(globals().get("Izhikevich2007Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) self.v0 = _cast(None, v0) self.v0_nsprefix_ = None self.k = _cast(None, k) @@ -24855,7 +24895,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'Izhikevich2007Cell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -24978,7 +25018,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) + super(globals().get("IafRefCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) self.refract = _cast(None, refract) self.refract_nsprefix_ = None def factory(*args_, **kwargs_): @@ -25018,7 +25058,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IafRefCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25077,7 +25117,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IafTauRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) + super(globals().get("IafTauRefCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) self.refract = _cast(None, refract) self.refract_nsprefix_ = None def factory(*args_, **kwargs_): @@ -25117,7 +25157,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IafTauRefCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25179,7 +25219,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(DoubleSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("DoubleSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse1 = _cast(None, synapse1) self.synapse1_nsprefix_ = None self.synapse2 = _cast(None, synapse2) @@ -25225,7 +25265,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'DoubleSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25307,7 +25347,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaCurrentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(globals().get("AlphaCurrentSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.tau = _cast(None, tau) self.tau_nsprefix_ = None self.ibase = _cast(None, ibase) @@ -25360,7 +25400,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'AlphaCurrentSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25429,7 +25469,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConductanceBasedSynapseTwo, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseConductanceBasedSynapseTwo"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase1 = _cast(None, gbase1) self.gbase1_nsprefix_ = None self.gbase2 = _cast(None, gbase2) @@ -25485,7 +25525,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseConductanceBasedSynapseTwo': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25573,7 +25613,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BaseConductanceBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(globals().get("BaseConductanceBasedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase = _cast(None, gbase) self.gbase_nsprefix_ = None self.erev = _cast(None, erev) @@ -25627,7 +25667,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BaseConductanceBasedSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25709,7 +25749,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelVShift, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + super(globals().get("IonChannelVShift"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) self.v_shift = _cast(None, v_shift) self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): @@ -25749,7 +25789,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IonChannelVShift': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25811,7 +25851,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IonChannelHH, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + super(globals().get("IonChannelHH"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25838,7 +25878,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IonChannelHH': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25888,7 +25928,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_curr_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(globals().get("IF_curr_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25915,7 +25955,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IF_curr_exp': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -25965,7 +26005,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_curr_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(globals().get("IF_curr_alpha"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25992,7 +26032,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IF_curr_alpha': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26044,7 +26084,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(basePyNNIaFCondCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) + super(globals().get("basePyNNIaFCondCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) self.e_rev_E = _cast(float, e_rev_E) self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) @@ -26076,7 +26116,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'basePyNNIaFCondCell': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26155,7 +26195,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) + super(globals().get("ContinuousConnectionInstance"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26183,7 +26223,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ContinuousConnectionInstance': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26260,7 +26300,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) + super(globals().get("ElectricalConnectionInstance"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26288,7 +26328,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ElectricalConnectionInstance': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26365,7 +26405,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpThreeSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) + super(globals().get("ExpThreeSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) self.tau_decay1 = _cast(None, tau_decay1) self.tau_decay1_nsprefix_ = None self.tau_decay2 = _cast(None, tau_decay2) @@ -26409,7 +26449,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExpThreeSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26485,7 +26525,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpTwoSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) + super(globals().get("ExpTwoSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) self.tau_decay = _cast(None, tau_decay) self.tau_decay_nsprefix_ = None self.tau_rise = _cast(None, tau_rise) @@ -26528,7 +26568,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExpTwoSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26607,7 +26647,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ExpOneSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + super(globals().get("ExpOneSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) self.tau_decay = _cast(None, tau_decay) self.tau_decay_nsprefix_ = None def factory(*args_, **kwargs_): @@ -26647,7 +26687,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ExpOneSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26706,7 +26746,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(AlphaSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + super(globals().get("AlphaSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) self.tau = _cast(None, tau) self.tau_nsprefix_ = None def factory(*args_, **kwargs_): @@ -26746,7 +26786,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'AlphaSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26809,7 +26849,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(EIF_cond_exp_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) + super(globals().get("EIF_cond_exp_isfa_ista"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) self.a = _cast(float, a) self.a_nsprefix_ = None self.b = _cast(float, b) @@ -26847,7 +26887,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'EIF_cond_exp_isfa_ista': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -26949,7 +26989,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(globals().get("IF_cond_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26976,7 +27016,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IF_cond_exp': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27026,7 +27066,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(IF_cond_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(globals().get("IF_cond_alpha"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27053,7 +27093,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'IF_cond_alpha': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27106,7 +27146,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ContinuousConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) + super(globals().get("ContinuousConnectionInstanceW"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -27135,7 +27175,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ContinuousConnectionInstanceW': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27207,7 +27247,7 @@ def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', p self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(ElectricalConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) + super(globals().get("ElectricalConnectionInstanceW"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) self.weight = _cast(float, weight) self.weight_nsprefix_ = None def factory(*args_, **kwargs_): @@ -27236,7 +27276,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'ElectricalConnectionInstanceW': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27305,7 +27345,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(BlockingPlasticSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) + super(globals().get("BlockingPlasticSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) self.plasticity_mechanism = plasticity_mechanism self.plasticity_mechanism_nsprefix_ = None self.block_mechanism = block_mechanism @@ -27338,7 +27378,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'BlockingPlasticSynapse': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27407,7 +27447,7 @@ def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properti self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') self.ns_prefix_ = None - super(EIF_cond_alpha_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) + super(globals().get("EIF_cond_alpha_isfa_ista"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27434,7 +27474,7 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None: + if self.original_tagname_ is not None and name_ == 'EIF_cond_alpha_isfa_ista': name_ = self.original_tagname_ if UseCapturedNS_ and self.ns_prefix_: namespaceprefix_ = self.ns_prefix_ + ':' @@ -27544,7 +27584,8 @@ def parse(inFileName, silence=False, print_warnings=True): return rootObj -def parseEtree(inFileName, silence=False, print_warnings=True): +def parseEtree(inFileName, silence=False, print_warnings=True, + mapping=None, nsmap=None): parser = None doc = parsexml_(inFileName, parser) gds_collector = GdsCollector_() @@ -27556,8 +27597,10 @@ def parseEtree(inFileName, silence=False, print_warnings=True): rootObj = rootClass.factory() rootObj.build(rootNode, gds_collector_=gds_collector) # Enable Python to collect the space used by the DOM. - mapping = {} - rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping) + if mapping is None: + mapping = {} + rootElement = rootObj.to_etree( + None, name_=rootTag, mapping_=mapping, nsmap_=nsmap) reverse_mapping = rootObj.gds_reverse_node_mapping(mapping) if not SaveElementTreeNode: doc = None @@ -27659,6 +27702,668 @@ def main(): RenameMappings_ = { } +# +# Mapping of namespaces to types defined in them +# and the file in which each is defined. +# simpleTypes are marked "ST" and complexTypes "CT". +NamespaceToDefMappings_ = {'http://www.neuroml.org/schema/neuroml2': [('NmlId', 'NeuroML_v2.1.xsd', 'ST'), + ('Nml2Quantity', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_none', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_voltage', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_length', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_resistance', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_conductance', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_conductanceDensity', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_permeability', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_time', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_pertime', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_capacitance', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_specificCapacitance', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_concentration', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_current', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_currentDensity', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_temperature', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_rhoFactor', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Nml2Quantity_conductancePerVoltage', + 'NeuroML_v2.1.xsd', + 'ST'), + ('MetaId', + 'NeuroML_v2.1.xsd', + 'ST'), + ('NeuroLexId', + 'NeuroML_v2.1.xsd', + 'ST'), + ('NonNegativeInteger', + 'NeuroML_v2.1.xsd', + 'ST'), + ('PositiveInteger', + 'NeuroML_v2.1.xsd', + 'ST'), + ('DoubleGreaterThanZero', + 'NeuroML_v2.1.xsd', + 'ST'), + ('ZeroOrOne', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Notes', 'NeuroML_v2.1.xsd', 'ST'), + ('ZeroToOne', + 'NeuroML_v2.1.xsd', + 'ST'), + ('channelTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('gateTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('BlockTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('PlasticityTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Metric', + 'NeuroML_v2.1.xsd', + 'ST'), + ('networkTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('allowedSpaces', + 'NeuroML_v2.1.xsd', + 'ST'), + ('populationTypes', + 'NeuroML_v2.1.xsd', + 'ST'), + ('Property', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Annotation', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ComponentType', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Constant', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Exposure', + 'NeuroML_v2.1.xsd', + 'CT'), + ('NamedDimensionalType', + 'NeuroML_v2.1.xsd', + 'CT'), + ('NamedDimensionalVariable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Parameter', + 'NeuroML_v2.1.xsd', + 'CT'), + ('LEMS_Property', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Requirement', + 'NeuroML_v2.1.xsd', + 'CT'), + ('InstanceRequirement', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Dynamics', + 'NeuroML_v2.1.xsd', + 'CT'), + ('DerivedVariable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('StateVariable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ConditionalDerivedVariable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Case', 'NeuroML_v2.1.xsd', 'CT'), + ('TimeDerivative', + 'NeuroML_v2.1.xsd', + 'CT'), + ('NeuroMLDocument', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IncludeType', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IonChannelScalable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IonChannelKS', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IonChannel', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IonChannelHH', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IonChannelVShift', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Q10ConductanceScaling', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ClosedState', + 'NeuroML_v2.1.xsd', + 'CT'), + ('OpenState', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ForwardTransition', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ReverseTransition', + 'NeuroML_v2.1.xsd', + 'CT'), + ('TauInfTransition', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateKS', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHUndetermined', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHRates', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHTauInf', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHRatesTauInf', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHRatesTau', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHRatesInf', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateHHInstantaneous', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateFractional', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GateFractionalSubgate', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Q10Settings', + 'NeuroML_v2.1.xsd', + 'CT'), + ('HHRate', + 'NeuroML_v2.1.xsd', + 'CT'), + ('HHVariable', + 'NeuroML_v2.1.xsd', + 'CT'), + ('HHTime', + 'NeuroML_v2.1.xsd', + 'CT'), + ('DecayingPoolConcentrationModel', + 'NeuroML_v2.1.xsd', + 'CT'), + ('FixedFactorConcentrationModel', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseVoltageDepSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseCurrentBasedSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseConductanceBasedSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseConductanceBasedSynapseTwo', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GapJunction', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SilentSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('LinearGradedSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GradedSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('AlphaCurrentSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('AlphaSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExpOneSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExpTwoSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExpThreeSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('DoubleSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BlockingPlasticSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BlockMechanism', + 'NeuroML_v2.1.xsd', + 'CT'), + ('PlasticityMechanism', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IafTauCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IafTauRefCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IafCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IafRefCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IzhikevichCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseCellMembPotCap', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Izhikevich2007Cell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('AdExIaFCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('FitzHughNagumoCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('FitzHughNagumo1969Cell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('PinskyRinzelCA3Cell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Cell', 'NeuroML_v2.1.xsd', 'CT'), + ('Cell2CaPools', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Morphology', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Segment', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SegmentParent', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Point3DWithDiam', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SegmentGroup', + 'NeuroML_v2.1.xsd', + 'CT'), + ('InhomogeneousParameter', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ProximalDetails', + 'NeuroML_v2.1.xsd', + 'CT'), + ('DistalDetails', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Member', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Include', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Path', 'NeuroML_v2.1.xsd', 'CT'), + ('SubTree', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SegmentEndPoint', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BiophysicalProperties', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BiophysicalProperties2CaPools', + 'NeuroML_v2.1.xsd', + 'CT'), + ('MembraneProperties', + 'NeuroML_v2.1.xsd', + 'CT'), + ('MembraneProperties2CaPools', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeThresh', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpecificCapacitance', + 'NeuroML_v2.1.xsd', + 'CT'), + ('InitMembPotential', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Resistivity', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelPopulation', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityNonUniform', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityNonUniformNernst', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityNonUniformGHK', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensity', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityVShift', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityNernst', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityNernstCa2', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityGHK', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ChannelDensityGHK2', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ValueAcrossSegOrSegGroup', + 'NeuroML_v2.1.xsd', + 'CT'), + ('VariableParameter', + 'NeuroML_v2.1.xsd', + 'CT'), + ('InhomogeneousValue', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Species', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ConcentrationModel_D', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IntracellularProperties', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IntracellularProperties2CaPools', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExtracellularProperties', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExtracellularPropertiesLocal', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ReactionScheme', + 'NeuroML_v2.1.xsd', + 'CT'), + ('PulseGenerator', + 'NeuroML_v2.1.xsd', + 'CT'), + ('PulseGeneratorDL', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SineGenerator', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SineGeneratorDL', + 'NeuroML_v2.1.xsd', + 'CT'), + ('RampGenerator', + 'NeuroML_v2.1.xsd', + 'CT'), + ('RampGeneratorDL', + 'NeuroML_v2.1.xsd', + 'CT'), + ('CompoundInput', + 'NeuroML_v2.1.xsd', + 'CT'), + ('CompoundInputDL', + 'NeuroML_v2.1.xsd', + 'CT'), + ('VoltageClamp', + 'NeuroML_v2.1.xsd', + 'CT'), + ('VoltageClampTriple', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Spike', 'NeuroML_v2.1.xsd', 'CT'), + ('SpikeArray', + 'NeuroML_v2.1.xsd', + 'CT'), + ('TimedSynapticInput', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeGenerator', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeGeneratorRandom', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeGeneratorPoisson', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeGeneratorRefPoisson', + 'NeuroML_v2.1.xsd', + 'CT'), + ('PoissonFiringSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('TransientPoissonFiringSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Network', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Space', 'NeuroML_v2.1.xsd', 'CT'), + ('SpaceStructure', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Region', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Population', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Layout', + 'NeuroML_v2.1.xsd', + 'CT'), + ('UnstructuredLayout', + 'NeuroML_v2.1.xsd', + 'CT'), + ('RandomLayout', + 'NeuroML_v2.1.xsd', + 'CT'), + ('GridLayout', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Instance', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Location', + 'NeuroML_v2.1.xsd', + 'CT'), + ('CellSet', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SynapticConnection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseProjection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Projection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseConnection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseConnectionOldFormat', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseConnectionNewFormat', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Connection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ConnectionWD', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ElectricalProjection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ElectricalConnection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ElectricalConnectionInstance', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ElectricalConnectionInstanceW', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ContinuousProjection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ContinuousConnection', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ContinuousConnectionInstance', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ContinuousConnectionInstanceW', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExplicitInput', + 'NeuroML_v2.1.xsd', + 'CT'), + ('InputList', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Input', 'NeuroML_v2.1.xsd', 'CT'), + ('InputW', + 'NeuroML_v2.1.xsd', + 'CT'), + ('basePyNNCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('basePyNNIaFCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('basePyNNIaFCondCell', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IF_curr_alpha', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IF_curr_exp', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IF_cond_alpha', + 'NeuroML_v2.1.xsd', + 'CT'), + ('IF_cond_exp', + 'NeuroML_v2.1.xsd', + 'CT'), + ('EIF_cond_exp_isfa_ista', + 'NeuroML_v2.1.xsd', + 'CT'), + ('EIF_cond_alpha_isfa_ista', + 'NeuroML_v2.1.xsd', + 'CT'), + ('HH_cond_exp', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BasePynnSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExpCondSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('AlphaCondSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('ExpCurrSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('AlphaCurrSynapse', + 'NeuroML_v2.1.xsd', + 'CT'), + ('SpikeSourcePoisson', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseWithoutId', + 'NeuroML_v2.1.xsd', + 'CT'), + ('BaseNonNegativeIntegerId', + 'NeuroML_v2.1.xsd', + 'CT'), + ('Base', 'NeuroML_v2.1.xsd', 'CT'), + ('Standalone', + 'NeuroML_v2.1.xsd', + 'CT')]} + __all__ = [ "AdExIaFCell", "AlphaCondSynapse", From b991951e2635b26f6847b08711da45dec58801eb Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 15:17:36 +0000 Subject: [PATCH 23/27] ci: make flake ignore nml.py --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 72248c82..34ad2ac1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,3 +3,4 @@ # spacing around operators, comment blocks, in argument lists # lines too long ignore = E501,E502,F403,F405,E231,E228,E225,E226,E265,E261 +exclude = neuroml/nml/nml.py From 51a283f7af7042b06a6f5e81243597890068cc0e Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 15:20:21 +0000 Subject: [PATCH 24/27] chore(nml.py): regenerate with getters and setters --- neuroml/nml/nml.py | 4337 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4334 insertions(+), 3 deletions(-) diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index 617b98e3..f2a03524 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -2,19 +2,18 @@ # -*- coding: utf-8 -*- # -# Generated Fri Mar 26 14:33:58 2021 by generateDS.py version 2.38.3. +# Generated Fri Mar 26 15:19:31 2021 by generateDS.py version 2.38.3. # Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] # # Command line options: # ('-o', 'nml.py') -# ('--use-getter-setter', 'none') # ('--user-methods', 'helper_methods.py') # # Command line arguments: # NeuroML_v2.1.xsd # # Command line: -# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --user-methods="helper_methods.py" NeuroML_v2.1.xsd +# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --user-methods="helper_methods.py" NeuroML_v2.1.xsd # # Current working directory (os.getcwd()): # nml @@ -1053,6 +1052,18 @@ def factory(*args_, **kwargs_): else: return Property(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tag(self): + return self.tag + def set_tag(self, tag): + self.tag = tag + def get_value(self): + return self.value + def set_value(self, value): + self.value = value def hasContent_(self): if ( @@ -1145,6 +1156,14 @@ def factory(*args_, **kwargs_): else: return Annotation(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value def hasContent_(self): if ( self.anytypeobjs_ @@ -1282,6 +1301,92 @@ def factory(*args_, **kwargs_): else: return ComponentType(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_Property(self): + return self.Property + def set_Property(self, Property): + self.Property = Property + def add_Property(self, value): + self.Property.append(value) + def insert_Property_at(self, index, value): + self.Property.insert(index, value) + def replace_Property_at(self, index, value): + self.Property[index] = value + def get_Parameter(self): + return self.Parameter + def set_Parameter(self, Parameter): + self.Parameter = Parameter + def add_Parameter(self, value): + self.Parameter.append(value) + def insert_Parameter_at(self, index, value): + self.Parameter.insert(index, value) + def replace_Parameter_at(self, index, value): + self.Parameter[index] = value + def get_Constant(self): + return self.Constant + def set_Constant(self, Constant): + self.Constant = Constant + def add_Constant(self, value): + self.Constant.append(value) + def insert_Constant_at(self, index, value): + self.Constant.insert(index, value) + def replace_Constant_at(self, index, value): + self.Constant[index] = value + def get_Exposure(self): + return self.Exposure + def set_Exposure(self, Exposure): + self.Exposure = Exposure + def add_Exposure(self, value): + self.Exposure.append(value) + def insert_Exposure_at(self, index, value): + self.Exposure.insert(index, value) + def replace_Exposure_at(self, index, value): + self.Exposure[index] = value + def get_Requirement(self): + return self.Requirement + def set_Requirement(self, Requirement): + self.Requirement = Requirement + def add_Requirement(self, value): + self.Requirement.append(value) + def insert_Requirement_at(self, index, value): + self.Requirement.insert(index, value) + def replace_Requirement_at(self, index, value): + self.Requirement[index] = value + def get_InstanceRequirement(self): + return self.InstanceRequirement + def set_InstanceRequirement(self, InstanceRequirement): + self.InstanceRequirement = InstanceRequirement + def add_InstanceRequirement(self, value): + self.InstanceRequirement.append(value) + def insert_InstanceRequirement_at(self, index, value): + self.InstanceRequirement.insert(index, value) + def replace_InstanceRequirement_at(self, index, value): + self.InstanceRequirement[index] = value + def get_Dynamics(self): + return self.Dynamics + def set_Dynamics(self, Dynamics): + self.Dynamics = Dynamics + def add_Dynamics(self, value): + self.Dynamics.append(value) + def insert_Dynamics_at(self, index, value): + self.Dynamics.insert(index, value) + def replace_Dynamics_at(self, index, value): + self.Dynamics[index] = value + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_extends(self): + return self.extends + def set_extends(self, extends): + self.extends = extends + def get_description(self): + return self.description + def set_description(self, description): + self.description = description def hasContent_(self): if ( self.Property or @@ -1453,6 +1558,26 @@ def factory(*args_, **kwargs_): else: return Constant(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_dimension(self): + return self.dimension + def set_dimension(self, dimension): + self.dimension = dimension + def get_value(self): + return self.value + def set_value(self, value): + self.value = value + def get_description(self): + return self.description + def set_description(self, description): + self.description = description def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -1575,6 +1700,22 @@ def factory(*args_, **kwargs_): else: return Exposure(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_dimension(self): + return self.dimension + def set_dimension(self, dimension): + self.dimension = dimension + def get_description(self): + return self.description + def set_description(self, description): + self.description = description def hasContent_(self): if ( @@ -1678,6 +1819,24 @@ def factory(*args_, **kwargs_): else: return NamedDimensionalType(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_dimension(self): + return self.dimension + def set_dimension(self, dimension): + self.dimension = dimension + def get_description(self): + return self.description + def set_description(self, description): + self.description = description + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( @@ -1796,6 +1955,28 @@ def factory(*args_, **kwargs_): else: return NamedDimensionalVariable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_dimension(self): + return self.dimension + def set_dimension(self, dimension): + self.dimension = dimension + def get_description(self): + return self.description + def set_description(self, description): + self.description = description + def get_exposure(self): + return self.exposure + def set_exposure(self, exposure): + self.exposure = exposure + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( @@ -1909,6 +2090,10 @@ def factory(*args_, **kwargs_): else: return Parameter(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Parameter, self).hasContent_() @@ -1989,6 +2174,14 @@ def factory(*args_, **kwargs_): else: return LEMS_Property(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_defaultValue(self): + return self.default_value + def set_defaultValue(self, default_value): + self.default_value = default_value def hasContent_(self): if ( super(LEMS_Property, self).hasContent_() @@ -2074,6 +2267,10 @@ def factory(*args_, **kwargs_): else: return Requirement(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Requirement, self).hasContent_() @@ -2156,6 +2353,18 @@ def factory(*args_, **kwargs_): else: return InstanceRequirement(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_name(self): + return self.name + def set_name(self, name): + self.name = name + def get_type(self): + return self.type + def set_type(self, type): + self.type = type def hasContent_(self): if ( @@ -2267,6 +2476,50 @@ def factory(*args_, **kwargs_): else: return Dynamics(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_StateVariable(self): + return self.StateVariable + def set_StateVariable(self, StateVariable): + self.StateVariable = StateVariable + def add_StateVariable(self, value): + self.StateVariable.append(value) + def insert_StateVariable_at(self, index, value): + self.StateVariable.insert(index, value) + def replace_StateVariable_at(self, index, value): + self.StateVariable[index] = value + def get_DerivedVariable(self): + return self.DerivedVariable + def set_DerivedVariable(self, DerivedVariable): + self.DerivedVariable = DerivedVariable + def add_DerivedVariable(self, value): + self.DerivedVariable.append(value) + def insert_DerivedVariable_at(self, index, value): + self.DerivedVariable.insert(index, value) + def replace_DerivedVariable_at(self, index, value): + self.DerivedVariable[index] = value + def get_ConditionalDerivedVariable(self): + return self.ConditionalDerivedVariable + def set_ConditionalDerivedVariable(self, ConditionalDerivedVariable): + self.ConditionalDerivedVariable = ConditionalDerivedVariable + def add_ConditionalDerivedVariable(self, value): + self.ConditionalDerivedVariable.append(value) + def insert_ConditionalDerivedVariable_at(self, index, value): + self.ConditionalDerivedVariable.insert(index, value) + def replace_ConditionalDerivedVariable_at(self, index, value): + self.ConditionalDerivedVariable[index] = value + def get_TimeDerivative(self): + return self.TimeDerivative + def set_TimeDerivative(self, TimeDerivative): + self.TimeDerivative = TimeDerivative + def add_TimeDerivative(self, value): + self.TimeDerivative.append(value) + def insert_TimeDerivative_at(self, index, value): + self.TimeDerivative.insert(index, value) + def replace_TimeDerivative_at(self, index, value): + self.TimeDerivative[index] = value def hasContent_(self): if ( self.StateVariable or @@ -2387,6 +2640,18 @@ def factory(*args_, **kwargs_): else: return DerivedVariable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_value(self): + return self.value + def set_value(self, value): + self.value = value + def get_select(self): + return self.select + def set_select(self, select): + self.select = select def hasContent_(self): if ( super(DerivedVariable, self).hasContent_() @@ -2478,6 +2743,10 @@ def factory(*args_, **kwargs_): else: return StateVariable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(StateVariable, self).hasContent_() @@ -2562,6 +2831,20 @@ def factory(*args_, **kwargs_): else: return ConditionalDerivedVariable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_Case(self): + return self.Case + def set_Case(self, Case): + self.Case = Case + def add_Case(self, value): + self.Case.append(value) + def insert_Case_at(self, index, value): + self.Case.insert(index, value) + def replace_Case_at(self, index, value): + self.Case[index] = value def hasContent_(self): if ( self.Case or @@ -2656,6 +2939,18 @@ def factory(*args_, **kwargs_): else: return Case(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_condition(self): + return self.condition + def set_condition(self, condition): + self.condition = condition + def get_value(self): + return self.value + def set_value(self, value): + self.value = value def hasContent_(self): if ( @@ -2748,6 +3043,18 @@ def factory(*args_, **kwargs_): else: return TimeDerivative(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variable(self): + return self.variable + def set_variable(self, variable): + self.variable = variable + def get_value(self): + return self.value + def set_value(self, value): + self.value = value def hasContent_(self): if ( @@ -2837,6 +3144,14 @@ def factory(*args_, **kwargs_): else: return IncludeType(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_href(self): + return self.href + def set_href(self, href): + self.href = href def hasContent_(self): if ( @@ -2922,6 +3237,18 @@ def factory(*args_, **kwargs_): else: return Q10ConductanceScaling(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_q10Factor(self): + return self.q10_factor + def set_q10Factor(self, q10_factor): + self.q10_factor = q10_factor + def get_experimentalTemp(self): + return self.experimental_temp + def set_experimentalTemp(self, experimental_temp): + self.experimental_temp = experimental_temp def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3044,6 +3371,26 @@ def factory(*args_, **kwargs_): else: return Q10Settings(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_fixedQ10(self): + return self.fixed_q10 + def set_fixedQ10(self, fixed_q10): + self.fixed_q10 = fixed_q10 + def get_q10Factor(self): + return self.q10_factor + def set_q10Factor(self, q10_factor): + self.q10_factor = q10_factor + def get_experimentalTemp(self): + return self.experimental_temp + def set_experimentalTemp(self, experimental_temp): + self.experimental_temp = experimental_temp def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3193,6 +3540,26 @@ def factory(*args_, **kwargs_): else: return HHRate(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_rate(self): + return self.rate + def set_rate(self, rate): + self.rate = rate + def get_midpoint(self): + return self.midpoint + def set_midpoint(self, midpoint): + self.midpoint = midpoint + def get_scale(self): + return self.scale + def set_scale(self, scale): + self.scale = scale def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3342,6 +3709,26 @@ def factory(*args_, **kwargs_): else: return HHVariable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_rate(self): + return self.rate + def set_rate(self, rate): + self.rate = rate + def get_midpoint(self): + return self.midpoint + def set_midpoint(self, midpoint): + self.midpoint = midpoint + def get_scale(self): + return self.scale + def set_scale(self, scale): + self.scale = scale def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3483,6 +3870,30 @@ def factory(*args_, **kwargs_): else: return HHTime(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_rate(self): + return self.rate + def set_rate(self, rate): + self.rate = rate + def get_midpoint(self): + return self.midpoint + def set_midpoint(self, midpoint): + self.midpoint = midpoint + def get_scale(self): + return self.scale + def set_scale(self, scale): + self.scale = scale + def get_tau(self): + return self.tau + def set_tau(self, tau): + self.tau = tau def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3643,6 +4054,30 @@ def factory(*args_, **kwargs_): else: return BlockMechanism(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def get_blockConcentration(self): + return self.block_concentration + def set_blockConcentration(self, block_concentration): + self.block_concentration = block_concentration + def get_scalingConc(self): + return self.scaling_conc + def set_scalingConc(self, scaling_conc): + self.scaling_conc = scaling_conc + def get_scalingVolt(self): + return self.scaling_volt + def set_scalingVolt(self, scaling_volt): + self.scaling_volt = scaling_volt def validate_BlockTypes(self, value): # Validate type BlockTypes, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3813,6 +4248,26 @@ def factory(*args_, **kwargs_): else: return PlasticityMechanism(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_initReleaseProb(self): + return self.init_release_prob + def set_initReleaseProb(self, init_release_prob): + self.init_release_prob = init_release_prob + def get_tauRec(self): + return self.tau_rec + def set_tauRec(self, tau_rec): + self.tau_rec = tau_rec + def get_tauFac(self): + return self.tau_fac + def set_tauFac(self, tau_fac): + self.tau_fac = tau_fac def validate_PlasticityTypes(self, value): # Validate type PlasticityTypes, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -3963,6 +4418,18 @@ def factory(*args_, **kwargs_): else: return SegmentParent(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_fractionAlong(self): + return self.fraction_along + def set_fractionAlong(self, fraction_along): + self.fraction_along = fraction_along def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -4090,6 +4557,26 @@ def factory(*args_, **kwargs_): else: return Point3DWithDiam(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_x(self): + return self.x + def set_x(self, x): + self.x = x + def get_y(self): + return self.y + def set_y(self, y): + self.y = y + def get_z(self): + return self.z + def set_z(self, z): + self.z = z + def get_diameter(self): + return self.diameter + def set_diameter(self, diameter): + self.diameter = diameter def validate_DoubleGreaterThanZero(self, value): # Validate type DoubleGreaterThanZero, a restriction on xs:double. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -4230,6 +4717,14 @@ def factory(*args_, **kwargs_): else: return ProximalDetails(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_translationStart(self): + return self.translation_start + def set_translationStart(self, translation_start): + self.translation_start = translation_start def hasContent_(self): if ( @@ -4313,6 +4808,14 @@ def factory(*args_, **kwargs_): else: return DistalDetails(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_normalizationEnd(self): + return self.normalization_end + def set_normalizationEnd(self, normalization_end): + self.normalization_end = normalization_end def hasContent_(self): if ( @@ -4396,6 +4899,14 @@ def factory(*args_, **kwargs_): else: return Member(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -4489,6 +5000,14 @@ def factory(*args_, **kwargs_): else: return Include(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -4586,6 +5105,18 @@ def factory(*args_, **kwargs_): else: return Path(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to def hasContent_(self): if ( self.from_ is not None or @@ -4686,6 +5217,18 @@ def factory(*args_, **kwargs_): else: return SubTree(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to def hasContent_(self): if ( self.from_ is not None or @@ -4783,6 +5326,14 @@ def factory(*args_, **kwargs_): else: return SegmentEndPoint(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -4946,6 +5497,132 @@ def factory(*args_, **kwargs_): else: return MembraneProperties(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_channelPopulation(self): + return self.channel_populations + def set_channelPopulation(self, channel_populations): + self.channel_populations = channel_populations + def add_channelPopulation(self, value): + self.channel_populations.append(value) + def insert_channelPopulation_at(self, index, value): + self.channel_populations.insert(index, value) + def replace_channelPopulation_at(self, index, value): + self.channel_populations[index] = value + def get_channelDensity(self): + return self.channel_densities + def set_channelDensity(self, channel_densities): + self.channel_densities = channel_densities + def add_channelDensity(self, value): + self.channel_densities.append(value) + def insert_channelDensity_at(self, index, value): + self.channel_densities.insert(index, value) + def replace_channelDensity_at(self, index, value): + self.channel_densities[index] = value + def get_channelDensityVShift(self): + return self.channel_density_v_shifts + def set_channelDensityVShift(self, channel_density_v_shifts): + self.channel_density_v_shifts = channel_density_v_shifts + def add_channelDensityVShift(self, value): + self.channel_density_v_shifts.append(value) + def insert_channelDensityVShift_at(self, index, value): + self.channel_density_v_shifts.insert(index, value) + def replace_channelDensityVShift_at(self, index, value): + self.channel_density_v_shifts[index] = value + def get_channelDensityNernst(self): + return self.channel_density_nernsts + def set_channelDensityNernst(self, channel_density_nernsts): + self.channel_density_nernsts = channel_density_nernsts + def add_channelDensityNernst(self, value): + self.channel_density_nernsts.append(value) + def insert_channelDensityNernst_at(self, index, value): + self.channel_density_nernsts.insert(index, value) + def replace_channelDensityNernst_at(self, index, value): + self.channel_density_nernsts[index] = value + def get_channelDensityGHK(self): + return self.channel_density_ghks + def set_channelDensityGHK(self, channel_density_ghks): + self.channel_density_ghks = channel_density_ghks + def add_channelDensityGHK(self, value): + self.channel_density_ghks.append(value) + def insert_channelDensityGHK_at(self, index, value): + self.channel_density_ghks.insert(index, value) + def replace_channelDensityGHK_at(self, index, value): + self.channel_density_ghks[index] = value + def get_channelDensityGHK2(self): + return self.channel_density_ghk2s + def set_channelDensityGHK2(self, channel_density_ghk2s): + self.channel_density_ghk2s = channel_density_ghk2s + def add_channelDensityGHK2(self, value): + self.channel_density_ghk2s.append(value) + def insert_channelDensityGHK2_at(self, index, value): + self.channel_density_ghk2s.insert(index, value) + def replace_channelDensityGHK2_at(self, index, value): + self.channel_density_ghk2s[index] = value + def get_channelDensityNonUniform(self): + return self.channel_density_non_uniforms + def set_channelDensityNonUniform(self, channel_density_non_uniforms): + self.channel_density_non_uniforms = channel_density_non_uniforms + def add_channelDensityNonUniform(self, value): + self.channel_density_non_uniforms.append(value) + def insert_channelDensityNonUniform_at(self, index, value): + self.channel_density_non_uniforms.insert(index, value) + def replace_channelDensityNonUniform_at(self, index, value): + self.channel_density_non_uniforms[index] = value + def get_channelDensityNonUniformNernst(self): + return self.channel_density_non_uniform_nernsts + def set_channelDensityNonUniformNernst(self, channel_density_non_uniform_nernsts): + self.channel_density_non_uniform_nernsts = channel_density_non_uniform_nernsts + def add_channelDensityNonUniformNernst(self, value): + self.channel_density_non_uniform_nernsts.append(value) + def insert_channelDensityNonUniformNernst_at(self, index, value): + self.channel_density_non_uniform_nernsts.insert(index, value) + def replace_channelDensityNonUniformNernst_at(self, index, value): + self.channel_density_non_uniform_nernsts[index] = value + def get_channelDensityNonUniformGHK(self): + return self.channel_density_non_uniform_ghks + def set_channelDensityNonUniformGHK(self, channel_density_non_uniform_ghks): + self.channel_density_non_uniform_ghks = channel_density_non_uniform_ghks + def add_channelDensityNonUniformGHK(self, value): + self.channel_density_non_uniform_ghks.append(value) + def insert_channelDensityNonUniformGHK_at(self, index, value): + self.channel_density_non_uniform_ghks.insert(index, value) + def replace_channelDensityNonUniformGHK_at(self, index, value): + self.channel_density_non_uniform_ghks[index] = value + def get_spikeThresh(self): + return self.spike_threshes + def set_spikeThresh(self, spike_threshes): + self.spike_threshes = spike_threshes + def add_spikeThresh(self, value): + self.spike_threshes.append(value) + def insert_spikeThresh_at(self, index, value): + self.spike_threshes.insert(index, value) + def replace_spikeThresh_at(self, index, value): + self.spike_threshes[index] = value + def get_specificCapacitance(self): + return self.specific_capacitances + def set_specificCapacitance(self, specific_capacitances): + self.specific_capacitances = specific_capacitances + def add_specificCapacitance(self, value): + self.specific_capacitances.append(value) + def insert_specificCapacitance_at(self, index, value): + self.specific_capacitances.insert(index, value) + def replace_specificCapacitance_at(self, index, value): + self.specific_capacitances[index] = value + def get_initMembPotential(self): + return self.init_memb_potentials + def set_initMembPotential(self, init_memb_potentials): + self.init_memb_potentials = init_memb_potentials + def add_initMembPotential(self, value): + self.init_memb_potentials.append(value) + def insert_initMembPotential_at(self, index, value): + self.init_memb_potentials.insert(index, value) + def replace_initMembPotential_at(self, index, value): + self.init_memb_potentials[index] = value + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.channel_populations or @@ -5150,6 +5827,20 @@ def factory(*args_, **kwargs_): else: return MembraneProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_channelDensityNernstCa2(self): + return self.channel_density_nernst_ca2s + def set_channelDensityNernstCa2(self, channel_density_nernst_ca2s): + self.channel_density_nernst_ca2s = channel_density_nernst_ca2s + def add_channelDensityNernstCa2(self, value): + self.channel_density_nernst_ca2s.append(value) + def insert_channelDensityNernstCa2_at(self, index, value): + self.channel_density_nernst_ca2s.insert(index, value) + def replace_channelDensityNernstCa2_at(self, index, value): + self.channel_density_nernst_ca2s[index] = value def hasContent_(self): if ( self.channel_density_nernst_ca2s or @@ -5248,6 +5939,24 @@ def factory(*args_, **kwargs_): else: return ValueAcrossSegOrSegGroup(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_value(self): + return self.value + def set_value(self, value): + self.value = value + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -5387,6 +6096,22 @@ def factory(*args_, **kwargs_): else: return VariableParameter(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_inhomogeneousValue(self): + return self.inhomogeneous_value + def set_inhomogeneousValue(self, inhomogeneous_value): + self.inhomogeneous_value = inhomogeneous_value + def get_parameter(self): + return self.parameter + def set_parameter(self, parameter): + self.parameter = parameter + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups def hasContent_(self): if ( self.inhomogeneous_value is not None @@ -5490,6 +6215,18 @@ def factory(*args_, **kwargs_): else: return InhomogeneousValue(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_inhomogeneousParameter(self): + return self.inhomogeneous_parameters + def set_inhomogeneousParameter(self, inhomogeneous_parameters): + self.inhomogeneous_parameters = inhomogeneous_parameters + def get_value(self): + return self.value + def set_value(self, value): + self.value = value def hasContent_(self): if ( @@ -5595,6 +6332,30 @@ def factory(*args_, **kwargs_): else: return Species(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_id(self): + return self.id + def set_id(self, id): + self.id = id + def get_concentrationModel(self): + return self.concentration_model + def set_concentrationModel(self, concentration_model): + self.concentration_model = concentration_model + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion + def get_initialConcentration(self): + return self.initial_concentration + def set_initialConcentration(self, initial_concentration): + self.initial_concentration = initial_concentration + def get_initialExtConcentration(self): + return self.initial_ext_concentration + def set_initialExtConcentration(self, initial_ext_concentration): + self.initial_ext_concentration = initial_ext_concentration def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -5746,6 +6507,32 @@ def factory(*args_, **kwargs_): else: return IntracellularProperties(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def add_species(self, value): + self.species.append(value) + def insert_species_at(self, index, value): + self.species.insert(index, value) + def replace_species_at(self, index, value): + self.species[index] = value + def get_resistivity(self): + return self.resistivities + def set_resistivity(self, resistivities): + self.resistivities = resistivities + def add_resistivity(self, value): + self.resistivities.append(value) + def insert_resistivity_at(self, index, value): + self.resistivities.insert(index, value) + def replace_resistivity_at(self, index, value): + self.resistivities[index] = value + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.species or @@ -5852,6 +6639,10 @@ def factory(*args_, **kwargs_): else: return IntracellularProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IntracellularProperties2CaPools, self).hasContent_() @@ -5934,6 +6725,20 @@ def factory(*args_, **kwargs_): else: return ExtracellularPropertiesLocal(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def add_species(self, value): + self.species.append(value) + def insert_species_at(self, index, value): + self.species.insert(index, value) + def replace_species_at(self, index, value): + self.species[index] = value def hasContent_(self): if ( self.species @@ -6037,6 +6842,34 @@ def factory(*args_, **kwargs_): else: return SpaceStructure(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_xSpacing(self): + return self.x_spacing + def set_xSpacing(self, x_spacing): + self.x_spacing = x_spacing + def get_ySpacing(self): + return self.y_spacing + def set_ySpacing(self, y_spacing): + self.y_spacing = y_spacing + def get_zSpacing(self): + return self.z_spacing + def set_zSpacing(self, z_spacing): + self.z_spacing = z_spacing + def get_xStart(self): + return self.x_start + def set_xStart(self, x_start): + self.x_start = x_start + def get_yStart(self): + return self.y_start + def set_yStart(self, y_start): + self.y_start = y_start + def get_zStart(self): + return self.z_start + def set_zStart(self, z_start): + self.z_start = z_start def hasContent_(self): if ( @@ -6169,6 +7002,26 @@ def factory(*args_, **kwargs_): else: return Layout(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_random(self): + return self.random + def set_random(self, random): + self.random = random + def get_grid(self): + return self.grid + def set_grid(self, grid): + self.grid = grid + def get_unstructured(self): + return self.unstructured + def set_unstructured(self, unstructured): + self.unstructured = unstructured + def get_space(self): + return self.spaces + def set_space(self, spaces): + self.spaces = spaces def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -6292,6 +7145,14 @@ def factory(*args_, **kwargs_): else: return UnstructuredLayout(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_number(self): + return self.number + def set_number(self, number): + self.number = number def hasContent_(self): if ( @@ -6379,6 +7240,18 @@ def factory(*args_, **kwargs_): else: return RandomLayout(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_number(self): + return self.number + def set_number(self, number): + self.number = number + def get_region(self): + return self.regions + def set_region(self, regions): + self.regions = regions def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -6488,6 +7361,22 @@ def factory(*args_, **kwargs_): else: return GridLayout(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_xSize(self): + return self.x_size + def set_xSize(self, x_size): + self.x_size = x_size + def get_ySize(self): + return self.y_size + def set_ySize(self, y_size): + self.y_size = y_size + def get_zSize(self): + return self.z_size + def set_zSize(self, z_size): + self.z_size = z_size def hasContent_(self): if ( @@ -6602,6 +7491,30 @@ def factory(*args_, **kwargs_): else: return Instance(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_location(self): + return self.location + def set_location(self, location): + self.location = location + def get_id(self): + return self.id + def set_id(self, id): + self.id = id + def get_i(self): + return self.i + def set_i(self, i): + self.i = i + def get_j(self): + return self.j + def set_j(self, j): + self.j = j + def get_k(self): + return self.k + def set_k(self, k): + self.k = k def hasContent_(self): if ( self.location is not None @@ -6740,6 +7653,22 @@ def factory(*args_, **kwargs_): else: return Location(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_x(self): + return self.x + def set_x(self, x): + self.x = x + def get_y(self): + return self.y + def set_y(self, y): + self.y = y + def get_z(self): + return self.z + def set_z(self, z): + self.z = z def hasContent_(self): if ( @@ -6867,6 +7796,26 @@ def factory(*args_, **kwargs_): else: return SynapticConnection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse + def get_destination(self): + return self.destination + def set_destination(self, destination): + self.destination = destination def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -7012,6 +7961,22 @@ def factory(*args_, **kwargs_): else: return ExplicitInput(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_target(self): + return self.target + def set_target(self, target): + self.target = target + def get_input(self): + return self.input + def set_input(self, input): + self.input = input + def get_destination(self): + return self.destination + def set_destination(self, destination): + self.destination = destination def hasContent_(self): if ( @@ -7166,6 +8131,32 @@ def factory(*args_, **kwargs_): else: return Input(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_id(self): + return self.id + def set_id(self, id): + self.id = id + def get_target(self): + return self.target + def set_target(self, target): + self.target = target + def get_destination(self): + return self.destination + def set_destination(self, destination): + self.destination = destination + def get_segmentId(self): + return self.segment_id + def set_segmentId(self, segment_id): + self.segment_id = segment_id + def get_fractionAlong(self): + return self.fraction_along + def set_fractionAlong(self, fraction_along): + self.fraction_along = fraction_along + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -7357,6 +8348,14 @@ def factory(*args_, **kwargs_): else: return InputW(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_weight(self): + return self.weight + def set_weight(self, weight): + self.weight = weight def hasContent_(self): if ( super(InputW, self).hasContent_() @@ -7457,6 +8456,16 @@ def factory(*args_, **kwargs_): else: return BaseWithoutId(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_neuroLexId(self): + return self.neuro_lex_id + def set_neuroLexId(self, neuro_lex_id): + self.neuro_lex_id = neuro_lex_id + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NeuroLexId(self, value): # Validate type NeuroLexId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -7567,6 +8576,16 @@ def factory(*args_, **kwargs_): else: return BaseNonNegativeIntegerId(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_id(self): + return self.id + def set_id(self, id): + self.id = id + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -7680,6 +8699,16 @@ def factory(*args_, **kwargs_): else: return Base(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_id(self): + return self.id + def set_id(self, id): + self.id = id + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -7807,6 +8836,34 @@ def factory(*args_, **kwargs_): else: return Standalone(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_property(self): + return self.properties + def set_property(self, properties): + self.properties = properties + def add_property(self, value): + self.properties.append(value) + def insert_property_at(self, index, value): + self.properties.insert(index, value) + def replace_property_at(self, index, value): + self.properties[index] = value + def get_annotation(self): + return self.annotation + def set_annotation(self, annotation): + self.annotation = annotation + def get_metaid(self): + return self.metaid + def set_metaid(self, metaid): + self.metaid = metaid + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -7968,6 +9025,22 @@ def factory(*args_, **kwargs_): else: return SpikeSourcePoisson(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_start(self): + return self.start + def set_start(self, start): + self.start = start + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_rate(self): + return self.rate + def set_rate(self, rate): + self.rate = rate def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -8111,6 +9184,38 @@ def factory(*args_, **kwargs_): else: return InputList(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_input(self): + return self.input + def set_input(self, input): + self.input = input + def add_input(self, value): + self.input.append(value) + def insert_input_at(self, index, value): + self.input.insert(index, value) + def replace_input_at(self, index, value): + self.input[index] = value + def get_inputW(self): + return self.input_ws + def set_inputW(self, input_ws): + self.input_ws = input_ws + def add_inputW(self, value): + self.input_ws.append(value) + def insert_inputW_at(self, index, value): + self.input_ws.insert(index, value) + def replace_inputW_at(self, index, value): + self.input_ws[index] = value + def get_population(self): + return self.populations + def set_population(self, populations): + self.populations = populations + def get_component(self): + return self.component + def set_component(self, component): + self.component = component def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -8296,6 +9401,12 @@ def factory(*args_, **kwargs_): else: return BaseConnection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseConnection, self).hasContent_() @@ -8394,6 +9505,20 @@ def factory(*args_, **kwargs_): else: return BaseProjection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_presynapticPopulation(self): + return self.presynaptic_population + def set_presynapticPopulation(self, presynaptic_population): + self.presynaptic_population = presynaptic_population + def get_postsynapticPopulation(self): + return self.postsynaptic_population + def set_postsynapticPopulation(self, postsynaptic_population): + self.postsynaptic_population = postsynaptic_population + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -8518,6 +9643,18 @@ def factory(*args_, **kwargs_): else: return CellSet(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value + def get_select(self): + return self.select + def set_select(self, select): + self.select = select def hasContent_(self): if ( self.anytypeobjs_ or @@ -8634,6 +9771,40 @@ def factory(*args_, **kwargs_): else: return Population(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_layout(self): + return self.layout + def set_layout(self, layout): + self.layout = layout + def get_instance(self): + return self.instances + def set_instance(self, instances): + self.instances = instances + def add_instance(self, value): + self.instances.append(value) + def insert_instance_at(self, index, value): + self.instances.insert(index, value) + def replace_instance_at(self, index, value): + self.instances[index] = value + def get_component(self): + return self.component + def set_component(self, component): + self.component = component + def get_size(self): + return self.size + def set_size(self, size): + self.size = size + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_extracellularProperties(self): + return self.extracellular_properties + def set_extracellularProperties(self, extracellular_properties): + self.extracellular_properties = extracellular_properties def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -8852,6 +10023,18 @@ def factory(*args_, **kwargs_): else: return Region(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value + def get_space(self): + return self.spaces + def set_space(self, spaces): + self.spaces = spaces def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -8965,6 +10148,18 @@ def factory(*args_, **kwargs_): else: return Space(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_structure(self): + return self.structure + def set_structure(self, structure): + self.structure = structure + def get_basedOn(self): + return self.based_on + def set_basedOn(self, based_on): + self.based_on = based_on def validate_allowedSpaces(self, value): # Validate type allowedSpaces, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9147,6 +10342,128 @@ def factory(*args_, **kwargs_): else: return Network(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_space(self): + return self.spaces + def set_space(self, spaces): + self.spaces = spaces + def add_space(self, value): + self.spaces.append(value) + def insert_space_at(self, index, value): + self.spaces.insert(index, value) + def replace_space_at(self, index, value): + self.spaces[index] = value + def get_region(self): + return self.regions + def set_region(self, regions): + self.regions = regions + def add_region(self, value): + self.regions.append(value) + def insert_region_at(self, index, value): + self.regions.insert(index, value) + def replace_region_at(self, index, value): + self.regions[index] = value + def get_extracellularProperties(self): + return self.extracellular_properties + def set_extracellularProperties(self, extracellular_properties): + self.extracellular_properties = extracellular_properties + def add_extracellularProperties(self, value): + self.extracellular_properties.append(value) + def insert_extracellularProperties_at(self, index, value): + self.extracellular_properties.insert(index, value) + def replace_extracellularProperties_at(self, index, value): + self.extracellular_properties[index] = value + def get_population(self): + return self.populations + def set_population(self, populations): + self.populations = populations + def add_population(self, value): + self.populations.append(value) + def insert_population_at(self, index, value): + self.populations.insert(index, value) + def replace_population_at(self, index, value): + self.populations[index] = value + def get_cellSet(self): + return self.cell_sets + def set_cellSet(self, cell_sets): + self.cell_sets = cell_sets + def add_cellSet(self, value): + self.cell_sets.append(value) + def insert_cellSet_at(self, index, value): + self.cell_sets.insert(index, value) + def replace_cellSet_at(self, index, value): + self.cell_sets[index] = value + def get_synapticConnection(self): + return self.synaptic_connections + def set_synapticConnection(self, synaptic_connections): + self.synaptic_connections = synaptic_connections + def add_synapticConnection(self, value): + self.synaptic_connections.append(value) + def insert_synapticConnection_at(self, index, value): + self.synaptic_connections.insert(index, value) + def replace_synapticConnection_at(self, index, value): + self.synaptic_connections[index] = value + def get_projection(self): + return self.projections + def set_projection(self, projections): + self.projections = projections + def add_projection(self, value): + self.projections.append(value) + def insert_projection_at(self, index, value): + self.projections.insert(index, value) + def replace_projection_at(self, index, value): + self.projections[index] = value + def get_electricalProjection(self): + return self.electrical_projections + def set_electricalProjection(self, electrical_projections): + self.electrical_projections = electrical_projections + def add_electricalProjection(self, value): + self.electrical_projections.append(value) + def insert_electricalProjection_at(self, index, value): + self.electrical_projections.insert(index, value) + def replace_electricalProjection_at(self, index, value): + self.electrical_projections[index] = value + def get_continuousProjection(self): + return self.continuous_projections + def set_continuousProjection(self, continuous_projections): + self.continuous_projections = continuous_projections + def add_continuousProjection(self, value): + self.continuous_projections.append(value) + def insert_continuousProjection_at(self, index, value): + self.continuous_projections.insert(index, value) + def replace_continuousProjection_at(self, index, value): + self.continuous_projections[index] = value + def get_explicitInput(self): + return self.explicit_inputs + def set_explicitInput(self, explicit_inputs): + self.explicit_inputs = explicit_inputs + def add_explicitInput(self, value): + self.explicit_inputs.append(value) + def insert_explicitInput_at(self, index, value): + self.explicit_inputs.insert(index, value) + def replace_explicitInput_at(self, index, value): + self.explicit_inputs[index] = value + def get_inputList(self): + return self.input_lists + def set_inputList(self, input_lists): + self.input_lists = input_lists + def add_inputList(self, value): + self.input_lists.append(value) + def insert_inputList_at(self, index, value): + self.input_lists.insert(index, value) + def replace_inputList_at(self, index, value): + self.input_lists[index] = value + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_temperature(self): + return self.temperature + def set_temperature(self, temperature): + self.temperature = temperature def validate_networkTypes(self, value): # Validate type networkTypes, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9441,6 +10758,30 @@ def factory(*args_, **kwargs_): else: return TransientPoissonFiringSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_averageRate(self): + return self.average_rate + def set_averageRate(self, average_rate): + self.average_rate = average_rate + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse + def get_spikeTarget(self): + return self.spike_target + def set_spikeTarget(self, spike_target): + self.spike_target = spike_target def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9587,6 +10928,22 @@ def factory(*args_, **kwargs_): else: return PoissonFiringSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_averageRate(self): + return self.average_rate + def set_averageRate(self, average_rate): + self.average_rate = average_rate + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse + def get_spikeTarget(self): + return self.spike_target + def set_spikeTarget(self, spike_target): + self.spike_target = spike_target def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9701,6 +11058,16 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorPoisson(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_averageRate(self): + return self.average_rate + def set_averageRate(self, average_rate): + self.average_rate = average_rate + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9815,6 +11182,18 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorRandom(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_maxISI(self): + return self.max_isi + def set_maxISI(self, max_isi): + self.max_isi = max_isi + def get_minISI(self): + return self.min_isi + def set_minISI(self, min_isi): + self.min_isi = min_isi def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -9922,6 +11301,14 @@ def factory(*args_, **kwargs_): else: return SpikeGenerator(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_period(self): + return self.period + def set_period(self, period): + self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -10030,6 +11417,28 @@ def factory(*args_, **kwargs_): else: return TimedSynapticInput(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_spike(self): + return self.spikes + def set_spike(self, spikes): + self.spikes = spikes + def add_spike(self, value): + self.spikes.append(value) + def insert_spike_at(self, index, value): + self.spikes.insert(index, value) + def replace_spike_at(self, index, value): + self.spikes[index] = value + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse + def get_spikeTarget(self): + return self.spike_target + def set_spikeTarget(self, spike_target): + self.spike_target = spike_target def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -10151,6 +11560,20 @@ def factory(*args_, **kwargs_): else: return SpikeArray(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_spike(self): + return self.spikes + def set_spike(self, spikes): + self.spikes = spikes + def add_spike(self, value): + self.spikes.append(value) + def insert_spike_at(self, index, value): + self.spikes.insert(index, value) + def replace_spike_at(self, index, value): + self.spikes[index] = value def hasContent_(self): if ( self.spikes or @@ -10243,6 +11666,14 @@ def factory(*args_, **kwargs_): else: return Spike(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_time(self): + return self.time + def set_time(self, time): + self.time = time def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -10360,6 +11791,38 @@ def factory(*args_, **kwargs_): else: return VoltageClampTriple(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_active(self): + return self.active + def set_active(self, active): + self.active = active + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_conditioningVoltage(self): + return self.conditioning_voltage + def set_conditioningVoltage(self, conditioning_voltage): + self.conditioning_voltage = conditioning_voltage + def get_testingVoltage(self): + return self.testing_voltage + def set_testingVoltage(self, testing_voltage): + self.testing_voltage = testing_voltage + def get_returnVoltage(self): + return self.return_voltage + def set_returnVoltage(self, return_voltage): + self.return_voltage = return_voltage + def get_simpleSeriesResistance(self): + return self.simple_series_resistance + def set_simpleSeriesResistance(self, simple_series_resistance): + self.simple_series_resistance = simple_series_resistance def validate_ZeroOrOne(self, value): # Validate type ZeroOrOne, a restriction on xs:double. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -10552,6 +12015,26 @@ def factory(*args_, **kwargs_): else: return VoltageClamp(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_targetVoltage(self): + return self.target_voltage + def set_targetVoltage(self, target_voltage): + self.target_voltage = target_voltage + def get_simpleSeriesResistance(self): + return self.simple_series_resistance + def set_simpleSeriesResistance(self, simple_series_resistance): + self.simple_series_resistance = simple_series_resistance def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -10712,6 +12195,40 @@ def factory(*args_, **kwargs_): else: return CompoundInputDL(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_pulseGeneratorDL(self): + return self.pulse_generator_dls + def set_pulseGeneratorDL(self, pulse_generator_dls): + self.pulse_generator_dls = pulse_generator_dls + def add_pulseGeneratorDL(self, value): + self.pulse_generator_dls.append(value) + def insert_pulseGeneratorDL_at(self, index, value): + self.pulse_generator_dls.insert(index, value) + def replace_pulseGeneratorDL_at(self, index, value): + self.pulse_generator_dls[index] = value + def get_sineGeneratorDL(self): + return self.sine_generator_dls + def set_sineGeneratorDL(self, sine_generator_dls): + self.sine_generator_dls = sine_generator_dls + def add_sineGeneratorDL(self, value): + self.sine_generator_dls.append(value) + def insert_sineGeneratorDL_at(self, index, value): + self.sine_generator_dls.insert(index, value) + def replace_sineGeneratorDL_at(self, index, value): + self.sine_generator_dls[index] = value + def get_rampGeneratorDL(self): + return self.ramp_generator_dls + def set_rampGeneratorDL(self, ramp_generator_dls): + self.ramp_generator_dls = ramp_generator_dls + def add_rampGeneratorDL(self, value): + self.ramp_generator_dls.append(value) + def insert_rampGeneratorDL_at(self, index, value): + self.ramp_generator_dls.insert(index, value) + def replace_rampGeneratorDL_at(self, index, value): + self.ramp_generator_dls[index] = value def hasContent_(self): if ( self.pulse_generator_dls or @@ -10837,6 +12354,40 @@ def factory(*args_, **kwargs_): else: return CompoundInput(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_pulseGenerator(self): + return self.pulse_generators + def set_pulseGenerator(self, pulse_generators): + self.pulse_generators = pulse_generators + def add_pulseGenerator(self, value): + self.pulse_generators.append(value) + def insert_pulseGenerator_at(self, index, value): + self.pulse_generators.insert(index, value) + def replace_pulseGenerator_at(self, index, value): + self.pulse_generators[index] = value + def get_sineGenerator(self): + return self.sine_generators + def set_sineGenerator(self, sine_generators): + self.sine_generators = sine_generators + def add_sineGenerator(self, value): + self.sine_generators.append(value) + def insert_sineGenerator_at(self, index, value): + self.sine_generators.insert(index, value) + def replace_sineGenerator_at(self, index, value): + self.sine_generators[index] = value + def get_rampGenerator(self): + return self.ramp_generators + def set_rampGenerator(self, ramp_generators): + self.ramp_generators = ramp_generators + def add_rampGenerator(self, value): + self.ramp_generators.append(value) + def insert_rampGenerator_at(self, index, value): + self.ramp_generators.insert(index, value) + def replace_rampGenerator_at(self, index, value): + self.ramp_generators[index] = value def hasContent_(self): if ( self.pulse_generators or @@ -10959,6 +12510,30 @@ def factory(*args_, **kwargs_): else: return RampGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_startAmplitude(self): + return self.start_amplitude + def set_startAmplitude(self, start_amplitude): + self.start_amplitude = start_amplitude + def get_finishAmplitude(self): + return self.finish_amplitude + def set_finishAmplitude(self, finish_amplitude): + self.finish_amplitude = finish_amplitude + def get_baselineAmplitude(self): + return self.baseline_amplitude + def set_baselineAmplitude(self, baseline_amplitude): + self.baseline_amplitude = baseline_amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11113,6 +12688,30 @@ def factory(*args_, **kwargs_): else: return RampGenerator(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_startAmplitude(self): + return self.start_amplitude + def set_startAmplitude(self, start_amplitude): + self.start_amplitude = start_amplitude + def get_finishAmplitude(self): + return self.finish_amplitude + def set_finishAmplitude(self, finish_amplitude): + self.finish_amplitude = finish_amplitude + def get_baselineAmplitude(self): + return self.baseline_amplitude + def set_baselineAmplitude(self, baseline_amplitude): + self.baseline_amplitude = baseline_amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11267,6 +12866,30 @@ def factory(*args_, **kwargs_): else: return SineGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_phase(self): + return self.phase + def set_phase(self, phase): + self.phase = phase + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_amplitude(self): + return self.amplitude + def set_amplitude(self, amplitude): + self.amplitude = amplitude + def get_period(self): + return self.period + def set_period(self, period): + self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11421,6 +13044,30 @@ def factory(*args_, **kwargs_): else: return SineGenerator(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_phase(self): + return self.phase + def set_phase(self, phase): + self.phase = phase + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_amplitude(self): + return self.amplitude + def set_amplitude(self, amplitude): + self.amplitude = amplitude + def get_period(self): + return self.period + def set_period(self, period): + self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11582,6 +13229,22 @@ def factory(*args_, **kwargs_): else: return PulseGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_amplitude(self): + return self.amplitude + def set_amplitude(self, amplitude): + self.amplitude = amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11716,6 +13379,22 @@ def factory(*args_, **kwargs_): else: return PulseGenerator(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay + def get_duration(self): + return self.duration + def set_duration(self, duration): + self.duration = duration + def get_amplitude(self): + return self.amplitude + def set_amplitude(self, amplitude): + self.amplitude = amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -11850,6 +13529,22 @@ def factory(*args_, **kwargs_): else: return ReactionScheme(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value + def get_source(self): + return self.source + def set_source(self, source): + self.source = source + def get_type(self): + return self.type + def set_type(self, type): + self.type = type def hasContent_(self): if ( self.anytypeobjs_ or @@ -11958,6 +13653,20 @@ def factory(*args_, **kwargs_): else: return ExtracellularProperties(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def add_species(self, value): + self.species.append(value) + def insert_species_at(self, index, value): + self.species.insert(index, value) + def replace_species_at(self, index, value): + self.species[index] = value def hasContent_(self): if ( self.species or @@ -12072,6 +13781,30 @@ def factory(*args_, **kwargs_): else: return ChannelDensityGHK2(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_condDensity(self): + return self.cond_density + def set_condDensity(self, cond_density): + self.cond_density = cond_density + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -12236,6 +13969,30 @@ def factory(*args_, **kwargs_): else: return ChannelDensityGHK(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_permeability(self): + return self.permeability + def set_permeability(self, permeability): + self.permeability = permeability + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -12407,6 +14164,42 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNernst(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_condDensity(self): + return self.cond_density + def set_condDensity(self, cond_density): + self.cond_density = cond_density + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -12605,6 +14398,46 @@ def factory(*args_, **kwargs_): else: return ChannelDensity(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_condDensity(self): + return self.cond_density + def set_condDensity(self, cond_density): + self.cond_density = cond_density + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -12819,6 +14652,28 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniformGHK(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -12957,6 +14812,28 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniformNernst(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -13098,6 +14975,32 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniform(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -13267,6 +15170,44 @@ def factory(*args_, **kwargs_): else: return ChannelPopulation(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_variableParameter(self): + return self.variable_parameters + def set_variableParameter(self, variable_parameters): + self.variable_parameters = variable_parameters + def add_variableParameter(self, value): + self.variable_parameters.append(value) + def insert_variableParameter_at(self, index, value): + self.variable_parameters.insert(index, value) + def replace_variableParameter_at(self, index, value): + self.variable_parameters[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def get_number(self): + return self.number + def set_number(self, number): + self.number = number + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -13440,6 +15381,10 @@ def factory(*args_, **kwargs_): else: return Resistivity(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Resistivity, self).hasContent_() @@ -13519,6 +15464,10 @@ def factory(*args_, **kwargs_): else: return InitMembPotential(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(InitMembPotential, self).hasContent_() @@ -13598,6 +15547,10 @@ def factory(*args_, **kwargs_): else: return SpecificCapacitance(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SpecificCapacitance, self).hasContent_() @@ -13677,6 +15630,10 @@ def factory(*args_, **kwargs_): else: return SpikeThresh(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SpikeThresh, self).hasContent_() @@ -13766,6 +15723,22 @@ def factory(*args_, **kwargs_): else: return BiophysicalProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_membraneProperties2CaPools(self): + return self.membrane_properties2_ca_pools + def set_membraneProperties2CaPools(self, membrane_properties2_ca_pools): + self.membrane_properties2_ca_pools = membrane_properties2_ca_pools + def get_intracellularProperties2CaPools(self): + return self.intracellular_properties2_ca_pools + def set_intracellularProperties2CaPools(self, intracellular_properties2_ca_pools): + self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools + def get_extracellularProperties(self): + return self.extracellular_properties + def set_extracellularProperties(self, extracellular_properties): + self.extracellular_properties = extracellular_properties def hasContent_(self): if ( self.membrane_properties2_ca_pools is not None or @@ -13885,6 +15858,22 @@ def factory(*args_, **kwargs_): else: return BiophysicalProperties(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_membraneProperties(self): + return self.membrane_properties + def set_membraneProperties(self, membrane_properties): + self.membrane_properties = membrane_properties + def get_intracellularProperties(self): + return self.intracellular_properties + def set_intracellularProperties(self, intracellular_properties): + self.intracellular_properties = intracellular_properties + def get_extracellularProperties(self): + return self.extracellular_properties + def set_extracellularProperties(self, extracellular_properties): + self.extracellular_properties = extracellular_properties def hasContent_(self): if ( self.membrane_properties is not None or @@ -14006,6 +15995,26 @@ def factory(*args_, **kwargs_): else: return InhomogeneousParameter(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_proximal(self): + return self.proximal + def set_proximal(self, proximal): + self.proximal = proximal + def get_distal(self): + return self.distal + def set_distal(self, distal): + self.distal = distal + def get_variable(self): + return self.variable + def set_variable(self, variable): + self.variable = variable + def get_metric(self): + return self.metric + def set_metric(self, metric): + self.metric = metric def validate_Metric(self, value): # Validate type Metric, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -14175,6 +16184,78 @@ def factory(*args_, **kwargs_): else: return SegmentGroup(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_property(self): + return self.properties + def set_property(self, properties): + self.properties = properties + def add_property(self, value): + self.properties.append(value) + def insert_property_at(self, index, value): + self.properties.insert(index, value) + def replace_property_at(self, index, value): + self.properties[index] = value + def get_annotation(self): + return self.annotation + def set_annotation(self, annotation): + self.annotation = annotation + def get_member(self): + return self.members + def set_member(self, members): + self.members = members + def add_member(self, value): + self.members.append(value) + def insert_member_at(self, index, value): + self.members.insert(index, value) + def replace_member_at(self, index, value): + self.members[index] = value + def get_include(self): + return self.includes + def set_include(self, includes): + self.includes = includes + def add_include(self, value): + self.includes.append(value) + def insert_include_at(self, index, value): + self.includes.insert(index, value) + def replace_include_at(self, index, value): + self.includes[index] = value + def get_path(self): + return self.paths + def set_path(self, paths): + self.paths = paths + def add_path(self, value): + self.paths.append(value) + def insert_path_at(self, index, value): + self.paths.insert(index, value) + def replace_path_at(self, index, value): + self.paths[index] = value + def get_subTree(self): + return self.sub_trees + def set_subTree(self, sub_trees): + self.sub_trees = sub_trees + def add_subTree(self, value): + self.sub_trees.append(value) + def insert_subTree_at(self, index, value): + self.sub_trees.insert(index, value) + def replace_subTree_at(self, index, value): + self.sub_trees[index] = value + def get_inhomogeneousParameter(self): + return self.inhomogeneous_parameters + def set_inhomogeneousParameter(self, inhomogeneous_parameters): + self.inhomogeneous_parameters = inhomogeneous_parameters + def add_inhomogeneousParameter(self, value): + self.inhomogeneous_parameters.append(value) + def insert_inhomogeneousParameter_at(self, index, value): + self.inhomogeneous_parameters.insert(index, value) + def replace_inhomogeneousParameter_at(self, index, value): + self.inhomogeneous_parameters[index] = value def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -14363,6 +16444,26 @@ def factory(*args_, **kwargs_): else: return Segment(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_parent(self): + return self.parent + def set_parent(self, parent): + self.parent = parent + def get_proximal(self): + return self.proximal + def set_proximal(self, proximal): + self.proximal = proximal + def get_distal(self): + return self.distal + def set_distal(self, distal): + self.distal = distal + def get_name(self): + return self.name + def set_name(self, name): + self.name = name def hasContent_(self): if ( self.parent is not None or @@ -14564,6 +16665,30 @@ def factory(*args_, **kwargs_): else: return Morphology(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_segment(self): + return self.segments + def set_segment(self, segments): + self.segments = segments + def add_segment(self, value): + self.segments.append(value) + def insert_segment_at(self, index, value): + self.segments.insert(index, value) + def replace_segment_at(self, index, value): + self.segments[index] = value + def get_segmentGroup(self): + return self.segment_groups + def set_segmentGroup(self, segment_groups): + self.segment_groups = segment_groups + def add_segmentGroup(self, value): + self.segment_groups.append(value) + def insert_segmentGroup_at(self, index, value): + self.segment_groups.insert(index, value) + def replace_segmentGroup_at(self, index, value): + self.segment_groups[index] = value def hasContent_(self): if ( self.segments or @@ -14666,6 +16791,12 @@ def factory(*args_, **kwargs_): else: return BaseCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseCell, self).hasContent_() @@ -14756,6 +16887,12 @@ def factory(*args_, **kwargs_): else: return BaseSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseSynapse, self).hasContent_() @@ -14858,6 +16995,26 @@ def factory(*args_, **kwargs_): else: return FixedFactorConcentrationModel(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion + def get_restingConc(self): + return self.resting_conc + def set_restingConc(self, resting_conc): + self.resting_conc = resting_conc + def get_decayConstant(self): + return self.decay_constant + def set_decayConstant(self, decay_constant): + self.decay_constant = decay_constant + def get_rho(self): + return self.rho + def set_rho(self, rho): + self.rho = rho def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -15025,6 +17182,28 @@ def factory(*args_, **kwargs_): else: return DecayingPoolConcentrationModel(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_ion(self): + return self.ion + def set_ion(self, ion): + self.ion = ion + def get_restingConc(self): + return self.resting_conc + def set_restingConc(self, resting_conc): + self.resting_conc = resting_conc + def get_decayConstant(self): + return self.decay_constant + def set_decayConstant(self, decay_constant): + self.decay_constant = decay_constant + def get_shellThickness(self): + return self.shell_thickness + def set_shellThickness(self, shell_thickness): + self.shell_thickness = shell_thickness + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -15206,6 +17385,30 @@ def factory(*args_, **kwargs_): else: return GateFractionalSubgate(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_fractionalConductance(self): + return self.fractional_conductance + def set_fractionalConductance(self, fractional_conductance): + self.fractional_conductance = fractional_conductance def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -15371,6 +17574,32 @@ def factory(*args_, **kwargs_): else: return GateFractional(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_subGate(self): + return self.sub_gates + def set_subGate(self, sub_gates): + self.sub_gates = sub_gates + def add_subGate(self, value): + self.sub_gates.append(value) + def insert_subGate_at(self, index, value): + self.sub_gates.insert(index, value) + def replace_subGate_at(self, index, value): + self.sub_gates[index] = value + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -15520,6 +17749,22 @@ def factory(*args_, **kwargs_): else: return GateHHInstantaneous(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -15669,6 +17914,34 @@ def factory(*args_, **kwargs_): else: return GateHHRatesInf(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_forwardRate(self): + return self.forward_rate + def set_forwardRate(self, forward_rate): + self.forward_rate = forward_rate + def get_reverseRate(self): + return self.reverse_rate + def set_reverseRate(self, reverse_rate): + self.reverse_rate = reverse_rate + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -15845,6 +18118,34 @@ def factory(*args_, **kwargs_): else: return GateHHRatesTau(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_forwardRate(self): + return self.forward_rate + def set_forwardRate(self, forward_rate): + self.forward_rate = forward_rate + def get_reverseRate(self): + return self.reverse_rate + def set_reverseRate(self, reverse_rate): + self.reverse_rate = reverse_rate + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16024,6 +18325,38 @@ def factory(*args_, **kwargs_): else: return GateHHRatesTauInf(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_forwardRate(self): + return self.forward_rate + def set_forwardRate(self, forward_rate): + self.forward_rate = forward_rate + def get_reverseRate(self): + return self.reverse_rate + def set_reverseRate(self, reverse_rate): + self.reverse_rate = reverse_rate + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16206,6 +18539,30 @@ def factory(*args_, **kwargs_): else: return GateHHTauInf(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16370,6 +18727,30 @@ def factory(*args_, **kwargs_): else: return GateHHRates(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_forwardRate(self): + return self.forward_rate + def set_forwardRate(self, forward_rate): + self.forward_rate = forward_rate + def get_reverseRate(self): + return self.reverse_rate + def set_reverseRate(self, reverse_rate): + self.reverse_rate = reverse_rate + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16552,6 +18933,52 @@ def factory(*args_, **kwargs_): else: return GateHHUndetermined(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_forwardRate(self): + return self.forward_rate + def set_forwardRate(self, forward_rate): + self.forward_rate = forward_rate + def get_reverseRate(self): + return self.reverse_rate + def set_reverseRate(self, reverse_rate): + self.reverse_rate = reverse_rate + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_subGate(self): + return self.sub_gates + def set_subGate(self, sub_gates): + self.sub_gates = sub_gates + def add_subGate(self, value): + self.sub_gates.append(value) + def insert_subGate_at(self, index, value): + self.sub_gates.insert(index, value) + def replace_subGate_at(self, index, value): + self.sub_gates[index] = value + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances + def get_type(self): + return self.type + def set_type(self, type): + self.type = type def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16788,6 +19215,72 @@ def factory(*args_, **kwargs_): else: return GateKS(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_notes(self): + return self.notes + def set_notes(self, notes): + self.notes = notes + def get_q10Settings(self): + return self.q10_settings + def set_q10Settings(self, q10_settings): + self.q10_settings = q10_settings + def get_closedState(self): + return self.closed_states + def set_closedState(self, closed_states): + self.closed_states = closed_states + def add_closedState(self, value): + self.closed_states.append(value) + def insert_closedState_at(self, index, value): + self.closed_states.insert(index, value) + def replace_closedState_at(self, index, value): + self.closed_states[index] = value + def get_openState(self): + return self.open_states + def set_openState(self, open_states): + self.open_states = open_states + def add_openState(self, value): + self.open_states.append(value) + def insert_openState_at(self, index, value): + self.open_states.insert(index, value) + def replace_openState_at(self, index, value): + self.open_states[index] = value + def get_forwardTransition(self): + return self.forward_transition + def set_forwardTransition(self, forward_transition): + self.forward_transition = forward_transition + def add_forwardTransition(self, value): + self.forward_transition.append(value) + def insert_forwardTransition_at(self, index, value): + self.forward_transition.insert(index, value) + def replace_forwardTransition_at(self, index, value): + self.forward_transition[index] = value + def get_reverseTransition(self): + return self.reverse_transition + def set_reverseTransition(self, reverse_transition): + self.reverse_transition = reverse_transition + def add_reverseTransition(self, value): + self.reverse_transition.append(value) + def insert_reverseTransition_at(self, index, value): + self.reverse_transition.insert(index, value) + def replace_reverseTransition_at(self, index, value): + self.reverse_transition[index] = value + def get_tauInfTransition(self): + return self.tau_inf_transition + def set_tauInfTransition(self, tau_inf_transition): + self.tau_inf_transition = tau_inf_transition + def add_tauInfTransition(self, value): + self.tau_inf_transition.append(value) + def insert_tauInfTransition_at(self, index, value): + self.tau_inf_transition.insert(index, value) + def replace_tauInfTransition_at(self, index, value): + self.tau_inf_transition[index] = value + def get_instances(self): + return self.instances + def set_instances(self, instances): + self.instances = instances def validate_Notes(self, value): result = True # Validate type Notes, a restriction on xs:string. @@ -16975,6 +19468,26 @@ def factory(*args_, **kwargs_): else: return TauInfTransition(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_steadyState(self): + return self.steady_state + def set_steadyState(self, steady_state): + self.steady_state = steady_state + def get_timeCourse(self): + return self.time_course + def set_timeCourse(self, time_course): + self.time_course = time_course + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -17111,6 +19624,22 @@ def factory(*args_, **kwargs_): else: return ReverseTransition(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -17237,6 +19766,22 @@ def factory(*args_, **kwargs_): else: return ForwardTransition(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_anytypeobjs_(self): return self.anytypeobjs_ + def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ + def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) + def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value + def get_from(self): + return self.from_ + def set_from(self, from_): + self.from_ = from_ + def get_to(self): + return self.to + def set_to(self, to): + self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -17352,6 +19897,10 @@ def factory(*args_, **kwargs_): else: return OpenState(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(OpenState, self).hasContent_() @@ -17429,6 +19978,10 @@ def factory(*args_, **kwargs_): else: return ClosedState(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ClosedState, self).hasContent_() @@ -17519,6 +20072,28 @@ def factory(*args_, **kwargs_): else: return IonChannelKS(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_gateKS(self): + return self.gate_kses + def set_gateKS(self, gate_kses): + self.gate_kses = gate_kses + def add_gateKS(self, value): + self.gate_kses.append(value) + def insert_gateKS_at(self, index, value): + self.gate_kses.insert(index, value) + def replace_gateKS_at(self, index, value): + self.gate_kses[index] = value + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def get_conductance(self): + return self.conductance + def set_conductance(self, conductance): + self.conductance = conductance def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -17653,6 +20228,22 @@ def factory(*args_, **kwargs_): else: return IonChannelScalable(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_q10ConductanceScaling(self): + return self.q10_conductance_scalings + def set_q10ConductanceScaling(self, q10_conductance_scalings): + self.q10_conductance_scalings = q10_conductance_scalings + def add_q10ConductanceScaling(self, value): + self.q10_conductance_scalings.append(value) + def insert_q10ConductanceScaling_at(self, index, value): + self.q10_conductance_scalings.insert(index, value) + def replace_q10ConductanceScaling_at(self, index, value): + self.q10_conductance_scalings[index] = value + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.q10_conductance_scalings or @@ -18156,6 +20747,680 @@ def factory(*args_, **kwargs_): else: return NeuroMLDocument(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_include(self): + return self.includes + def set_include(self, includes): + self.includes = includes + def add_include(self, value): + self.includes.append(value) + def insert_include_at(self, index, value): + self.includes.insert(index, value) + def replace_include_at(self, index, value): + self.includes[index] = value + def get_extracellularProperties(self): + return self.extracellular_properties + def set_extracellularProperties(self, extracellular_properties): + self.extracellular_properties = extracellular_properties + def add_extracellularProperties(self, value): + self.extracellular_properties.append(value) + def insert_extracellularProperties_at(self, index, value): + self.extracellular_properties.insert(index, value) + def replace_extracellularProperties_at(self, index, value): + self.extracellular_properties[index] = value + def get_intracellularProperties(self): + return self.intracellular_properties + def set_intracellularProperties(self, intracellular_properties): + self.intracellular_properties = intracellular_properties + def add_intracellularProperties(self, value): + self.intracellular_properties.append(value) + def insert_intracellularProperties_at(self, index, value): + self.intracellular_properties.insert(index, value) + def replace_intracellularProperties_at(self, index, value): + self.intracellular_properties[index] = value + def get_morphology(self): + return self.morphology + def set_morphology(self, morphology): + self.morphology = morphology + def add_morphology(self, value): + self.morphology.append(value) + def insert_morphology_at(self, index, value): + self.morphology.insert(index, value) + def replace_morphology_at(self, index, value): + self.morphology[index] = value + def get_ionChannel(self): + return self.ion_channel + def set_ionChannel(self, ion_channel): + self.ion_channel = ion_channel + def add_ionChannel(self, value): + self.ion_channel.append(value) + def insert_ionChannel_at(self, index, value): + self.ion_channel.insert(index, value) + def replace_ionChannel_at(self, index, value): + self.ion_channel[index] = value + def get_ionChannelHH(self): + return self.ion_channel_hhs + def set_ionChannelHH(self, ion_channel_hhs): + self.ion_channel_hhs = ion_channel_hhs + def add_ionChannelHH(self, value): + self.ion_channel_hhs.append(value) + def insert_ionChannelHH_at(self, index, value): + self.ion_channel_hhs.insert(index, value) + def replace_ionChannelHH_at(self, index, value): + self.ion_channel_hhs[index] = value + def get_ionChannelVShift(self): + return self.ion_channel_v_shifts + def set_ionChannelVShift(self, ion_channel_v_shifts): + self.ion_channel_v_shifts = ion_channel_v_shifts + def add_ionChannelVShift(self, value): + self.ion_channel_v_shifts.append(value) + def insert_ionChannelVShift_at(self, index, value): + self.ion_channel_v_shifts.insert(index, value) + def replace_ionChannelVShift_at(self, index, value): + self.ion_channel_v_shifts[index] = value + def get_ionChannelKS(self): + return self.ion_channel_kses + def set_ionChannelKS(self, ion_channel_kses): + self.ion_channel_kses = ion_channel_kses + def add_ionChannelKS(self, value): + self.ion_channel_kses.append(value) + def insert_ionChannelKS_at(self, index, value): + self.ion_channel_kses.insert(index, value) + def replace_ionChannelKS_at(self, index, value): + self.ion_channel_kses[index] = value + def get_decayingPoolConcentrationModel(self): + return self.decaying_pool_concentration_models + def set_decayingPoolConcentrationModel(self, decaying_pool_concentration_models): + self.decaying_pool_concentration_models = decaying_pool_concentration_models + def add_decayingPoolConcentrationModel(self, value): + self.decaying_pool_concentration_models.append(value) + def insert_decayingPoolConcentrationModel_at(self, index, value): + self.decaying_pool_concentration_models.insert(index, value) + def replace_decayingPoolConcentrationModel_at(self, index, value): + self.decaying_pool_concentration_models[index] = value + def get_fixedFactorConcentrationModel(self): + return self.fixed_factor_concentration_models + def set_fixedFactorConcentrationModel(self, fixed_factor_concentration_models): + self.fixed_factor_concentration_models = fixed_factor_concentration_models + def add_fixedFactorConcentrationModel(self, value): + self.fixed_factor_concentration_models.append(value) + def insert_fixedFactorConcentrationModel_at(self, index, value): + self.fixed_factor_concentration_models.insert(index, value) + def replace_fixedFactorConcentrationModel_at(self, index, value): + self.fixed_factor_concentration_models[index] = value + def get_alphaCurrentSynapse(self): + return self.alpha_current_synapses + def set_alphaCurrentSynapse(self, alpha_current_synapses): + self.alpha_current_synapses = alpha_current_synapses + def add_alphaCurrentSynapse(self, value): + self.alpha_current_synapses.append(value) + def insert_alphaCurrentSynapse_at(self, index, value): + self.alpha_current_synapses.insert(index, value) + def replace_alphaCurrentSynapse_at(self, index, value): + self.alpha_current_synapses[index] = value + def get_alphaSynapse(self): + return self.alpha_synapses + def set_alphaSynapse(self, alpha_synapses): + self.alpha_synapses = alpha_synapses + def add_alphaSynapse(self, value): + self.alpha_synapses.append(value) + def insert_alphaSynapse_at(self, index, value): + self.alpha_synapses.insert(index, value) + def replace_alphaSynapse_at(self, index, value): + self.alpha_synapses[index] = value + def get_expOneSynapse(self): + return self.exp_one_synapses + def set_expOneSynapse(self, exp_one_synapses): + self.exp_one_synapses = exp_one_synapses + def add_expOneSynapse(self, value): + self.exp_one_synapses.append(value) + def insert_expOneSynapse_at(self, index, value): + self.exp_one_synapses.insert(index, value) + def replace_expOneSynapse_at(self, index, value): + self.exp_one_synapses[index] = value + def get_expTwoSynapse(self): + return self.exp_two_synapses + def set_expTwoSynapse(self, exp_two_synapses): + self.exp_two_synapses = exp_two_synapses + def add_expTwoSynapse(self, value): + self.exp_two_synapses.append(value) + def insert_expTwoSynapse_at(self, index, value): + self.exp_two_synapses.insert(index, value) + def replace_expTwoSynapse_at(self, index, value): + self.exp_two_synapses[index] = value + def get_expThreeSynapse(self): + return self.exp_three_synapses + def set_expThreeSynapse(self, exp_three_synapses): + self.exp_three_synapses = exp_three_synapses + def add_expThreeSynapse(self, value): + self.exp_three_synapses.append(value) + def insert_expThreeSynapse_at(self, index, value): + self.exp_three_synapses.insert(index, value) + def replace_expThreeSynapse_at(self, index, value): + self.exp_three_synapses[index] = value + def get_blockingPlasticSynapse(self): + return self.blocking_plastic_synapses + def set_blockingPlasticSynapse(self, blocking_plastic_synapses): + self.blocking_plastic_synapses = blocking_plastic_synapses + def add_blockingPlasticSynapse(self, value): + self.blocking_plastic_synapses.append(value) + def insert_blockingPlasticSynapse_at(self, index, value): + self.blocking_plastic_synapses.insert(index, value) + def replace_blockingPlasticSynapse_at(self, index, value): + self.blocking_plastic_synapses[index] = value + def get_doubleSynapse(self): + return self.double_synapses + def set_doubleSynapse(self, double_synapses): + self.double_synapses = double_synapses + def add_doubleSynapse(self, value): + self.double_synapses.append(value) + def insert_doubleSynapse_at(self, index, value): + self.double_synapses.insert(index, value) + def replace_doubleSynapse_at(self, index, value): + self.double_synapses[index] = value + def get_gapJunction(self): + return self.gap_junctions + def set_gapJunction(self, gap_junctions): + self.gap_junctions = gap_junctions + def add_gapJunction(self, value): + self.gap_junctions.append(value) + def insert_gapJunction_at(self, index, value): + self.gap_junctions.insert(index, value) + def replace_gapJunction_at(self, index, value): + self.gap_junctions[index] = value + def get_silentSynapse(self): + return self.silent_synapses + def set_silentSynapse(self, silent_synapses): + self.silent_synapses = silent_synapses + def add_silentSynapse(self, value): + self.silent_synapses.append(value) + def insert_silentSynapse_at(self, index, value): + self.silent_synapses.insert(index, value) + def replace_silentSynapse_at(self, index, value): + self.silent_synapses[index] = value + def get_linearGradedSynapse(self): + return self.linear_graded_synapses + def set_linearGradedSynapse(self, linear_graded_synapses): + self.linear_graded_synapses = linear_graded_synapses + def add_linearGradedSynapse(self, value): + self.linear_graded_synapses.append(value) + def insert_linearGradedSynapse_at(self, index, value): + self.linear_graded_synapses.insert(index, value) + def replace_linearGradedSynapse_at(self, index, value): + self.linear_graded_synapses[index] = value + def get_gradedSynapse(self): + return self.graded_synapses + def set_gradedSynapse(self, graded_synapses): + self.graded_synapses = graded_synapses + def add_gradedSynapse(self, value): + self.graded_synapses.append(value) + def insert_gradedSynapse_at(self, index, value): + self.graded_synapses.insert(index, value) + def replace_gradedSynapse_at(self, index, value): + self.graded_synapses[index] = value + def get_biophysicalProperties(self): + return self.biophysical_properties + def set_biophysicalProperties(self, biophysical_properties): + self.biophysical_properties = biophysical_properties + def add_biophysicalProperties(self, value): + self.biophysical_properties.append(value) + def insert_biophysicalProperties_at(self, index, value): + self.biophysical_properties.insert(index, value) + def replace_biophysicalProperties_at(self, index, value): + self.biophysical_properties[index] = value + def get_cell(self): + return self.cells + def set_cell(self, cells): + self.cells = cells + def add_cell(self, value): + self.cells.append(value) + def insert_cell_at(self, index, value): + self.cells.insert(index, value) + def replace_cell_at(self, index, value): + self.cells[index] = value + def get_cell2CaPools(self): + return self.cell2_ca_poolses + def set_cell2CaPools(self, cell2_ca_poolses): + self.cell2_ca_poolses = cell2_ca_poolses + def add_cell2CaPools(self, value): + self.cell2_ca_poolses.append(value) + def insert_cell2CaPools_at(self, index, value): + self.cell2_ca_poolses.insert(index, value) + def replace_cell2CaPools_at(self, index, value): + self.cell2_ca_poolses[index] = value + def get_baseCell(self): + return self.base_cells + def set_baseCell(self, base_cells): + self.base_cells = base_cells + def add_baseCell(self, value): + self.base_cells.append(value) + def insert_baseCell_at(self, index, value): + self.base_cells.insert(index, value) + def replace_baseCell_at(self, index, value): + self.base_cells[index] = value + def get_iafTauCell(self): + return self.iaf_tau_cells + def set_iafTauCell(self, iaf_tau_cells): + self.iaf_tau_cells = iaf_tau_cells + def add_iafTauCell(self, value): + self.iaf_tau_cells.append(value) + def insert_iafTauCell_at(self, index, value): + self.iaf_tau_cells.insert(index, value) + def replace_iafTauCell_at(self, index, value): + self.iaf_tau_cells[index] = value + def get_iafTauRefCell(self): + return self.iaf_tau_ref_cells + def set_iafTauRefCell(self, iaf_tau_ref_cells): + self.iaf_tau_ref_cells = iaf_tau_ref_cells + def add_iafTauRefCell(self, value): + self.iaf_tau_ref_cells.append(value) + def insert_iafTauRefCell_at(self, index, value): + self.iaf_tau_ref_cells.insert(index, value) + def replace_iafTauRefCell_at(self, index, value): + self.iaf_tau_ref_cells[index] = value + def get_iafCell(self): + return self.iaf_cells + def set_iafCell(self, iaf_cells): + self.iaf_cells = iaf_cells + def add_iafCell(self, value): + self.iaf_cells.append(value) + def insert_iafCell_at(self, index, value): + self.iaf_cells.insert(index, value) + def replace_iafCell_at(self, index, value): + self.iaf_cells[index] = value + def get_iafRefCell(self): + return self.iaf_ref_cells + def set_iafRefCell(self, iaf_ref_cells): + self.iaf_ref_cells = iaf_ref_cells + def add_iafRefCell(self, value): + self.iaf_ref_cells.append(value) + def insert_iafRefCell_at(self, index, value): + self.iaf_ref_cells.insert(index, value) + def replace_iafRefCell_at(self, index, value): + self.iaf_ref_cells[index] = value + def get_izhikevichCell(self): + return self.izhikevich_cells + def set_izhikevichCell(self, izhikevich_cells): + self.izhikevich_cells = izhikevich_cells + def add_izhikevichCell(self, value): + self.izhikevich_cells.append(value) + def insert_izhikevichCell_at(self, index, value): + self.izhikevich_cells.insert(index, value) + def replace_izhikevichCell_at(self, index, value): + self.izhikevich_cells[index] = value + def get_izhikevich2007Cell(self): + return self.izhikevich2007_cells + def set_izhikevich2007Cell(self, izhikevich2007_cells): + self.izhikevich2007_cells = izhikevich2007_cells + def add_izhikevich2007Cell(self, value): + self.izhikevich2007_cells.append(value) + def insert_izhikevich2007Cell_at(self, index, value): + self.izhikevich2007_cells.insert(index, value) + def replace_izhikevich2007Cell_at(self, index, value): + self.izhikevich2007_cells[index] = value + def get_adExIaFCell(self): + return self.ad_ex_ia_f_cells + def set_adExIaFCell(self, ad_ex_ia_f_cells): + self.ad_ex_ia_f_cells = ad_ex_ia_f_cells + def add_adExIaFCell(self, value): + self.ad_ex_ia_f_cells.append(value) + def insert_adExIaFCell_at(self, index, value): + self.ad_ex_ia_f_cells.insert(index, value) + def replace_adExIaFCell_at(self, index, value): + self.ad_ex_ia_f_cells[index] = value + def get_fitzHughNagumoCell(self): + return self.fitz_hugh_nagumo_cells + def set_fitzHughNagumoCell(self, fitz_hugh_nagumo_cells): + self.fitz_hugh_nagumo_cells = fitz_hugh_nagumo_cells + def add_fitzHughNagumoCell(self, value): + self.fitz_hugh_nagumo_cells.append(value) + def insert_fitzHughNagumoCell_at(self, index, value): + self.fitz_hugh_nagumo_cells.insert(index, value) + def replace_fitzHughNagumoCell_at(self, index, value): + self.fitz_hugh_nagumo_cells[index] = value + def get_fitzHughNagumo1969Cell(self): + return self.fitz_hugh_nagumo1969_cells + def set_fitzHughNagumo1969Cell(self, fitz_hugh_nagumo1969_cells): + self.fitz_hugh_nagumo1969_cells = fitz_hugh_nagumo1969_cells + def add_fitzHughNagumo1969Cell(self, value): + self.fitz_hugh_nagumo1969_cells.append(value) + def insert_fitzHughNagumo1969Cell_at(self, index, value): + self.fitz_hugh_nagumo1969_cells.insert(index, value) + def replace_fitzHughNagumo1969Cell_at(self, index, value): + self.fitz_hugh_nagumo1969_cells[index] = value + def get_pinskyRinzelCA3Cell(self): + return self.pinsky_rinzel_ca3_cells + def set_pinskyRinzelCA3Cell(self, pinsky_rinzel_ca3_cells): + self.pinsky_rinzel_ca3_cells = pinsky_rinzel_ca3_cells + def add_pinskyRinzelCA3Cell(self, value): + self.pinsky_rinzel_ca3_cells.append(value) + def insert_pinskyRinzelCA3Cell_at(self, index, value): + self.pinsky_rinzel_ca3_cells.insert(index, value) + def replace_pinskyRinzelCA3Cell_at(self, index, value): + self.pinsky_rinzel_ca3_cells[index] = value + def get_pulseGenerator(self): + return self.pulse_generators + def set_pulseGenerator(self, pulse_generators): + self.pulse_generators = pulse_generators + def add_pulseGenerator(self, value): + self.pulse_generators.append(value) + def insert_pulseGenerator_at(self, index, value): + self.pulse_generators.insert(index, value) + def replace_pulseGenerator_at(self, index, value): + self.pulse_generators[index] = value + def get_pulseGeneratorDL(self): + return self.pulse_generator_dls + def set_pulseGeneratorDL(self, pulse_generator_dls): + self.pulse_generator_dls = pulse_generator_dls + def add_pulseGeneratorDL(self, value): + self.pulse_generator_dls.append(value) + def insert_pulseGeneratorDL_at(self, index, value): + self.pulse_generator_dls.insert(index, value) + def replace_pulseGeneratorDL_at(self, index, value): + self.pulse_generator_dls[index] = value + def get_sineGenerator(self): + return self.sine_generators + def set_sineGenerator(self, sine_generators): + self.sine_generators = sine_generators + def add_sineGenerator(self, value): + self.sine_generators.append(value) + def insert_sineGenerator_at(self, index, value): + self.sine_generators.insert(index, value) + def replace_sineGenerator_at(self, index, value): + self.sine_generators[index] = value + def get_sineGeneratorDL(self): + return self.sine_generator_dls + def set_sineGeneratorDL(self, sine_generator_dls): + self.sine_generator_dls = sine_generator_dls + def add_sineGeneratorDL(self, value): + self.sine_generator_dls.append(value) + def insert_sineGeneratorDL_at(self, index, value): + self.sine_generator_dls.insert(index, value) + def replace_sineGeneratorDL_at(self, index, value): + self.sine_generator_dls[index] = value + def get_rampGenerator(self): + return self.ramp_generators + def set_rampGenerator(self, ramp_generators): + self.ramp_generators = ramp_generators + def add_rampGenerator(self, value): + self.ramp_generators.append(value) + def insert_rampGenerator_at(self, index, value): + self.ramp_generators.insert(index, value) + def replace_rampGenerator_at(self, index, value): + self.ramp_generators[index] = value + def get_rampGeneratorDL(self): + return self.ramp_generator_dls + def set_rampGeneratorDL(self, ramp_generator_dls): + self.ramp_generator_dls = ramp_generator_dls + def add_rampGeneratorDL(self, value): + self.ramp_generator_dls.append(value) + def insert_rampGeneratorDL_at(self, index, value): + self.ramp_generator_dls.insert(index, value) + def replace_rampGeneratorDL_at(self, index, value): + self.ramp_generator_dls[index] = value + def get_compoundInput(self): + return self.compound_inputs + def set_compoundInput(self, compound_inputs): + self.compound_inputs = compound_inputs + def add_compoundInput(self, value): + self.compound_inputs.append(value) + def insert_compoundInput_at(self, index, value): + self.compound_inputs.insert(index, value) + def replace_compoundInput_at(self, index, value): + self.compound_inputs[index] = value + def get_compoundInputDL(self): + return self.compound_input_dls + def set_compoundInputDL(self, compound_input_dls): + self.compound_input_dls = compound_input_dls + def add_compoundInputDL(self, value): + self.compound_input_dls.append(value) + def insert_compoundInputDL_at(self, index, value): + self.compound_input_dls.insert(index, value) + def replace_compoundInputDL_at(self, index, value): + self.compound_input_dls[index] = value + def get_voltageClamp(self): + return self.voltage_clamps + def set_voltageClamp(self, voltage_clamps): + self.voltage_clamps = voltage_clamps + def add_voltageClamp(self, value): + self.voltage_clamps.append(value) + def insert_voltageClamp_at(self, index, value): + self.voltage_clamps.insert(index, value) + def replace_voltageClamp_at(self, index, value): + self.voltage_clamps[index] = value + def get_voltageClampTriple(self): + return self.voltage_clamp_triples + def set_voltageClampTriple(self, voltage_clamp_triples): + self.voltage_clamp_triples = voltage_clamp_triples + def add_voltageClampTriple(self, value): + self.voltage_clamp_triples.append(value) + def insert_voltageClampTriple_at(self, index, value): + self.voltage_clamp_triples.insert(index, value) + def replace_voltageClampTriple_at(self, index, value): + self.voltage_clamp_triples[index] = value + def get_spikeArray(self): + return self.spike_arrays + def set_spikeArray(self, spike_arrays): + self.spike_arrays = spike_arrays + def add_spikeArray(self, value): + self.spike_arrays.append(value) + def insert_spikeArray_at(self, index, value): + self.spike_arrays.insert(index, value) + def replace_spikeArray_at(self, index, value): + self.spike_arrays[index] = value + def get_timedSynapticInput(self): + return self.timed_synaptic_inputs + def set_timedSynapticInput(self, timed_synaptic_inputs): + self.timed_synaptic_inputs = timed_synaptic_inputs + def add_timedSynapticInput(self, value): + self.timed_synaptic_inputs.append(value) + def insert_timedSynapticInput_at(self, index, value): + self.timed_synaptic_inputs.insert(index, value) + def replace_timedSynapticInput_at(self, index, value): + self.timed_synaptic_inputs[index] = value + def get_spikeGenerator(self): + return self.spike_generators + def set_spikeGenerator(self, spike_generators): + self.spike_generators = spike_generators + def add_spikeGenerator(self, value): + self.spike_generators.append(value) + def insert_spikeGenerator_at(self, index, value): + self.spike_generators.insert(index, value) + def replace_spikeGenerator_at(self, index, value): + self.spike_generators[index] = value + def get_spikeGeneratorRandom(self): + return self.spike_generator_randoms + def set_spikeGeneratorRandom(self, spike_generator_randoms): + self.spike_generator_randoms = spike_generator_randoms + def add_spikeGeneratorRandom(self, value): + self.spike_generator_randoms.append(value) + def insert_spikeGeneratorRandom_at(self, index, value): + self.spike_generator_randoms.insert(index, value) + def replace_spikeGeneratorRandom_at(self, index, value): + self.spike_generator_randoms[index] = value + def get_spikeGeneratorPoisson(self): + return self.spike_generator_poissons + def set_spikeGeneratorPoisson(self, spike_generator_poissons): + self.spike_generator_poissons = spike_generator_poissons + def add_spikeGeneratorPoisson(self, value): + self.spike_generator_poissons.append(value) + def insert_spikeGeneratorPoisson_at(self, index, value): + self.spike_generator_poissons.insert(index, value) + def replace_spikeGeneratorPoisson_at(self, index, value): + self.spike_generator_poissons[index] = value + def get_spikeGeneratorRefPoisson(self): + return self.spike_generator_ref_poissons + def set_spikeGeneratorRefPoisson(self, spike_generator_ref_poissons): + self.spike_generator_ref_poissons = spike_generator_ref_poissons + def add_spikeGeneratorRefPoisson(self, value): + self.spike_generator_ref_poissons.append(value) + def insert_spikeGeneratorRefPoisson_at(self, index, value): + self.spike_generator_ref_poissons.insert(index, value) + def replace_spikeGeneratorRefPoisson_at(self, index, value): + self.spike_generator_ref_poissons[index] = value + def get_poissonFiringSynapse(self): + return self.poisson_firing_synapses + def set_poissonFiringSynapse(self, poisson_firing_synapses): + self.poisson_firing_synapses = poisson_firing_synapses + def add_poissonFiringSynapse(self, value): + self.poisson_firing_synapses.append(value) + def insert_poissonFiringSynapse_at(self, index, value): + self.poisson_firing_synapses.insert(index, value) + def replace_poissonFiringSynapse_at(self, index, value): + self.poisson_firing_synapses[index] = value + def get_transientPoissonFiringSynapse(self): + return self.transient_poisson_firing_synapses + def set_transientPoissonFiringSynapse(self, transient_poisson_firing_synapses): + self.transient_poisson_firing_synapses = transient_poisson_firing_synapses + def add_transientPoissonFiringSynapse(self, value): + self.transient_poisson_firing_synapses.append(value) + def insert_transientPoissonFiringSynapse_at(self, index, value): + self.transient_poisson_firing_synapses.insert(index, value) + def replace_transientPoissonFiringSynapse_at(self, index, value): + self.transient_poisson_firing_synapses[index] = value + def get_IF_curr_alpha(self): + return self.IF_curr_alpha + def set_IF_curr_alpha(self, IF_curr_alpha): + self.IF_curr_alpha = IF_curr_alpha + def add_IF_curr_alpha(self, value): + self.IF_curr_alpha.append(value) + def insert_IF_curr_alpha_at(self, index, value): + self.IF_curr_alpha.insert(index, value) + def replace_IF_curr_alpha_at(self, index, value): + self.IF_curr_alpha[index] = value + def get_IF_curr_exp(self): + return self.IF_curr_exp + def set_IF_curr_exp(self, IF_curr_exp): + self.IF_curr_exp = IF_curr_exp + def add_IF_curr_exp(self, value): + self.IF_curr_exp.append(value) + def insert_IF_curr_exp_at(self, index, value): + self.IF_curr_exp.insert(index, value) + def replace_IF_curr_exp_at(self, index, value): + self.IF_curr_exp[index] = value + def get_IF_cond_alpha(self): + return self.IF_cond_alpha + def set_IF_cond_alpha(self, IF_cond_alpha): + self.IF_cond_alpha = IF_cond_alpha + def add_IF_cond_alpha(self, value): + self.IF_cond_alpha.append(value) + def insert_IF_cond_alpha_at(self, index, value): + self.IF_cond_alpha.insert(index, value) + def replace_IF_cond_alpha_at(self, index, value): + self.IF_cond_alpha[index] = value + def get_IF_cond_exp(self): + return self.IF_cond_exp + def set_IF_cond_exp(self, IF_cond_exp): + self.IF_cond_exp = IF_cond_exp + def add_IF_cond_exp(self, value): + self.IF_cond_exp.append(value) + def insert_IF_cond_exp_at(self, index, value): + self.IF_cond_exp.insert(index, value) + def replace_IF_cond_exp_at(self, index, value): + self.IF_cond_exp[index] = value + def get_EIF_cond_exp_isfa_ista(self): + return self.EIF_cond_exp_isfa_ista + def set_EIF_cond_exp_isfa_ista(self, EIF_cond_exp_isfa_ista): + self.EIF_cond_exp_isfa_ista = EIF_cond_exp_isfa_ista + def add_EIF_cond_exp_isfa_ista(self, value): + self.EIF_cond_exp_isfa_ista.append(value) + def insert_EIF_cond_exp_isfa_ista_at(self, index, value): + self.EIF_cond_exp_isfa_ista.insert(index, value) + def replace_EIF_cond_exp_isfa_ista_at(self, index, value): + self.EIF_cond_exp_isfa_ista[index] = value + def get_EIF_cond_alpha_isfa_ista(self): + return self.EIF_cond_alpha_isfa_ista + def set_EIF_cond_alpha_isfa_ista(self, EIF_cond_alpha_isfa_ista): + self.EIF_cond_alpha_isfa_ista = EIF_cond_alpha_isfa_ista + def add_EIF_cond_alpha_isfa_ista(self, value): + self.EIF_cond_alpha_isfa_ista.append(value) + def insert_EIF_cond_alpha_isfa_ista_at(self, index, value): + self.EIF_cond_alpha_isfa_ista.insert(index, value) + def replace_EIF_cond_alpha_isfa_ista_at(self, index, value): + self.EIF_cond_alpha_isfa_ista[index] = value + def get_HH_cond_exp(self): + return self.HH_cond_exp + def set_HH_cond_exp(self, HH_cond_exp): + self.HH_cond_exp = HH_cond_exp + def add_HH_cond_exp(self, value): + self.HH_cond_exp.append(value) + def insert_HH_cond_exp_at(self, index, value): + self.HH_cond_exp.insert(index, value) + def replace_HH_cond_exp_at(self, index, value): + self.HH_cond_exp[index] = value + def get_expCondSynapse(self): + return self.exp_cond_synapses + def set_expCondSynapse(self, exp_cond_synapses): + self.exp_cond_synapses = exp_cond_synapses + def add_expCondSynapse(self, value): + self.exp_cond_synapses.append(value) + def insert_expCondSynapse_at(self, index, value): + self.exp_cond_synapses.insert(index, value) + def replace_expCondSynapse_at(self, index, value): + self.exp_cond_synapses[index] = value + def get_alphaCondSynapse(self): + return self.alpha_cond_synapses + def set_alphaCondSynapse(self, alpha_cond_synapses): + self.alpha_cond_synapses = alpha_cond_synapses + def add_alphaCondSynapse(self, value): + self.alpha_cond_synapses.append(value) + def insert_alphaCondSynapse_at(self, index, value): + self.alpha_cond_synapses.insert(index, value) + def replace_alphaCondSynapse_at(self, index, value): + self.alpha_cond_synapses[index] = value + def get_expCurrSynapse(self): + return self.exp_curr_synapses + def set_expCurrSynapse(self, exp_curr_synapses): + self.exp_curr_synapses = exp_curr_synapses + def add_expCurrSynapse(self, value): + self.exp_curr_synapses.append(value) + def insert_expCurrSynapse_at(self, index, value): + self.exp_curr_synapses.insert(index, value) + def replace_expCurrSynapse_at(self, index, value): + self.exp_curr_synapses[index] = value + def get_alphaCurrSynapse(self): + return self.alpha_curr_synapses + def set_alphaCurrSynapse(self, alpha_curr_synapses): + self.alpha_curr_synapses = alpha_curr_synapses + def add_alphaCurrSynapse(self, value): + self.alpha_curr_synapses.append(value) + def insert_alphaCurrSynapse_at(self, index, value): + self.alpha_curr_synapses.insert(index, value) + def replace_alphaCurrSynapse_at(self, index, value): + self.alpha_curr_synapses[index] = value + def get_SpikeSourcePoisson(self): + return self.SpikeSourcePoisson + def set_SpikeSourcePoisson(self, SpikeSourcePoisson): + self.SpikeSourcePoisson = SpikeSourcePoisson + def add_SpikeSourcePoisson(self, value): + self.SpikeSourcePoisson.append(value) + def insert_SpikeSourcePoisson_at(self, index, value): + self.SpikeSourcePoisson.insert(index, value) + def replace_SpikeSourcePoisson_at(self, index, value): + self.SpikeSourcePoisson[index] = value + def get_network(self): + return self.networks + def set_network(self, networks): + self.networks = networks + def add_network(self, value): + self.networks.append(value) + def insert_network_at(self, index, value): + self.networks.insert(index, value) + def replace_network_at(self, index, value): + self.networks[index] = value + def get_ComponentType(self): + return self.ComponentType + def set_ComponentType(self, ComponentType): + self.ComponentType = ComponentType + def add_ComponentType(self, value): + self.ComponentType.append(value) + def insert_ComponentType_at(self, index, value): + self.ComponentType.insert(index, value) + def replace_ComponentType_at(self, index, value): + self.ComponentType[index] = value def hasContent_(self): if ( self.includes or @@ -19009,6 +22274,16 @@ def factory(*args_, **kwargs_): else: return BasePynnSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tau_syn(self): + return self.tau_syn + def set_tau_syn(self, tau_syn): + self.tau_syn = tau_syn + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BasePynnSynapse, self).hasContent_() @@ -19122,6 +22397,32 @@ def factory(*args_, **kwargs_): else: return basePyNNCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_cm(self): + return self.cm + def set_cm(self, cm): + self.cm = cm + def get_i_offset(self): + return self.i_offset + def set_i_offset(self, i_offset): + self.i_offset = i_offset + def get_tau_syn_E(self): + return self.tau_syn_E + def set_tau_syn_E(self, tau_syn_E): + self.tau_syn_E = tau_syn_E + def get_tau_syn_I(self): + return self.tau_syn_I + def set_tau_syn_I(self, tau_syn_I): + self.tau_syn_I = tau_syn_I + def get_v_init(self): + return self.v_init + def set_v_init(self, v_init): + self.v_init = v_init + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNCell, self).hasContent_() @@ -19271,6 +22572,40 @@ def factory(*args_, **kwargs_): else: return ContinuousProjection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_continuousConnection(self): + return self.continuous_connections + def set_continuousConnection(self, continuous_connections): + self.continuous_connections = continuous_connections + def add_continuousConnection(self, value): + self.continuous_connections.append(value) + def insert_continuousConnection_at(self, index, value): + self.continuous_connections.insert(index, value) + def replace_continuousConnection_at(self, index, value): + self.continuous_connections[index] = value + def get_continuousConnectionInstance(self): + return self.continuous_connection_instances + def set_continuousConnectionInstance(self, continuous_connection_instances): + self.continuous_connection_instances = continuous_connection_instances + def add_continuousConnectionInstance(self, value): + self.continuous_connection_instances.append(value) + def insert_continuousConnectionInstance_at(self, index, value): + self.continuous_connection_instances.insert(index, value) + def replace_continuousConnectionInstance_at(self, index, value): + self.continuous_connection_instances[index] = value + def get_continuousConnectionInstanceW(self): + return self.continuous_connection_instance_ws + def set_continuousConnectionInstanceW(self, continuous_connection_instance_ws): + self.continuous_connection_instance_ws = continuous_connection_instance_ws + def add_continuousConnectionInstanceW(self, value): + self.continuous_connection_instance_ws.append(value) + def insert_continuousConnectionInstanceW_at(self, index, value): + self.continuous_connection_instance_ws.insert(index, value) + def replace_continuousConnectionInstanceW_at(self, index, value): + self.continuous_connection_instance_ws[index] = value def hasContent_(self): if ( self.continuous_connections or @@ -19480,6 +22815,40 @@ def factory(*args_, **kwargs_): else: return ElectricalProjection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_electricalConnection(self): + return self.electrical_connections + def set_electricalConnection(self, electrical_connections): + self.electrical_connections = electrical_connections + def add_electricalConnection(self, value): + self.electrical_connections.append(value) + def insert_electricalConnection_at(self, index, value): + self.electrical_connections.insert(index, value) + def replace_electricalConnection_at(self, index, value): + self.electrical_connections[index] = value + def get_electricalConnectionInstance(self): + return self.electrical_connection_instances + def set_electricalConnectionInstance(self, electrical_connection_instances): + self.electrical_connection_instances = electrical_connection_instances + def add_electricalConnectionInstance(self, value): + self.electrical_connection_instances.append(value) + def insert_electricalConnectionInstance_at(self, index, value): + self.electrical_connection_instances.insert(index, value) + def replace_electricalConnectionInstance_at(self, index, value): + self.electrical_connection_instances[index] = value + def get_electricalConnectionInstanceW(self): + return self.electrical_connection_instance_ws + def set_electricalConnectionInstanceW(self, electrical_connection_instance_ws): + self.electrical_connection_instance_ws = electrical_connection_instance_ws + def add_electricalConnectionInstanceW(self, value): + self.electrical_connection_instance_ws.append(value) + def insert_electricalConnectionInstanceW_at(self, index, value): + self.electrical_connection_instance_ws.insert(index, value) + def replace_electricalConnectionInstanceW_at(self, index, value): + self.electrical_connection_instance_ws[index] = value def hasContent_(self): if ( self.electrical_connections or @@ -19685,6 +23054,36 @@ def factory(*args_, **kwargs_): else: return BaseConnectionNewFormat(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_preCell(self): + return self.pre_cell + def set_preCell(self, pre_cell): + self.pre_cell = pre_cell + def get_preSegment(self): + return self.pre_segment + def set_preSegment(self, pre_segment): + self.pre_segment = pre_segment + def get_preFractionAlong(self): + return self.pre_fraction_along + def set_preFractionAlong(self, pre_fraction_along): + self.pre_fraction_along = pre_fraction_along + def get_postCell(self): + return self.post_cell + def set_postCell(self, post_cell): + self.post_cell = post_cell + def get_postSegment(self): + return self.post_segment + def set_postSegment(self, post_segment): + self.post_segment = post_segment + def get_postFractionAlong(self): + return self.post_fraction_along + def set_postFractionAlong(self, post_fraction_along): + self.post_fraction_along = post_fraction_along + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -19871,6 +23270,36 @@ def factory(*args_, **kwargs_): else: return BaseConnectionOldFormat(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_preCellId(self): + return self.pre_cell_id + def set_preCellId(self, pre_cell_id): + self.pre_cell_id = pre_cell_id + def get_preSegmentId(self): + return self.pre_segment_id + def set_preSegmentId(self, pre_segment_id): + self.pre_segment_id = pre_segment_id + def get_preFractionAlong(self): + return self.pre_fraction_along + def set_preFractionAlong(self, pre_fraction_along): + self.pre_fraction_along = pre_fraction_along + def get_postCellId(self): + return self.post_cell_id + def set_postCellId(self, post_cell_id): + self.post_cell_id = post_cell_id + def get_postSegmentId(self): + return self.post_segment_id + def set_postSegmentId(self, post_segment_id): + self.post_segment_id = post_segment_id + def get_postFractionAlong(self): + return self.post_fraction_along + def set_postFractionAlong(self, post_fraction_along): + self.post_fraction_along = post_fraction_along + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -20052,6 +23481,34 @@ def factory(*args_, **kwargs_): else: return Projection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_connection(self): + return self.connections + def set_connection(self, connections): + self.connections = connections + def add_connection(self, value): + self.connections.append(value) + def insert_connection_at(self, index, value): + self.connections.insert(index, value) + def replace_connection_at(self, index, value): + self.connections[index] = value + def get_connectionWD(self): + return self.connection_wds + def set_connectionWD(self, connection_wds): + self.connection_wds = connection_wds + def add_connectionWD(self, value): + self.connection_wds.append(value) + def insert_connectionWD_at(self, index, value): + self.connection_wds.insert(index, value) + def replace_connectionWD_at(self, index, value): + self.connection_wds[index] = value + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -20265,6 +23722,14 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorRefPoisson(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_minimumISI(self): + return self.minimum_isi + def set_minimumISI(self, minimum_isi): + self.minimum_isi = minimum_isi def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -20364,6 +23829,14 @@ def factory(*args_, **kwargs_): else: return ConcentrationModel_D(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_type(self): + return self.type + def set_type(self, type): + self.type = type def hasContent_(self): if ( super(ConcentrationModel_D, self).hasContent_() @@ -20448,6 +23921,10 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNernstCa2(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ChannelDensityNernstCa2, self).hasContent_() @@ -20528,6 +24005,14 @@ def factory(*args_, **kwargs_): else: return ChannelDensityVShift(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_vShift(self): + return self.v_shift + def set_vShift(self, v_shift): + self.v_shift = v_shift def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -20641,6 +24126,28 @@ def factory(*args_, **kwargs_): else: return Cell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_morphology(self): + return self.morphology + def set_morphology(self, morphology): + self.morphology = morphology + def get_biophysicalProperties(self): + return self.biophysical_properties + def set_biophysicalProperties(self, biophysical_properties): + self.biophysical_properties = biophysical_properties + def get_morphology_attr(self): + return self.morphology_attr + def set_morphology_attr(self, morphology_attr): + self.morphology_attr = morphology_attr + def get_biophysical_properties_attr(self): + return self.biophysical_properties_attr + def set_biophysical_properties_attr(self, biophysical_properties_attr): + self.biophysical_properties_attr = biophysical_properties_attr + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21134,6 +24641,94 @@ def factory(*args_, **kwargs_): else: return PinskyRinzelCA3Cell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_iSoma(self): + return self.i_soma + def set_iSoma(self, i_soma): + self.i_soma = i_soma + def get_iDend(self): + return self.i_dend + def set_iDend(self, i_dend): + self.i_dend = i_dend + def get_gc(self): + return self.gc + def set_gc(self, gc): + self.gc = gc + def get_gLs(self): + return self.g_ls + def set_gLs(self, g_ls): + self.g_ls = g_ls + def get_gLd(self): + return self.g_ld + def set_gLd(self, g_ld): + self.g_ld = g_ld + def get_gNa(self): + return self.g_na + def set_gNa(self, g_na): + self.g_na = g_na + def get_gKdr(self): + return self.g_kdr + def set_gKdr(self, g_kdr): + self.g_kdr = g_kdr + def get_gCa(self): + return self.g_ca + def set_gCa(self, g_ca): + self.g_ca = g_ca + def get_gKahp(self): + return self.g_kahp + def set_gKahp(self, g_kahp): + self.g_kahp = g_kahp + def get_gKC(self): + return self.g_kc + def set_gKC(self, g_kc): + self.g_kc = g_kc + def get_gNmda(self): + return self.g_nmda + def set_gNmda(self, g_nmda): + self.g_nmda = g_nmda + def get_gAmpa(self): + return self.g_ampa + def set_gAmpa(self, g_ampa): + self.g_ampa = g_ampa + def get_eNa(self): + return self.e_na + def set_eNa(self, e_na): + self.e_na = e_na + def get_eCa(self): + return self.e_ca + def set_eCa(self, e_ca): + self.e_ca = e_ca + def get_eK(self): + return self.e_k + def set_eK(self, e_k): + self.e_k = e_k + def get_eL(self): + return self.e_l + def set_eL(self, e_l): + self.e_l = e_l + def get_qd0(self): + return self.qd0 + def set_qd0(self, qd0): + self.qd0 = qd0 + def get_pp(self): + return self.pp + def set_pp(self, pp): + self.pp = pp + def get_alphac(self): + return self.alphac + def set_alphac(self, alphac): + self.alphac = alphac + def get_betac(self): + return self.betac + def set_betac(self, betac): + self.betac = betac + def get_cm(self): + return self.cm + def set_cm(self, cm): + self.cm = cm def validate_Nml2Quantity_currentDensity(self, value): # Validate type Nml2Quantity_currentDensity, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21452,6 +25047,34 @@ def factory(*args_, **kwargs_): else: return FitzHughNagumo1969Cell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_a(self): + return self.a + def set_a(self, a): + self.a = a + def get_b(self): + return self.b + def set_b(self, b): + self.b = b + def get_I(self): + return self.I + def set_I(self, I): + self.I = I + def get_phi(self): + return self.phi + def set_phi(self, phi): + self.phi = phi + def get_V0(self): + return self.V0 + def set_V0(self, V0): + self.V0 = V0 + def get_W0(self): + return self.W0 + def set_W0(self, W0): + self.W0 = W0 def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21591,6 +25214,14 @@ def factory(*args_, **kwargs_): else: return FitzHughNagumoCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_I(self): + return self.I + def set_I(self, I): + self.I = I def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21693,6 +25324,16 @@ def factory(*args_, **kwargs_): else: return BaseCellMembPotCap(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_C(self): + return self.C + def set_C(self, C): + self.C = C + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_capacitance(self, value): # Validate type Nml2Quantity_capacitance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21819,6 +25460,34 @@ def factory(*args_, **kwargs_): else: return IzhikevichCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_v0(self): + return self.v0 + def set_v0(self, v0): + self.v0 = v0 + def get_thresh(self): + return self.thresh + def set_thresh(self, thresh): + self.thresh = thresh + def get_a(self): + return self.a + def set_a(self, a): + self.a = a + def get_b(self): + return self.b + def set_b(self, b): + self.b = b + def get_c(self): + return self.c + def set_c(self, c): + self.c = c + def get_d(self): + return self.d + def set_d(self, d): + self.d = d def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -21982,6 +25651,32 @@ def factory(*args_, **kwargs_): else: return IafCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_leakReversal(self): + return self.leak_reversal + def set_leakReversal(self, leak_reversal): + self.leak_reversal = leak_reversal + def get_thresh(self): + return self.thresh + def set_thresh(self, thresh): + self.thresh = thresh + def get_reset(self): + return self.reset + def set_reset(self, reset): + self.reset = reset + def get_C(self): + return self.C + def set_C(self, C): + self.C = C + def get_leakConductance(self): + return self.leak_conductance + def set_leakConductance(self, leak_conductance): + self.leak_conductance = leak_conductance + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -22157,6 +25852,28 @@ def factory(*args_, **kwargs_): else: return IafTauCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_leakReversal(self): + return self.leak_reversal + def set_leakReversal(self, leak_reversal): + self.leak_reversal = leak_reversal + def get_thresh(self): + return self.thresh + def set_thresh(self, thresh): + self.thresh = thresh + def get_reset(self): + return self.reset + def set_reset(self, reset): + self.reset = reset + def get_tau(self): + return self.tau + def set_tau(self, tau): + self.tau = tau + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -22317,6 +26034,30 @@ def factory(*args_, **kwargs_): else: return GradedSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_conductance(self): + return self.conductance + def set_conductance(self, conductance): + self.conductance = conductance + def get_delta(self): + return self.delta + def set_delta(self, delta): + self.delta = delta + def get_Vth(self): + return self.Vth + def set_Vth(self, Vth): + self.Vth = Vth + def get_k(self): + return self.k + def set_k(self, k): + self.k = k + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -22471,6 +26212,14 @@ def factory(*args_, **kwargs_): else: return LinearGradedSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_conductance(self): + return self.conductance + def set_conductance(self, conductance): + self.conductance = conductance def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -22569,6 +26318,10 @@ def factory(*args_, **kwargs_): else: return SilentSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SilentSynapse, self).hasContent_() @@ -22650,6 +26403,14 @@ def factory(*args_, **kwargs_): else: return GapJunction(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_conductance(self): + return self.conductance + def set_conductance(self, conductance): + self.conductance = conductance def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -22747,6 +26508,12 @@ def factory(*args_, **kwargs_): else: return BaseCurrentBasedSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseCurrentBasedSynapse, self).hasContent_() @@ -22837,6 +26604,12 @@ def factory(*args_, **kwargs_): else: return BaseVoltageDepSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseVoltageDepSynapse, self).hasContent_() @@ -22988,6 +26761,104 @@ def factory(*args_, **kwargs_): else: return IonChannel(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_gate(self): + return self.gates + def set_gate(self, gates): + self.gates = gates + def add_gate(self, value): + self.gates.append(value) + def insert_gate_at(self, index, value): + self.gates.insert(index, value) + def replace_gate_at(self, index, value): + self.gates[index] = value + def get_gateHHrates(self): + return self.gate_hh_rates + def set_gateHHrates(self, gate_hh_rates): + self.gate_hh_rates = gate_hh_rates + def add_gateHHrates(self, value): + self.gate_hh_rates.append(value) + def insert_gateHHrates_at(self, index, value): + self.gate_hh_rates.insert(index, value) + def replace_gateHHrates_at(self, index, value): + self.gate_hh_rates[index] = value + def get_gateHHratesTau(self): + return self.gate_h_hrates_taus + def set_gateHHratesTau(self, gate_h_hrates_taus): + self.gate_h_hrates_taus = gate_h_hrates_taus + def add_gateHHratesTau(self, value): + self.gate_h_hrates_taus.append(value) + def insert_gateHHratesTau_at(self, index, value): + self.gate_h_hrates_taus.insert(index, value) + def replace_gateHHratesTau_at(self, index, value): + self.gate_h_hrates_taus[index] = value + def get_gateHHtauInf(self): + return self.gate_hh_tau_infs + def set_gateHHtauInf(self, gate_hh_tau_infs): + self.gate_hh_tau_infs = gate_hh_tau_infs + def add_gateHHtauInf(self, value): + self.gate_hh_tau_infs.append(value) + def insert_gateHHtauInf_at(self, index, value): + self.gate_hh_tau_infs.insert(index, value) + def replace_gateHHtauInf_at(self, index, value): + self.gate_hh_tau_infs[index] = value + def get_gateHHratesInf(self): + return self.gate_h_hrates_infs + def set_gateHHratesInf(self, gate_h_hrates_infs): + self.gate_h_hrates_infs = gate_h_hrates_infs + def add_gateHHratesInf(self, value): + self.gate_h_hrates_infs.append(value) + def insert_gateHHratesInf_at(self, index, value): + self.gate_h_hrates_infs.insert(index, value) + def replace_gateHHratesInf_at(self, index, value): + self.gate_h_hrates_infs[index] = value + def get_gateHHratesTauInf(self): + return self.gate_h_hrates_tau_infs + def set_gateHHratesTauInf(self, gate_h_hrates_tau_infs): + self.gate_h_hrates_tau_infs = gate_h_hrates_tau_infs + def add_gateHHratesTauInf(self, value): + self.gate_h_hrates_tau_infs.append(value) + def insert_gateHHratesTauInf_at(self, index, value): + self.gate_h_hrates_tau_infs.insert(index, value) + def replace_gateHHratesTauInf_at(self, index, value): + self.gate_h_hrates_tau_infs[index] = value + def get_gateHHInstantaneous(self): + return self.gate_hh_instantaneouses + def set_gateHHInstantaneous(self, gate_hh_instantaneouses): + self.gate_hh_instantaneouses = gate_hh_instantaneouses + def add_gateHHInstantaneous(self, value): + self.gate_hh_instantaneouses.append(value) + def insert_gateHHInstantaneous_at(self, index, value): + self.gate_hh_instantaneouses.insert(index, value) + def replace_gateHHInstantaneous_at(self, index, value): + self.gate_hh_instantaneouses[index] = value + def get_gateFractional(self): + return self.gate_fractionals + def set_gateFractional(self, gate_fractionals): + self.gate_fractionals = gate_fractionals + def add_gateFractional(self, value): + self.gate_fractionals.append(value) + def insert_gateFractional_at(self, index, value): + self.gate_fractionals.insert(index, value) + def replace_gateFractional_at(self, index, value): + self.gate_fractionals[index] = value + def get_species(self): + return self.species + def set_species(self, species): + self.species = species + def get_type(self): + return self.type + def set_type(self, type): + self.type = type + def get_conductance(self): + return self.conductance + def set_conductance(self, conductance): + self.conductance = conductance + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -23211,6 +27082,10 @@ def factory(*args_, **kwargs_): else: return AlphaCurrSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(AlphaCurrSynapse, self).hasContent_() @@ -23288,6 +27163,10 @@ def factory(*args_, **kwargs_): else: return ExpCurrSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ExpCurrSynapse, self).hasContent_() @@ -23368,6 +27247,14 @@ def factory(*args_, **kwargs_): else: return AlphaCondSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_e_rev(self): + return self.e_rev + def set_e_rev(self, e_rev): + self.e_rev = e_rev def hasContent_(self): if ( super(AlphaCondSynapse, self).hasContent_() @@ -23456,6 +27343,14 @@ def factory(*args_, **kwargs_): else: return ExpCondSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_e_rev(self): + return self.e_rev + def set_e_rev(self, e_rev): + self.e_rev = e_rev def hasContent_(self): if ( super(ExpCondSynapse, self).hasContent_() @@ -23568,6 +27463,46 @@ def factory(*args_, **kwargs_): else: return HH_cond_exp(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_v_offset(self): + return self.v_offset + def set_v_offset(self, v_offset): + self.v_offset = v_offset + def get_e_rev_E(self): + return self.e_rev_E + def set_e_rev_E(self, e_rev_E): + self.e_rev_E = e_rev_E + def get_e_rev_I(self): + return self.e_rev_I + def set_e_rev_I(self, e_rev_I): + self.e_rev_I = e_rev_I + def get_e_rev_K(self): + return self.e_rev_K + def set_e_rev_K(self, e_rev_K): + self.e_rev_K = e_rev_K + def get_e_rev_Na(self): + return self.e_rev_Na + def set_e_rev_Na(self, e_rev_Na): + self.e_rev_Na = e_rev_Na + def get_e_rev_leak(self): + return self.e_rev_leak + def set_e_rev_leak(self, e_rev_leak): + self.e_rev_leak = e_rev_leak + def get_g_leak(self): + return self.g_leak + def set_g_leak(self, g_leak): + self.g_leak = g_leak + def get_gbar_K(self): + return self.gbar_K + def set_gbar_K(self, gbar_K): + self.gbar_K = gbar_K + def get_gbar_Na(self): + return self.gbar_Na + def set_gbar_Na(self, gbar_Na): + self.gbar_Na = gbar_Na def hasContent_(self): if ( super(HH_cond_exp, self).hasContent_() @@ -23733,6 +27668,32 @@ def factory(*args_, **kwargs_): else: return basePyNNIaFCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tau_m(self): + return self.tau_m + def set_tau_m(self, tau_m): + self.tau_m = tau_m + def get_tau_refrac(self): + return self.tau_refrac + def set_tau_refrac(self, tau_refrac): + self.tau_refrac = tau_refrac + def get_v_reset(self): + return self.v_reset + def set_v_reset(self, v_reset): + self.v_reset = v_reset + def get_v_rest(self): + return self.v_rest + def set_v_rest(self, v_rest): + self.v_rest = v_rest + def get_v_thresh(self): + return self.v_thresh + def set_v_thresh(self, v_thresh): + self.v_thresh = v_thresh + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNIaFCell, self).hasContent_() @@ -23870,6 +27831,20 @@ def factory(*args_, **kwargs_): else: return ContinuousConnection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_preComponent(self): + return self.pre_component + def set_preComponent(self, pre_component): + self.pre_component = pre_component + def get_postComponent(self): + return self.post_component + def set_postComponent(self, post_component): + self.post_component = post_component + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -24035,6 +28010,16 @@ def factory(*args_, **kwargs_): else: return ElectricalConnection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_synapse(self): + return self.synapse + def set_synapse(self, synapse): + self.synapse = synapse + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -24193,6 +28178,18 @@ def factory(*args_, **kwargs_): else: return ConnectionWD(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_weight(self): + return self.weight + def set_weight(self, weight): + self.weight = weight + def get_delay(self): + return self.delay + def set_delay(self, delay): + self.delay = delay def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -24354,6 +28351,10 @@ def factory(*args_, **kwargs_): else: return Connection(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Connection, self).hasContent_() @@ -24478,6 +28479,14 @@ def factory(*args_, **kwargs_): else: return Cell2CaPools(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_biophysicalProperties2CaPools(self): + return self.biophysical_properties2_ca_pools + def set_biophysicalProperties2CaPools(self, biophysical_properties2_ca_pools): + self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools def hasContent_(self): if ( self.biophysical_properties2_ca_pools is not None or @@ -24597,6 +28606,50 @@ def factory(*args_, **kwargs_): else: return AdExIaFCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_gL(self): + return self.g_l + def set_gL(self, g_l): + self.g_l = g_l + def get_EL(self): + return self.EL + def set_EL(self, EL): + self.EL = EL + def get_reset(self): + return self.reset + def set_reset(self, reset): + self.reset = reset + def get_VT(self): + return self.VT + def set_VT(self, VT): + self.VT = VT + def get_thresh(self): + return self.thresh + def set_thresh(self, thresh): + self.thresh = thresh + def get_delT(self): + return self.del_t + def set_delT(self, del_t): + self.del_t = del_t + def get_tauw(self): + return self.tauw + def set_tauw(self, tauw): + self.tauw = tauw + def get_refract(self): + return self.refract + def set_refract(self, refract): + self.refract = refract + def get_a(self): + return self.a + def set_a(self, a): + self.a = a + def get_b(self): + return self.b + def set_b(self, b): + self.b = b def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -24825,6 +28878,46 @@ def factory(*args_, **kwargs_): else: return Izhikevich2007Cell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_v0(self): + return self.v0 + def set_v0(self, v0): + self.v0 = v0 + def get_k(self): + return self.k + def set_k(self, k): + self.k = k + def get_vr(self): + return self.vr + def set_vr(self, vr): + self.vr = vr + def get_vt(self): + return self.vt + def set_vt(self, vt): + self.vt = vt + def get_vpeak(self): + return self.vpeak + def set_vpeak(self, vpeak): + self.vpeak = vpeak + def get_a(self): + return self.a + def set_a(self, a): + self.a = a + def get_b(self): + return self.b + def set_b(self, b): + self.b = b + def get_c(self): + return self.c + def set_c(self, c): + self.c = c + def get_d(self): + return self.d + def set_d(self, d): + self.d = d def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25032,6 +29125,14 @@ def factory(*args_, **kwargs_): else: return IafRefCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_refract(self): + return self.refract + def set_refract(self, refract): + self.refract = refract def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25131,6 +29232,14 @@ def factory(*args_, **kwargs_): else: return IafTauRefCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_refract(self): + return self.refract + def set_refract(self, refract): + self.refract = refract def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25239,6 +29348,26 @@ def factory(*args_, **kwargs_): else: return DoubleSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_synapse1(self): + return self.synapse1 + def set_synapse1(self, synapse1): + self.synapse1 = synapse1 + def get_synapse2(self): + return self.synapse2 + def set_synapse2(self, synapse2): + self.synapse2 = synapse2 + def get_synapse1Path(self): + return self.synapse1_path + def set_synapse1Path(self, synapse1_path): + self.synapse1_path = synapse1_path + def get_synapse2Path(self): + return self.synapse2_path + def set_synapse2Path(self, synapse2_path): + self.synapse2_path = synapse2_path def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25363,6 +29492,18 @@ def factory(*args_, **kwargs_): else: return AlphaCurrentSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tau(self): + return self.tau + def set_tau(self, tau): + self.tau = tau + def get_ibase(self): + return self.ibase + def set_ibase(self, ibase): + self.ibase = ibase def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25488,6 +29629,24 @@ def factory(*args_, **kwargs_): else: return BaseConductanceBasedSynapseTwo(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_gbase1(self): + return self.gbase1 + def set_gbase1(self, gbase1): + self.gbase1 = gbase1 + def get_gbase2(self): + return self.gbase2 + def set_gbase2(self, gbase2): + self.gbase2 = gbase2 + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25630,6 +29789,20 @@ def factory(*args_, **kwargs_): else: return BaseConductanceBasedSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_gbase(self): + return self.gbase + def set_gbase(self, gbase): + self.gbase = gbase + def get_erev(self): + return self.erev + def set_erev(self, erev): + self.erev = erev + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25763,6 +29936,14 @@ def factory(*args_, **kwargs_): else: return IonChannelVShift(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_vShift(self): + return self.v_shift + def set_vShift(self, v_shift): + self.v_shift = v_shift def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -25863,6 +30044,10 @@ def factory(*args_, **kwargs_): else: return IonChannelHH(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IonChannelHH, self).hasContent_() @@ -25940,6 +30125,10 @@ def factory(*args_, **kwargs_): else: return IF_curr_exp(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_curr_exp, self).hasContent_() @@ -26017,6 +30206,10 @@ def factory(*args_, **kwargs_): else: return IF_curr_alpha(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_curr_alpha, self).hasContent_() @@ -26101,6 +30294,20 @@ def factory(*args_, **kwargs_): else: return basePyNNIaFCondCell(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_e_rev_E(self): + return self.e_rev_E + def set_e_rev_E(self, e_rev_E): + self.e_rev_E = e_rev_E + def get_e_rev_I(self): + return self.e_rev_I + def set_e_rev_I(self, e_rev_I): + self.e_rev_I = e_rev_I + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNIaFCondCell, self).hasContent_() @@ -26208,6 +30415,12 @@ def factory(*args_, **kwargs_): else: return ContinuousConnectionInstance(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(ContinuousConnectionInstance, self).hasContent_() @@ -26313,6 +30526,12 @@ def factory(*args_, **kwargs_): else: return ElectricalConnectionInstance(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(ElectricalConnectionInstance, self).hasContent_() @@ -26423,6 +30642,22 @@ def factory(*args_, **kwargs_): else: return ExpThreeSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tauDecay1(self): + return self.tau_decay1 + def set_tauDecay1(self, tau_decay1): + self.tau_decay1 = tau_decay1 + def get_tauDecay2(self): + return self.tau_decay2 + def set_tauDecay2(self, tau_decay2): + self.tau_decay2 = tau_decay2 + def get_tauRise(self): + return self.tau_rise + def set_tauRise(self, tau_rise): + self.tau_rise = tau_rise def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -26542,6 +30777,20 @@ def factory(*args_, **kwargs_): else: return ExpTwoSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tauDecay(self): + return self.tau_decay + def set_tauDecay(self, tau_decay): + self.tau_decay = tau_decay + def get_tauRise(self): + return self.tau_rise + def set_tauRise(self, tau_rise): + self.tau_rise = tau_rise + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -26661,6 +30910,14 @@ def factory(*args_, **kwargs_): else: return ExpOneSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tauDecay(self): + return self.tau_decay + def set_tauDecay(self, tau_decay): + self.tau_decay = tau_decay def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -26760,6 +31017,14 @@ def factory(*args_, **kwargs_): else: return AlphaSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_tau(self): + return self.tau + def set_tau(self, tau): + self.tau = tau def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: @@ -26872,6 +31137,32 @@ def factory(*args_, **kwargs_): else: return EIF_cond_exp_isfa_ista(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_a(self): + return self.a + def set_a(self, a): + self.a = a + def get_b(self): + return self.b + def set_b(self, b): + self.b = b + def get_delta_T(self): + return self.delta_T + def set_delta_T(self, delta_T): + self.delta_T = delta_T + def get_tau_w(self): + return self.tau_w + def set_tau_w(self, tau_w): + self.tau_w = tau_w + def get_v_spike(self): + return self.v_spike + def set_v_spike(self, v_spike): + self.v_spike = v_spike + def get_extensiontype_(self): return self.extensiontype_ + def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(EIF_cond_exp_isfa_ista, self).hasContent_() @@ -27001,6 +31292,10 @@ def factory(*args_, **kwargs_): else: return IF_cond_exp(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_cond_exp, self).hasContent_() @@ -27078,6 +31373,10 @@ def factory(*args_, **kwargs_): else: return IF_cond_alpha(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_cond_alpha, self).hasContent_() @@ -27160,6 +31459,14 @@ def factory(*args_, **kwargs_): else: return ContinuousConnectionInstanceW(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_weight(self): + return self.weight + def set_weight(self, weight): + self.weight = weight def hasContent_(self): if ( super(ContinuousConnectionInstanceW, self).hasContent_() @@ -27261,6 +31568,14 @@ def factory(*args_, **kwargs_): else: return ElectricalConnectionInstanceW(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_weight(self): + return self.weight + def set_weight(self, weight): + self.weight = weight def hasContent_(self): if ( super(ElectricalConnectionInstanceW, self).hasContent_() @@ -27361,6 +31676,18 @@ def factory(*args_, **kwargs_): else: return BlockingPlasticSynapse(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix + def get_plasticityMechanism(self): + return self.plasticity_mechanism + def set_plasticityMechanism(self, plasticity_mechanism): + self.plasticity_mechanism = plasticity_mechanism + def get_blockMechanism(self): + return self.block_mechanism + def set_blockMechanism(self, block_mechanism): + self.block_mechanism = block_mechanism def hasContent_(self): if ( self.plasticity_mechanism is not None or @@ -27459,6 +31786,10 @@ def factory(*args_, **kwargs_): else: return EIF_cond_alpha_isfa_ista(*args_, **kwargs_) factory = staticmethod(factory) + def get_ns_prefix_(self): + return self.ns_prefix_ + def set_ns_prefix_(self, ns_prefix): + self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(EIF_cond_alpha_isfa_ista, self).hasContent_() From 88eb71c539fe9a4eb900a98fe0b33b050f74912f Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 15:38:12 +0000 Subject: [PATCH 25/27] fix(nml.py): fix formatting functions Also filed upstream to see if this is an issue with generateDS.py: https://sourceforge.net/p/generateds/tickets/13/ --- neuroml/nml/nml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index f2a03524..1c2012d9 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -201,7 +201,7 @@ def gds_format_base64(self, input_data, input_name=''): def gds_validate_base64(self, input_data, node=None, input_name=''): return input_data def gds_format_integer(self, input_data, input_name=''): - return '%d' % input_data + return '%d' % int(input_data) def gds_parse_integer(self, input_data, node=None, input_name=''): try: ival = int(input_data) @@ -228,7 +228,7 @@ def gds_validate_integer_list( raise_parse_error(node, 'Requires sequence of integer values') return values def gds_format_float(self, input_data, input_name=''): - return ('%.15f' % input_data).rstrip('0') + return ('%.15f' % float(input_data)).rstrip('0') def gds_parse_float(self, input_data, node=None, input_name=''): try: fval_ = float(input_data) From 5590d3799d9ad73329e60ff31b01b5fcb0b3f45b Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 16:29:00 +0000 Subject: [PATCH 26/27] fix(nml.py): revert to generation using py2.7 and generateDS.py 2.30.11 This commit undoes the changes made to the generateds_config.py file and regenerates nml.py with the version of Py and generateDS.py that we know to work. All tests and examples run correctly now. --- neuroml/nml/README.md | 17 +- neuroml/nml/changed_names.csv | 416 +- neuroml/nml/generateds_config.py | 87 +- neuroml/nml/name_table.csv | 666 +- neuroml/nml/nml.py | 16080 +++++++---------------------- 5 files changed, 4209 insertions(+), 13057 deletions(-) diff --git a/neuroml/nml/README.md b/neuroml/nml/README.md index 6c550771..9a295246 100644 --- a/neuroml/nml/README.md +++ b/neuroml/nml/README.md @@ -33,11 +33,20 @@ If these are not included in the output, generateds_config.py has not run, and t Author: @sanjayankur31 -Generated using Python 3.9 for NeuroMLv2.1.xsd using generateDS.py 2.35.5 +Resort to using Python 2.7 and generateDS.py 2.30.11 for the time being. + +- all tests and examples pass + +#### March 26, 2020 + +Author: @sanjayankur31 + +Generation attempt using Python 3.9 for NeuroMLv2.1.xsd using generateDS.py 2.38.3: + +- generation requires updating of the generateds_config.py file +- generated nml.py seems to contain issues: https://sourceforge.net/p/generateds/tickets/13/ +- after tweaking nml.py, json serialization example still fails. - # Generated Fri Mar 26 09:44:40 2021 by generateDS.py version 2.35.5. - # Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] - # ~/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --silence --user-methods="helper_methods.py" NeuroML_v2.1.xsd #### February 2020 diff --git a/neuroml/nml/changed_names.csv b/neuroml/nml/changed_names.csv index 7fc8e785..57ff6704 100644 --- a/neuroml/nml/changed_names.csv +++ b/neuroml/nml/changed_names.csv @@ -1,233 +1,233 @@ -http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd -property,properties -unbounded,unboundeds -neuroLexId,neuro_lex_id -fractionAlong,fraction_along -segmentId,segment_id -population,populations -inputW,input_ws -postComponent,post_component -preComponent,pre_component -continuousConnectionInstanceW,continuous_connection_instance_ws -continuousConnectionInstance,continuous_connection_instances -continuousConnection,continuous_connections -electricalConnectionInstanceW,electrical_connection_instance_ws -electricalConnectionInstance,electrical_connection_instances -electricalConnection,electrical_connections -postFractionAlong,post_fraction_along -postSegment,post_segment -postCell,post_cell -preFractionAlong,pre_fraction_along -preSegment,pre_segment -preCell,pre_cell -postSegmentId,post_segment_id -postCellId,post_cell_id -preSegmentId,pre_segment_id -preCellId,pre_cell_id -connectionWD,connection_wds -connection,connections -postsynapticPopulation,postsynaptic_population -presynapticPopulation,presynaptic_population skip,skips -xs:nonNegativeInteger,xs:non_negative_integer -zSize,z_size -ySize,y_size -xSize,x_size -region,regions -space,spaces -populationTypes,population_types -populationList,population_list -extracellularProperties,extracellular_properties -instance,instances -allowedSpaces,allowed_spaces -zStart,z_start -yStart,y_start -xStart,x_start -zSpacing,z_spacing -ySpacing,y_spacing +gateHHtauInf,gate_hh_tau_infs +sineGenerator,sine_generators +sineGeneratorDL,sine_generator_dls +cell2CaPools,cell2_ca_poolses xSpacing,x_spacing -basedOn,based_on -networkTypes,network_types -networkWithTemperature,network_with_temperature -network,networks -inputList,input_lists -explicitInput,explicit_inputs -continuousProjection,continuous_projections -electricalProjection,electrical_projections -projection,projections -synapticConnection,synaptic_connections -cellSet,cell_sets -spikeTarget,spike_target -averageRate,average_rate -minimumISI,minimum_isi -minISI,min_isi -maxISI,max_isi -spike,spikes -simpleSeriesResistance,simple_series_resistance -returnVoltage,return_voltage -testingVoltage,testing_voltage -conditioningVoltage,conditioning_voltage +plasticityMechanism,plasticity_mechanism +alphaCondSynapse,alpha_cond_synapses +channelDensityNonUniform,channel_density_non_uniforms +zStart,z_start +membraneProperties,membrane_properties +inhomogeneousParameter,inhomogeneous_parameters +delT,del_t targetVoltage,target_voltage -rampGeneratorDL,ramp_generator_dls -sineGeneratorDL,sine_generator_dls -pulseGeneratorDL,pulse_generator_dls -rampGenerator,ramp_generators -sineGenerator,sine_generators -pulseGenerator,pulse_generators -baselineAmplitude,baseline_amplitude +xs:anyURI,xs:any_uri +gLd,g_ld +biophysicalProperties,biophysical_properties +presynapticPopulation,presynaptic_population finishAmplitude,finish_amplitude -startAmplitude,start_amplitude -resistivity,resistivities -decayingPoolConcentrationModel,decaying_pool_concentration_models -initialExtConcentration,initial_ext_concentration -initialConcentration,initial_concentration -concentrationModel,concentration_model -inhomogeneousParameter,inhomogeneous_parameters +gLs,g_ls segmentGroup,segment_groups -inhomogeneousValue,inhomogeneous_value -segment,segments -condDensity,cond_density -ionChannel,ion_channel -variableParameter,variable_parameters -vShift,v_shift +alphaCurrentSynapse,alpha_current_synapses +poissonFiringSynapse,poisson_firing_synapses +cell,cells +path,paths +alphaCurrSynapse,alpha_curr_synapses +postsynapticPopulation,postsynaptic_population +gKdr,g_kdr +preFractionAlong,pre_fraction_along +projection,projections +forwardTransition,forward_transition +averageRate,average_rate +cellSet,cell_sets channelDensityNernstCa2,channel_density_nernst_ca2s -initMembPotential,init_memb_potentials +postSegmentId,post_segment_id +spike,spikes +fitzHughNagumoCell,fitz_hugh_nagumo_cells +channelPopulation,channel_populations +continuousProjection,continuous_projections +include,includes specificCapacitance,specific_capacitances -spikeThresh,spike_threshes -channelDensityNonUniformGHK,channel_density_non_uniform_ghks -channelDensityNonUniformNernst,channel_density_non_uniform_nernsts -channelDensityNonUniform,channel_density_non_uniforms -channelDensityGHK2,channel_density_ghk2s +allowedSpaces,allowed_spaces +xSize,x_size +explicitInput,explicit_inputs +xs:nonNegativeInteger,xs:non_negative_integer +concentrationModel,concentration_model +ionChannelHH,ion_channel_hhs channelDensityGHK,channel_density_ghks -channelDensityNernst,channel_density_nernsts -channelDensityVShift,channel_density_v_shifts -channelDensity,channel_densities -channelPopulation,channel_populations intracellularProperties2CaPools,intracellular_properties2_ca_pools -membraneProperties2CaPools,membrane_properties2_ca_pools -intracellularProperties,intracellular_properties -membraneProperties,membrane_properties -normalizationEnd,normalization_end -translationStart,translation_start -subTree,sub_trees -path,paths -include,includes -member,members -biophysicalProperties2CaPools,biophysical_properties2_ca_pools -biophysicalProperties,biophysical_properties +linearGradedSynapse,linear_graded_synapses +iafCell,iaf_cells +silentSynapse,silent_synapses +spikeGeneratorRandom,spike_generator_randoms +gate,gates +steadyState,steady_state +channelDensity,channel_densities +expCondSynapse,exp_cond_synapses +continuousConnectionInstanceW,continuous_connection_instance_ws +expTwoSynapse,exp_two_synapses +gateKS,gate_kses +izhikevich2007Cell,izhikevich2007_cells +decayConstant,decay_constant +expOneSynapse,exp_one_synapses +baseCell,base_cells +tauDecay,tau_decay +iDend,i_dend +tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism +reverseRate,reverse_rate +channelDensityNernst,channel_density_nernsts +reverseTransition,reverse_transition +preComponent,pre_component +minISI,min_isi +gCa,g_ca +eNa,e_na +transientPoissonFiringSynapse,transient_poisson_firing_synapses +preCell,pre_cell +blockConcentration,block_concentration +inputList,input_lists +tauRec,tau_rec +networkTypes,network_types +inhomogeneousValue,inhomogeneous_value eL,e_l +network,networks eK,e_k -eCa,e_ca -eNa,e_na -gAmpa,g_ampa -gNmda,g_nmda +space,spaces +forwardRate,forward_rate gKC,g_kc -gKahp,g_kahp -gCa,g_ca -gKdr,g_kdr -gNa,g_na -gLd,g_ld -gLs,g_ls -iDend,i_dend -iSoma,i_soma -delT,del_t +rampGeneratorDL,ramp_generator_dls +neuroLexId,neuro_lex_id +returnVoltage,return_voltage +intracellularProperties,intracellular_properties +q10Settings,q10_settings +initialConcentration,initial_concentration +decayingPoolConcentrationModel,decaying_pool_concentration_models +voltageClampTriple,voltage_clamp_triples +alphaSynapse,alpha_synapses +preCellId,pre_cell_id +pulseGeneratorDL,pulse_generator_dls +gateHHrates,gate_hh_rates +population,populations +eCa,e_ca +shellThickness,shell_thickness +expCurrSynapse,exp_curr_synapses +resistivity,resistivities +ySpacing,y_spacing +ySize,y_size +gateFractional,gate_fractionals +blockMechanism,block_mechanism +instance,instances +connectionWD,connection_wds +gradedSynapse,graded_synapses +gapJunction,gap_junctions +baselineAmplitude,baseline_amplitude +segment,segments +postFractionAlong,post_fraction_along +ionChannelVShift,ion_channel_v_shifts +spikeGeneratorRefPoisson,spike_generator_ref_poissons +channelTypes,channel_types +xStart,x_start +voltageClamp,voltage_clamps +testingVoltage,testing_voltage +adExIaFCell,ad_ex_ia_f_cells +ionChannelKS,ion_channel_kses +preSegmentId,pre_segment_id +spikeThresh,spike_threshes +spikeGeneratorPoisson,spike_generator_poissons +vShift,v_shift +ionChannelPassive,ion_channel_passive +subGate,sub_gates gL,g_l -leakConductance,leak_conductance -leakReversal,leak_reversal +tauRise,tau_rise +izhikevichCell,izhikevich_cells +postCellId,post_cell_id +condDensity,cond_density +gateHHratesTauInf,gate_h_hrates_tau_infs +fixedFactorConcentrationModel,fixed_factor_concentration_models +fixedQ10,fixed_q10 +region,regions +extracellularProperties,extracellular_properties +connection,connections +http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd +electricalConnectionInstance,electrical_connection_instances +translationStart,translation_start +closedState,closed_states +gNa,g_na +gKahp,g_kahp +electricalConnectionInstanceW,electrical_connection_instance_ws +spikeTarget,spike_target +yStart,y_start tauFac,tau_fac -tauRec,tau_rec -initReleaseProb,init_release_prob -tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism -tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism -scalingVolt,scaling_volt -scalingConc,scaling_conc -blockConcentration,block_concentration -voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism -blockMechanism,block_mechanism -plasticityMechanism,plasticity_mechanism +q10Factor,q10_factor +populationList,population_list +zSpacing,z_spacing synapse2Path,synapse2_path -synapse1Path,synapse1_path -tauRise,tau_rise -tauDecay2,tau_decay2 -tauDecay1,tau_decay1 -tauDecay,tau_decay -decayConstant,decay_constant -restingConc,resting_conc -shellThickness,shell_thickness experimentalTemp,experimental_temp -q10Factor,q10_factor -fixedQ10,fixed_q10 -fractionalConductance,fractional_conductance -timeCourse,time_course -steadyState,steady_state -q10Settings,q10_settings -subGate,sub_gates -reverseRate,reverse_rate -forwardRate,forward_rate -gateTypes,gate_types -tauInfTransition,tau_inf_transition -reverseTransition,reverse_transition -forwardTransition,forward_transition openState,open_states -closedState,closed_states -gateFractional,gate_fractionals -gateKS,gate_kses +property,properties +zSize,z_size +compoundInput,compound_inputs +ionChannel,ion_channel +iafTauRefCell,iaf_tau_ref_cells +scalingConc,scaling_conc +pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +tauInfTransition,tau_inf_transition +member,members gateHHInstantaneous,gate_hh_instantaneouses -gateHHratesTauInf,gate_h_hrates_tau_infs -gateHHratesInf,gate_h_hrates_infs -gateHHtauInf,gate_hh_tau_infs -gateHHratesTau,gate_h_hrates_taus -gateHHrates,gate_hh_rates -channelTypes,channel_types -ionChannelHH,ion_channel_hhs -ionChannelPassive,ion_channel_passive -gate,gates +populationTypes,population_types +conditioningVoltage,conditioning_voltage +variableParameter,variable_parameters +iSoma,i_soma +channelDensityVShift,channel_density_v_shifts +biophysicalProperties2CaPools,biophysical_properties2_ca_pools +fractionalConductance,fractional_conductance +tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism +fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells +segmentId,segment_id q10ConductanceScaling,q10_conductance_scalings -fixedFactorConcentrationModel,fixed_factor_concentration_models -transientPoissonFiringSynapse,transient_poisson_firing_synapses -poissonFiringSynapse,poisson_firing_synapses -spikeGeneratorRefPoisson,spike_generator_ref_poissons -spikeGeneratorPoisson,spike_generator_poissons -spikeGeneratorRandom,spike_generator_randoms +rampGenerator,ramp_generators +voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism +postComponent,post_component +initReleaseProb,init_release_prob +maxISI,max_isi +doubleSynapse,double_synapses +timeCourse,time_course spikeGenerator,spike_generators timedSynapticInput,timed_synaptic_inputs -spikeArray,spike_arrays -voltageClampTriple,voltage_clamp_triples -voltageClamp,voltage_clamps -compoundInputDL,compound_input_dls -compoundInput,compound_inputs -alphaCurrSynapse,alpha_curr_synapses -expCurrSynapse,exp_curr_synapses -alphaCondSynapse,alpha_cond_synapses -expCondSynapse,exp_cond_synapses -gradedSynapse,graded_synapses -linearGradedSynapse,linear_graded_synapses -silentSynapse,silent_synapses -gapJunction,gap_junctions -doubleSynapse,double_synapses -blockingPlasticSynapse,blocking_plastic_synapses +gateHHratesTau,gate_h_hrates_taus +continuousConnection,continuous_connections +networkWithTemperature,network_with_temperature +fractionAlong,fraction_along +normalizationEnd,normalization_end +synapse1Path,synapse1_path +electricalProjection,electrical_projections +gateHHratesInf,gate_h_hrates_infs +simpleSeriesResistance,simple_series_resistance +channelDensityGHK2,channel_density_ghk2s +preSegment,pre_segment +gNmda,g_nmda +scalingVolt,scaling_volt +initialExtConcentration,initial_ext_concentration expThreeSynapse,exp_three_synapses -expTwoSynapse,exp_two_synapses -expOneSynapse,exp_one_synapses -alphaSynapse,alpha_synapses -alphaCurrentSynapse,alpha_current_synapses -pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells -fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells -fitzHughNagumoCell,fitz_hugh_nagumo_cells -adExIaFCell,ad_ex_ia_f_cells -izhikevich2007Cell,izhikevich2007_cells -izhikevichCell,izhikevich_cells -iafRefCell,iaf_ref_cells -iafCell,iaf_cells -iafTauRefCell,iaf_tau_ref_cells -iafTauCell,iaf_tau_cells -baseCell,base_cells -cell2CaPools,cell2_ca_poolses -cell,cells -xs:anyURI,xs:any_uri -ionChannelKS,ion_channel_kses -ionChannelVShift,ion_channel_v_shifts -defaultValue,default_value +startAmplitude,start_amplitude +unbounded,unboundeds +compoundInputDL,compound_input_dls xs:positiveInteger,xs:positive_integer +membraneProperties2CaPools,membrane_properties2_ca_pools +defaultValue,default_value +inputW,input_ws +continuousConnectionInstance,continuous_connection_instances +tauDecay1,tau_decay1 +leakConductance,leak_conductance +tauDecay2,tau_decay2 +subTree,sub_trees javax.xml.bind.DatatypeConverter.parseInt,javax.xml.bind._datatype_converter.parse_int +iafTauCell,iaf_tau_cells +pulseGenerator,pulse_generators +iafRefCell,iaf_ref_cells +postSegment,post_segment javax.xml.bind.DatatypeConverter.printInt,javax.xml.bind._datatype_converter.print_int +gAmpa,g_ampa +electricalConnection,electrical_connections +synapticConnection,synaptic_connections +gateTypes,gate_types +channelDensityNonUniformNernst,channel_density_non_uniform_nernsts +restingConc,resting_conc +basedOn,based_on +leakReversal,leak_reversal +channelDensityNonUniformGHK,channel_density_non_uniform_ghks +initMembPotential,init_memb_potentials +postCell,post_cell +spikeArray,spike_arrays +blockingPlasticSynapse,blocking_plastic_synapses +minimumISI,minimum_isi diff --git a/neuroml/nml/generateds_config.py b/neuroml/nml/generateds_config.py index 1abc73c1..83fc889d 100644 --- a/neuroml/nml/generateds_config.py +++ b/neuroml/nml/generateds_config.py @@ -2,28 +2,22 @@ #The class names are essentially correct, the instance names need converting #also attributes need fixing +import lxml from lxml import objectify import re from config import variables import csv import sys -import io -import process_includes -import keyword - sys.setrecursionlimit(10000) - def remove_curlies(string): return re.sub("{.*}","",string) - def to_lowercase_with_underscores(string): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', string) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() - def to_camelback(string): string_list = list(string) i = 0 @@ -36,7 +30,6 @@ def to_camelback(string): return str(string) - def traverse_doc(queue,rename): """Recursive function to traverse the nodes of a tree in breadth-first order. @@ -54,22 +47,20 @@ def traverse_doc(queue,rename): else: return None - -def pluralize(noun): - if re.search('[sxz]$', noun): - return re.sub('$', 'es', noun) +def pluralize(noun): + if re.search('[sxz]$', noun): + return re.sub('$', 'es', noun) elif re.search('[^aeioudgkprt]h$', noun): - return re.sub('$', 'es', noun) - elif re.search('[^aeiou]y$', noun): - return re.sub('y$', 'ies', noun) - else: + return re.sub('$', 'es', noun) + elif re.search('[^aeiou]y$', noun): + return re.sub('y$', 'ies', noun) + else: return noun + 's' - def _node_to_python(node): pluralize_flag = 'maxOccurs' in node.attrib - + for attribute in node.attrib: nml_attribute = node.attrib.pop(attribute) if nml_attribute[0].islower(): @@ -78,18 +69,16 @@ def _node_to_python(node): renamed_attribute = pluralize(renamed_attribute) NameTable[nml_attribute] = renamed_attribute - -# Print out that this is running -# Otherwise generateds silently proceeds, and our nml.py file is all wrong -print("generateds_config.py is being processed") - filename = variables['schema_name'] +import StringIO +import process_includes -outfile = io.StringIO() +outfile = StringIO.StringIO() infile = open(filename, 'r') -process_includes.process_include_files(infile, outfile, inpath=filename) +process_includes.process_include_files(infile, outfile, + inpath=filename) infile.close() outfile.seek(0) doc = objectify.parse(outfile) @@ -100,25 +89,28 @@ def _node_to_python(node): traverse_doc(queue,_node_to_python) -# filtering routine, need to get a better way to extract these, asked on Stack Overflow +#filtering routine, need to get a better way to extract these, asked on Stack Overflow +import keyword disallowed_keywords = keyword.kwlist -for kw in disallowed_keywords: +for keyword in disallowed_keywords: try: - NameTable.pop(kw) - except Exception: + NameTable.pop(keyword) + except: pass -# overriding change to "morphologies" because it only applies outside of a cell -# - not a very elegant solution -NameTable['morphology'] = 'morphology' +NameTable['morphology'] = 'morphology' #overriding change to +#"morphologies" because it only applies outside of a cell - not a very +#elegant solution NameTable['gateHHtauInf'] = 'gate_hh_tau_infs' NameTable['ionChannelHH'] = 'ion_channel_hh' -NameTable['gateHHrates'] = 'gate_hh_rates' +NameTable['gateHHrates'] = 'gate_hh_rates' NameTable['gateHHtauInf'] = 'gate_hh_tau_infs' NameTable['ionChannel'] = 'ion_channel' NameTable['ionChannelHH'] = 'ion_channel_hhs' + + NameTable['basePyNNCell'] = 'basePyNNCell' NameTable['basePyNNIaFCell'] = 'basePyNNIaFCell' NameTable['basePyNNIaFCondCell'] = 'basePyNNIaFCondCell' @@ -144,18 +136,17 @@ def _node_to_python(node): NameTable['intracellularProperties'] = 'intracellular_properties' NameTable['biophysicalProperties'] = 'biophysical_properties' -nametable_fn = "name_table.csv" -print("Saving NameTable to csv file: {}".format(nametable_fn)) -with open(nametable_fn, 'w', newline='') as nametable_fh: - writer = csv.writer(nametable_fh) - for key, value in list(NameTable.items()): - writer.writerow([key, value]) - -changes_fn = "changed_names.csv" -print("Saving name changes table to csv file: {}".format(changes_fn)) -with open(changes_fn, 'w', newline='') as changes_fh: - changes_writer = csv.writer(changes_fh) - for key in NameTable: - value = NameTable[key] - if key != value: - changes_writer.writerow([key,value]) +print("NameTable is as follows:") +print(NameTable) + +print("Saving NameTable to csv file") +writer = csv.writer(open('name_table.csv', 'wb')) +for key, value in NameTable.items(): + writer.writerow([key, value]) + +print ("Saving name changes table to csv file") +changes_writer = csv.writer(open('changed_names.csv','wb')) +for key in NameTable: + value = NameTable[key] + if key != value: + changes_writer.writerow([key,value]) diff --git a/neuroml/nml/name_table.csv b/neuroml/nml/name_table.csv index 8d01a147..d7bf4692 100644 --- a/neuroml/nml/name_table.csv +++ b/neuroml/nml/name_table.csv @@ -1,365 +1,365 @@ -http://www.neuroml.org/schema/neuroml2,http://www.neuroml.org/schema/neuroml2 -http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd -qualified,qualified -unqualified,unqualified -metaid,metaid -optional,optional -annotation,annotation -property,properties -unbounded,unboundeds +all,all +skip,skips +gateHHtauInf,gate_hh_tau_infs +gc,gc +morphology,morphology +gbase2,gbase2 +gbase1,gbase1 +sineGenerator,sine_generators +sineGeneratorDL,sine_generator_dls +cell2CaPools,cell2_ca_poolses +to,to +xSpacing,x_spacing +neuroml,neuroml +plasticityMechanism,plasticity_mechanism +unstructured,unstructured +alphaCondSynapse,alpha_cond_synapses +channelDensityNonUniform,channel_density_non_uniforms +synapse2,synapse2 +synapse1,synapse1 +condition,condition notes,notes -id,id -required,required -neuroLexId,neuro_lex_id +zStart,z_start +membraneProperties,membrane_properties +inhomogeneousParameter,inhomogeneous_parameters +delT,del_t +targetVoltage,target_voltage +xs:anyURI,xs:any_uri +gLd,g_ld rate,rate -duration,duration -start,start -e_rev,e_rev -xs:float,xs:float -tau_syn,tau_syn -basePyNNCell,basePyNNCell -gbar_Na,gbar_Na -gbar_K,gbar_K -g_leak,g_leak -e_rev_leak,e_rev_leak -e_rev_Na,e_rev_Na -e_rev_K,e_rev_K -e_rev_I,e_rev_I -e_rev_E,e_rev_E -v_offset,v_offset -basePyNNIaFCondCell,basePyNNIaFCondCell -v_spike,v_spike -tau_w,tau_w -delta_T,delta_T -b,b -a,a -basePyNNIaFCell,basePyNNIaFCell -v_thresh,v_thresh -v_rest,v_rest +biophysicalProperties,biophysical_properties +presynapticPopulation,presynaptic_population +finishAmplitude,finish_amplitude +gLs,g_ls +segmentGroup,segment_groups +alphaCurrentSynapse,alpha_current_synapses +poissonFiringSynapse,poisson_firing_synapses +cell,cells +gbase,gbase v_reset,v_reset -tau_refrac,tau_refrac -tau_m,tau_m -v_init,v_init -tau_syn_I,tau_syn_I -tau_syn_E,tau_syn_E -i_offset,i_offset -cm,cm -weight,weight -fractionAlong,fraction_along -segmentId,segment_id -destination,destination -target,target -xs:string,xs:string component,component -population,populations -inputW,input_ws -input,input -postComponent,post_component -preComponent,pre_component -continuousConnectionInstanceW,continuous_connection_instance_ws -continuousConnectionInstance,continuous_connection_instances -continuousConnection,continuous_connections -synapse,synapse -electricalConnectionInstanceW,electrical_connection_instance_ws -electricalConnectionInstance,electrical_connection_instances -electricalConnection,electrical_connections -delay,delay -postFractionAlong,post_fraction_along -postSegment,post_segment -postCell,post_cell -preFractionAlong,pre_fraction_along -preSegment,pre_segment -preCell,pre_cell -postSegmentId,post_segment_id -postCellId,post_cell_id -preSegmentId,pre_segment_id -preCellId,pre_cell_id -connectionWD,connection_wds -connection,connections +active,active +path,paths +alphaCurrSynapse,alpha_curr_synapses postsynapticPopulation,postsynaptic_population -presynapticPopulation,presynaptic_population -to,to +gKdr,g_kdr +diameter,diameter +preFractionAlong,pre_fraction_along +projection,projections +href,href +qd0,qd0 select,select -skip,skips -z,z -y,y -x,x -k,k -xs:nonNegativeInteger,xs:non_negative_integer -j,j -i,i -location,location -zSize,z_size -ySize,y_size -xSize,x_size -region,regions -number,number -space,spaces -unstructured,unstructured -grid,grid -random,random -populationTypes,population_types -populationList,population_list -extracellularProperties,extracellular_properties +forwardTransition,forward_transition +averageRate,average_rate +cellSet,cell_sets +channelDensityNernstCa2,channel_density_nernst_ca2s +postSegmentId,post_segment_id +spike,spikes type,type -size,size -instance,instances -layout,layout +fitzHughNagumoCell,fitz_hugh_nagumo_cells +channelPopulation,channel_populations +continuousProjection,continuous_projections +include,includes +i_offset,i_offset +specificCapacitance,specific_capacitances allowedSpaces,allowed_spaces -zStart,z_start -yStart,y_start -xStart,x_start -zSpacing,z_spacing -ySpacing,y_spacing -xSpacing,x_spacing -basedOn,based_on -structure,structure -networkTypes,network_types -networkWithTemperature,network_with_temperature -network,networks -temperature,temperature -inputList,input_lists +delta_T,delta_T +tauw,tauw +xSize,x_size explicitInput,explicit_inputs -continuousProjection,continuous_projections -electricalProjection,electrical_projections -projection,projections -synapticConnection,synaptic_connections -cellSet,cell_sets -spikeTarget,spike_target -averageRate,average_rate -minimumISI,minimum_isi +tau,tau +xs:nonNegativeInteger,xs:non_negative_integer +concentrationModel,concentration_model +ionChannelHH,ion_channel_hhs +channelDensityGHK,channel_density_ghks +intracellularProperties2CaPools,intracellular_properties2_ca_pools +tag,tag +v_rest,v_rest +v_spike,v_spike +linearGradedSynapse,linear_graded_synapses +iafCell,iaf_cells +species,species +silentSynapse,silent_synapses +spikeGeneratorRandom,spike_generator_randoms +gate,gates +steadyState,steady_state +parameter,parameter +y,y +e_rev_leak,e_rev_leak +channelDensity,channel_densities +expCondSynapse,exp_cond_synapses +continuousConnectionInstanceW,continuous_connection_instance_ws +expTwoSynapse,exp_two_synapses +annotation,annotation +a,a +gateKS,gate_kses +gbar_Na,gbar_Na +izhikevich2007Cell,izhikevich2007_cells +IF_curr_alpha,IF_curr_alpha +decayConstant,decay_constant +expOneSynapse,exp_one_synapses +baseCell,base_cells +tauDecay,tau_decay +iDend,i_dend +phi,phi +tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism +delay,delay +reverseRate,reverse_rate +channelDensityNernst,channel_density_nernsts +reverseTransition,reverse_transition +preComponent,pre_component +basePyNNIaFCondCell,basePyNNIaFCondCell minISI,min_isi -maxISI,max_isi -period,period -spike,spikes -time,time -simpleSeriesResistance,simple_series_resistance -returnVoltage,return_voltage -testingVoltage,testing_voltage -conditioningVoltage,conditioning_voltage -active,active -targetVoltage,target_voltage +gCa,g_ca +eNa,e_na +transientPoissonFiringSynapse,transient_poisson_firing_synapses +qualified,qualified +name,name +preCell,pre_cell +blockConcentration,block_concentration +inputList,input_lists +tauRec,tau_rec +weight,weight +networkTypes,network_types +inhomogeneousValue,inhomogeneous_value +conductance,conductance +description,description +eL,e_l +network,networks +eK,e_k +space,spaces +forwardRate,forward_rate +midpoint,midpoint +tau_syn_E,tau_syn_E +tau_syn_I,tau_syn_I +gKC,g_kc rampGeneratorDL,ramp_generator_dls -sineGeneratorDL,sine_generator_dls +vpeak,vpeak +alphac,alphac +neuroLexId,neuro_lex_id +returnVoltage,return_voltage +intracellularProperties,intracellular_properties +q10Settings,q10_settings +distal,distal +number,number +initialConcentration,initial_concentration +instances,instances +xs:string,xs:string +size,size +temperature,temperature +decayingPoolConcentrationModel,decaying_pool_concentration_models +voltageClampTriple,voltage_clamp_triples +alphaSynapse,alpha_synapses +preCellId,pre_cell_id pulseGeneratorDL,pulse_generator_dls -rampGenerator,ramp_generators -sineGenerator,sine_generators -pulseGenerator,pulse_generators -baselineAmplitude,baseline_amplitude -finishAmplitude,finish_amplitude -startAmplitude,start_amplitude +thresh,thresh +gateHHrates,gate_hh_rates +population,populations +b,b +target,target +eCa,e_ca +shellThickness,shell_thickness +expCurrSynapse,exp_curr_synapses amplitude,amplitude -phase,phase -source,source -species,species resistivity,resistivities -decayingPoolConcentrationModel,decaying_pool_concentration_models -initialExtConcentration,initial_ext_concentration -initialConcentration,initial_concentration -ion,ion -concentrationModel,concentration_model -value,value -inhomogeneousParameter,inhomogeneous_parameters -segmentGroup,segment_groups -parameter,parameter -inhomogeneousValue,inhomogeneous_value +ySpacing,y_spacing +ySize,y_size +gateFractional,gate_fractionals +blockMechanism,block_mechanism +instance,instances +connectionWD,connection_wds +gradedSynapse,graded_synapses +gapJunction,gap_junctions +baselineAmplitude,baseline_amplitude +rho,rho +phase,phase segment,segments -all,all -condDensity,cond_density -ionChannel,ion_channel -permeability,permeability -variableParameter,variable_parameters +refract,refract +postFractionAlong,post_fraction_along +ionChannelVShift,ion_channel_v_shifts +spikeGeneratorRefPoisson,spike_generator_ref_poissons +random,random +channelTypes,channel_types +xStart,x_start +xs:float,xs:float +tau_m,tau_m +layout,layout +basePyNNIaFCell,basePyNNIaFCell +voltageClamp,voltage_clamps +tau_w,tau_w +testingVoltage,testing_voltage +adExIaFCell,ad_ex_ia_f_cells +ionChannelKS,ion_channel_kses +preSegmentId,pre_segment_id +spikeThresh,spike_threshes +synapse,synapse +spikeGeneratorPoisson,spike_generator_poissons vShift,v_shift +x,x +e_rev,e_rev +v_offset,v_offset +ionChannelPassive,ion_channel_passive +subGate,sub_gates erev,erev -channelDensityNernstCa2,channel_density_nernst_ca2s -initMembPotential,init_memb_potentials -specificCapacitance,specific_capacitances -spikeThresh,spike_threshes -channelDensityNonUniformGHK,channel_density_non_uniform_ghks -channelDensityNonUniformNernst,channel_density_non_uniform_nernsts -channelDensityNonUniform,channel_density_non_uniforms -channelDensityGHK2,channel_density_ghk2s -channelDensityGHK,channel_density_ghks -channelDensityNernst,channel_density_nernsts -channelDensityVShift,channel_density_v_shifts -channelDensity,channel_densities -channelPopulation,channel_populations -intracellularProperties2CaPools,intracellular_properties2_ca_pools -membraneProperties2CaPools,membrane_properties2_ca_pools -intracellularProperties,intracellular_properties -membraneProperties,membrane_properties -normalizationEnd,normalization_end -xs:double,xs:double -translationStart,translation_start -metric,metric -variable,variable -distal,distal -proximal,proximal -subTree,sub_trees -path,paths -include,includes -member,members -diameter,diameter -name,name parent,parent -biophysicalProperties2CaPools,biophysical_properties2_ca_pools -biophysicalProperties,biophysical_properties -morphology,morphology -betac,betac -alphac,alphac -pp,pp -qd0,qd0 -eL,e_l -eK,e_k -eCa,e_ca -eNa,e_na -gAmpa,g_ampa -gNmda,g_nmda -gKC,g_kc -gKahp,g_kahp -gCa,g_ca -gKdr,g_kdr -gNa,g_na -gLd,g_ld -gLs,g_ls -gc,gc -iDend,i_dend -iSoma,i_soma -phi,phi -refract,refract -tauw,tauw -delT,del_t -thresh,thresh -reset,reset gL,g_l -d,d -c,c -vpeak,vpeak -vt,vt -vr,vr -v0,v0 -leakConductance,leak_conductance -leakReversal,leak_reversal -tau,tau +tauRise,tau_rise +izhikevichCell,izhikevich_cells +postCellId,post_cell_id +condDensity,cond_density +gateHHratesTauInf,gate_h_hrates_tau_infs +c,c +fixedFactorConcentrationModel,fixed_factor_concentration_models +fixedQ10,fixed_q10 +region,regions +extracellularProperties,extracellular_properties +connection,connections +http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd,http://www.w3.org/2001/xml_schema http://www.w3.org/2001/xml_schema.xsd +electricalConnectionInstance,electrical_connection_instances +cm,cm +translationStart,translation_start +closedState,closed_states +period,period +gNa,g_na +gKahp,g_kahp +pp,pp +electricalConnectionInstanceW,electrical_connection_instance_ws +spikeTarget,spike_target +optional,optional +yStart,y_start tauFac,tau_fac -tauRec,tau_rec -initReleaseProb,init_release_prob -tsodyksMarkramDepFacMechanism,tsodyks_markram_dep_fac_mechanism -tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism -scalingVolt,scaling_volt -scalingConc,scaling_conc -blockConcentration,block_concentration -voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism -blockMechanism,block_mechanism -plasticityMechanism,plasticity_mechanism +q10Factor,q10_factor +populationList,population_list +zSpacing,z_spacing synapse2Path,synapse2_path -synapse1Path,synapse1_path -synapse2,synapse2 -synapse1,synapse1 -tauRise,tau_rise -tauDecay2,tau_decay2 -tauDecay1,tau_decay1 -tauDecay,tau_decay -ibase,ibase -delta,delta -conductance,conductance -gbase2,gbase2 -gbase1,gbase1 -gbase,gbase -rho,rho -decayConstant,decay_constant -restingConc,resting_conc -shellThickness,shell_thickness -scale,scale -midpoint,midpoint +betac,betac experimentalTemp,experimental_temp -q10Factor,q10_factor -fixedQ10,fixed_q10 -fractionalConductance,fractional_conductance -timeCourse,time_course -steadyState,steady_state -q10Settings,q10_settings -instances,instances -subGate,sub_gates -reverseRate,reverse_rate -forwardRate,forward_rate -gateTypes,gate_types -tauInfTransition,tau_inf_transition -reverseTransition,reverse_transition -forwardTransition,forward_transition +value,value openState,open_states -closedState,closed_states -gateFractional,gate_fractionals -gateKS,gate_kses +property,properties +k,k +zSize,z_size +tau_refrac,tau_refrac +metric,metric +compoundInput,compound_inputs +ionChannel,ion_channel +vr,vr +vt,vt +iafTauRefCell,iaf_tau_ref_cells +id,id +basePyNNCell,basePyNNCell +scalingConc,scaling_conc +pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells +tauInfTransition,tau_inf_transition +member,members gateHHInstantaneous,gate_hh_instantaneouses -gateHHratesTauInf,gate_h_hrates_tau_infs -gateHHratesInf,gate_h_hrates_infs -gateHHtauInf,gate_hh_tau_infs -gateHHratesTau,gate_h_hrates_taus -gateHHrates,gate_hh_rates -channelTypes,channel_types -ionChannelHH,ion_channel_hhs -ionChannelPassive,ion_channel_passive -gate,gates +populationTypes,population_types +conditioningVoltage,conditioning_voltage +ibase,ibase +v0,v0 +ion,ion +variableParameter,variable_parameters +unqualified,unqualified +iSoma,i_soma +g_leak,g_leak +i,i +channelDensityVShift,channel_density_v_shifts +biophysicalProperties2CaPools,biophysical_properties2_ca_pools +fractionalConductance,fractional_conductance +dimension,dimension +http://www.neuroml.org/schema/neuroml2,http://www.neuroml.org/schema/neuroml2 +tsodyksMarkramDepMechanism,tsodyks_markram_dep_mechanism +proximal,proximal +fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells +segmentId,segment_id q10ConductanceScaling,q10_conductance_scalings -fixedFactorConcentrationModel,fixed_factor_concentration_models -transientPoissonFiringSynapse,transient_poisson_firing_synapses -poissonFiringSynapse,poisson_firing_synapses -spikeGeneratorRefPoisson,spike_generator_ref_poissons -spikeGeneratorPoisson,spike_generator_poissons -spikeGeneratorRandom,spike_generator_randoms +rampGenerator,ramp_generators +source,source +extends,extends +location,location +input,input +voltageConcDepBlockMechanism,voltage_conc_dep_block_mechanism +postComponent,post_component +initReleaseProb,init_release_prob +maxISI,max_isi +doubleSynapse,double_synapses +grid,grid +IF_cond_alpha,IF_cond_alpha +d,d +v_thresh,v_thresh +timeCourse,time_course spikeGenerator,spike_generators timedSynapticInput,timed_synaptic_inputs -spikeArray,spike_arrays -voltageClampTriple,voltage_clamp_triples -voltageClamp,voltage_clamps -compoundInputDL,compound_input_dls -compoundInput,compound_inputs -alphaCurrSynapse,alpha_curr_synapses -expCurrSynapse,exp_curr_synapses -alphaCondSynapse,alpha_cond_synapses -expCondSynapse,exp_cond_synapses -gradedSynapse,graded_synapses -linearGradedSynapse,linear_graded_synapses -silentSynapse,silent_synapses -gapJunction,gap_junctions -doubleSynapse,double_synapses -blockingPlasticSynapse,blocking_plastic_synapses +gateHHratesTau,gate_h_hrates_taus +continuousConnection,continuous_connections +duration,duration +scale,scale +metaid,metaid +networkWithTemperature,network_with_temperature +fractionAlong,fraction_along +normalizationEnd,normalization_end +synapse1Path,synapse1_path +electricalProjection,electrical_projections +IF_curr_exp,IF_curr_exp +gateHHratesInf,gate_h_hrates_infs +simpleSeriesResistance,simple_series_resistance +e_rev_Na,e_rev_Na +IF_cond_exp,IF_cond_exp +tau_syn,tau_syn +channelDensityGHK2,channel_density_ghk2s +e_rev_E,e_rev_E +e_rev_I,e_rev_I +e_rev_K,e_rev_K +preSegment,pre_segment +v_init,v_init +gNmda,g_nmda +scalingVolt,scaling_volt +initialExtConcentration,initial_ext_concentration expThreeSynapse,exp_three_synapses -expTwoSynapse,exp_two_synapses -expOneSynapse,exp_one_synapses -alphaSynapse,alpha_synapses -alphaCurrentSynapse,alpha_current_synapses -pinskyRinzelCA3Cell,pinsky_rinzel_ca3_cells -fitzHughNagumo1969Cell,fitz_hugh_nagumo1969_cells -fitzHughNagumoCell,fitz_hugh_nagumo_cells -adExIaFCell,ad_ex_ia_f_cells -izhikevich2007Cell,izhikevich2007_cells -izhikevichCell,izhikevich_cells -iafRefCell,iaf_ref_cells -iafCell,iaf_cells -iafTauRefCell,iaf_tau_ref_cells -iafTauCell,iaf_tau_cells -baseCell,base_cells -cell2CaPools,cell2_ca_poolses -cell,cells -href,href -xs:anyURI,xs:any_uri -ionChannelKS,ion_channel_kses -ionChannelVShift,ion_channel_v_shifts -neuroml,neuroml -condition,condition +destination,destination +startAmplitude,start_amplitude +unbounded,unboundeds +compoundInputDL,compound_input_dls +xs:positiveInteger,xs:positive_integer +membraneProperties2CaPools,membrane_properties2_ca_pools defaultValue,default_value +inputW,input_ws +continuousConnectionInstance,continuous_connection_instances +start,start +tauDecay1,tau_decay1 +leakConductance,leak_conductance +tauDecay2,tau_decay2 exposure,exposure -description,description -dimension,dimension -extends,extends -tag,tag -xs:positiveInteger,xs:positive_integer -int,int +subTree,sub_trees javax.xml.bind.DatatypeConverter.parseInt,javax.xml.bind._datatype_converter.parse_int +delta,delta +iafTauCell,iaf_tau_cells +pulseGenerator,pulse_generators +iafRefCell,iaf_ref_cells +reset,reset +j,j +postSegment,post_segment javax.xml.bind.DatatypeConverter.printInt,javax.xml.bind._datatype_converter.print_int -IF_curr_alpha,IF_curr_alpha -IF_curr_exp,IF_curr_exp -IF_cond_alpha,IF_cond_alpha -IF_cond_exp,IF_cond_exp +z,z +xs:double,xs:double +required,required +int,int +gAmpa,g_ampa +electricalConnection,electrical_connections +synapticConnection,synaptic_connections +gateTypes,gate_types +channelDensityNonUniformNernst,channel_density_non_uniform_nernsts +permeability,permeability +restingConc,resting_conc +basedOn,based_on +leakReversal,leak_reversal +channelDensityNonUniformGHK,channel_density_non_uniform_ghks +gbar_K,gbar_K +initMembPotential,init_memb_potentials +postCell,post_cell +variable,variable +structure,structure +spikeArray,spike_arrays +blockingPlasticSynapse,blocking_plastic_synapses +minimumISI,minimum_isi +time,time diff --git a/neuroml/nml/nml.py b/neuroml/nml/nml.py index 1c2012d9..9456bfb3 100644 --- a/neuroml/nml/nml.py +++ b/neuroml/nml/nml.py @@ -2,42 +2,37 @@ # -*- coding: utf-8 -*- # -# Generated Fri Mar 26 15:19:31 2021 by generateDS.py version 2.38.3. -# Python 3.9.2 (default, Feb 20 2021, 00:00:00) [GCC 11.0.0 20210210 (Red Hat 11.0.0-0)] +# Generated Fri Mar 26 16:21:07 2021 by generateDS.py version 2.30.11. +# Python 2.7.18 (default, Feb 3 2021, 00:00:00) [GCC 11.0.0 20210130 (Red Hat 11.0.0-0)] # # Command line options: # ('-o', 'nml.py') -# ('--user-methods', 'helper_methods.py') +# ('--use-getter-setter', 'none') +# ('--silence', '') +# ('--user-methods', 'helper_methods') # # Command line arguments: # NeuroML_v2.1.xsd # # Command line: -# /home/asinha/.virtualenvs/generateds/bin/generateDS.py -o "nml.py" --user-methods="helper_methods.py" NeuroML_v2.1.xsd +# /home/asinha/.local/share/virtualenvs/generateds-2.7/bin/generateDS.py -o "nml.py" --use-getter-setter="none" --silence --user-methods="helper_methods" NeuroML_v2.1.xsd # # Current working directory (os.getcwd()): # nml # import sys -try: - ModulenotfoundExp_ = ModuleNotFoundError -except NameError: - ModulenotfoundExp_ = ImportError -from six.moves import zip_longest -import os import re as re_ import base64 import datetime as datetime_ -import decimal as decimal_ +import warnings as warnings_ try: from lxml import etree as etree_ -except ModulenotfoundExp_ : +except ImportError: from xml.etree import ElementTree as etree_ Validate_simpletypes_ = True -SaveElementTreeNode = True if sys.version_info.major == 2: BaseStrType_ = basestring else: @@ -53,11 +48,6 @@ def parsexml_(infile, parser=None, **kwargs): except AttributeError: # fallback to xml.etree parser = etree_.XMLParser() - try: - if isinstance(infile, os.PathLike): - infile = os.path.join(infile) - except AttributeError: - pass doc = etree_.parse(infile, parser=parser, **kwargs) return doc @@ -82,7 +72,7 @@ def parsexmlstring_(instring, parser=None, **kwargs): # definitions. The export method for any class for which there is # a namespace prefix definition, will export that definition in the # XML representation of that element. See the export method of -# any generated element type class for an example of the use of this +# any generated element type class for a example of the use of this # table. # A sample table is: # @@ -93,75 +83,11 @@ def parsexmlstring_(instring, parser=None, **kwargs): # "ElementtypeB": "http://www.xxx.com/namespaceB", # } # -# Additionally, the generatedsnamespaces module can contain a python -# dictionary named GenerateDSNamespaceTypePrefixes that associates element -# types with the namespace prefixes that are to be added to the -# "xsi:type" attribute value. See the exportAttributes method of -# any generated element type and the generation of "xsi:type" for an -# example of the use of this table. -# An example table: -# -# # File: generatedsnamespaces.py -# -# GenerateDSNamespaceTypePrefixes = { -# "ElementtypeC": "aaa:", -# "ElementtypeD": "bbb:", -# } -# try: from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_ -except ModulenotfoundExp_ : +except ImportError: GenerateDSNamespaceDefs_ = {} -try: - from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_ -except ModulenotfoundExp_ : - GenerateDSNamespaceTypePrefixes_ = {} - -# -# You can replace the following class definition by defining an -# importable module named "generatedscollector" containing a class -# named "GdsCollector". See the default class definition below for -# clues about the possible content of that class. -# -try: - from generatedscollector import GdsCollector as GdsCollector_ -except ModulenotfoundExp_ : - - class GdsCollector_(object): - - def __init__(self, messages=None): - if messages is None: - self.messages = [] - else: - self.messages = messages - - def add_message(self, msg): - self.messages.append(msg) - - def get_messages(self): - return self.messages - - def clear_messages(self): - self.messages = [] - - def print_messages(self): - for msg in self.messages: - print("Warning: {}".format(msg)) - - def write_messages(self, outstream): - for msg in self.messages: - outstream.write("Warning: {}\n".format(msg)) - - -# -# The super-class for enum types -# - -try: - from enum import Enum -except ModulenotfoundExp_ : - Enum = object # # The root super-class for element type classes @@ -172,10 +98,9 @@ def write_messages(self, outstream): try: from generatedssuper import GeneratedsSuper -except ModulenotfoundExp_ as exp: +except ImportError as exp: class GeneratedsSuper(object): - __hash__ = object.__hash__ tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$') class _FixedOffsetTZ(datetime_.tzinfo): def __init__(self, offset, name): @@ -189,8 +114,6 @@ def dst(self, dt): return None def gds_format_string(self, input_data, input_name=''): return input_data - def gds_parse_string(self, input_data, node=None, input_name=''): - return input_data def gds_validate_string(self, input_data, node=None, input_name=''): if not input_data: return '' @@ -201,22 +124,10 @@ def gds_format_base64(self, input_data, input_name=''): def gds_validate_base64(self, input_data, node=None, input_name=''): return input_data def gds_format_integer(self, input_data, input_name=''): - return '%d' % int(input_data) - def gds_parse_integer(self, input_data, node=None, input_name=''): - try: - ival = int(input_data) - except (TypeError, ValueError) as exp: - raise_parse_error(node, 'Requires integer value: %s' % exp) - return ival + return '%d' % input_data def gds_validate_integer(self, input_data, node=None, input_name=''): - try: - value = int(input_data) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires integer value') - return value + return input_data def gds_format_integer_list(self, input_data, input_name=''): - if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): - input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_integer_list( self, input_data, node=None, input_name=''): @@ -225,25 +136,13 @@ def gds_validate_integer_list( try: int(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of integer values') + raise_parse_error(node, 'Requires sequence of integers') return values def gds_format_float(self, input_data, input_name=''): - return ('%.15f' % float(input_data)).rstrip('0') - def gds_parse_float(self, input_data, node=None, input_name=''): - try: - fval_ = float(input_data) - except (TypeError, ValueError) as exp: - raise_parse_error(node, 'Requires float or double value: %s' % exp) - return fval_ + return ('%.15f' % input_data).rstrip('0') def gds_validate_float(self, input_data, node=None, input_name=''): - try: - value = float(input_data) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires float value') - return value + return input_data def gds_format_float_list(self, input_data, input_name=''): - if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): - input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_float_list( self, input_data, node=None, input_name=''): @@ -252,57 +151,13 @@ def gds_validate_float_list( try: float(value) except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of float values') - return values - def gds_format_decimal(self, input_data, input_name=''): - return_value = '%s' % input_data - if '.' in return_value: - return_value = return_value.rstrip('0') - if return_value.endswith('.'): - return_value = return_value.rstrip('.') - return return_value - def gds_parse_decimal(self, input_data, node=None, input_name=''): - try: - decimal_value = decimal_.Decimal(input_data) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires decimal value') - return decimal_value - def gds_validate_decimal(self, input_data, node=None, input_name=''): - try: - value = decimal_.Decimal(input_data) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires decimal value') - return value - def gds_format_decimal_list(self, input_data, input_name=''): - if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): - input_data = [str(s) for s in input_data] - return ' '.join([self.gds_format_decimal(item) for item in input_data]) - def gds_validate_decimal_list( - self, input_data, node=None, input_name=''): - values = input_data.split() - for value in values: - try: - decimal_.Decimal(value) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires sequence of decimal values') + raise_parse_error(node, 'Requires sequence of floats') return values def gds_format_double(self, input_data, input_name=''): - return '%s' % input_data - def gds_parse_double(self, input_data, node=None, input_name=''): - try: - fval_ = float(input_data) - except (TypeError, ValueError) as exp: - raise_parse_error(node, 'Requires double or float value: %s' % exp) - return fval_ + return '%e' % input_data def gds_validate_double(self, input_data, node=None, input_name=''): - try: - value = float(input_data) - except (TypeError, ValueError): - raise_parse_error(node, 'Requires double or float value') - return value + return input_data def gds_format_double_list(self, input_data, input_name=''): - if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): - input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_double_list( self, input_data, node=None, input_name=''): @@ -311,39 +166,23 @@ def gds_validate_double_list( try: float(value) except (TypeError, ValueError): - raise_parse_error( - node, 'Requires sequence of double or float values') + raise_parse_error(node, 'Requires sequence of doubles') return values def gds_format_boolean(self, input_data, input_name=''): return ('%s' % input_data).lower() - def gds_parse_boolean(self, input_data, node=None, input_name=''): - if input_data in ('true', '1'): - bval = True - elif input_data in ('false', '0'): - bval = False - else: - raise_parse_error(node, 'Requires boolean value') - return bval def gds_validate_boolean(self, input_data, node=None, input_name=''): - if input_data not in (True, 1, False, 0, ): - raise_parse_error( - node, - 'Requires boolean value ' - '(one of True, 1, False, 0)') return input_data def gds_format_boolean_list(self, input_data, input_name=''): - if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_): - input_data = [str(s) for s in input_data] return '%s' % ' '.join(input_data) def gds_validate_boolean_list( self, input_data, node=None, input_name=''): values = input_data.split() for value in values: - if value not in (True, 1, False, 0, ): + if value not in ('true', '1', 'false', '0', ): raise_parse_error( node, - 'Requires sequence of boolean values ' - '(one of True, 1, False, 0)') + 'Requires sequence of booleans ' + '("true", "1", "false", "0")') return values def gds_validate_datetime(self, input_data, node=None, input_name=''): return input_data @@ -528,50 +367,6 @@ def gds_parse_time(cls, input_data): dt = datetime_.datetime.strptime(input_data, '%H:%M:%S') dt = dt.replace(tzinfo=tz) return dt.time() - def gds_check_cardinality_( - self, value, input_name, - min_occurs=0, max_occurs=1, required=None): - if value is None: - length = 0 - elif isinstance(value, list): - length = len(value) - else: - length = 1 - if required is not None : - if required and length < 1: - self.gds_collector_.add_message( - "Required value {}{} is missing".format( - input_name, self.gds_get_node_lineno_())) - if length < min_occurs: - self.gds_collector_.add_message( - "Number of values for {}{} is below " - "the minimum allowed, " - "expected at least {}, found {}".format( - input_name, self.gds_get_node_lineno_(), - min_occurs, length)) - elif length > max_occurs: - self.gds_collector_.add_message( - "Number of values for {}{} is above " - "the maximum allowed, " - "expected at most {}, found {}".format( - input_name, self.gds_get_node_lineno_(), - max_occurs, length)) - def gds_validate_builtin_ST_( - self, validator, value, input_name, - min_occurs=None, max_occurs=None, required=None): - if value is not None: - try: - validator(value, input_name=input_name) - except GDSParseError as parse_error: - self.gds_collector_.add_message(str(parse_error)) - def gds_validate_defined_ST_( - self, validator, value, input_name, - min_occurs=None, max_occurs=None, required=None): - if value is not None: - try: - validator(value) - except GDSParseError as parse_error: - self.gds_collector_.add_message(str(parse_error)) def gds_str_lower(self, instring): return instring.lower() def get_path_(self, node): @@ -601,10 +396,7 @@ def get_class_obj_(self, node, default_class=None): class_obj1 = class_obj2 return class_obj1 def gds_build_any(self, node, type_name=None): - # provide default value in case option --disable-xml is used. - content = "" - content = etree_.tostring(node, encoding="unicode") - return content + return None @classmethod def gds_reverse_node_mapping(cls, mapping): return dict(((v, k) for k, v in mapping.items())) @@ -628,34 +420,11 @@ def convert_unicode(instring): result = GeneratedsSuper.gds_encode(str(instring)) return result def __eq__(self, other): - def excl_select_objs_(obj): - return (obj[0] != 'parent_object_' and - obj[0] != 'gds_collector_') if type(self) != type(other): return False - return all(x == y for x, y in zip_longest( - filter(excl_select_objs_, self.__dict__.items()), - filter(excl_select_objs_, other.__dict__.items()))) + return self.__dict__ == other.__dict__ def __ne__(self, other): return not self.__eq__(other) - # Django ETL transform hooks. - def gds_djo_etl_transform(self): - pass - def gds_djo_etl_transform_db_obj(self, dbobj): - pass - # SQLAlchemy ETL transform hooks. - def gds_sqa_etl_transform(self): - return 0, None - def gds_sqa_etl_transform_db_obj(self, dbobj): - pass - def gds_get_node_lineno_(self): - if (hasattr(self, "gds_elementtree_node_") and - self.gds_elementtree_node_ is not None): - return ' near line {}'.format( - self.gds_elementtree_node_.sourceline) - else: - return "" - def getSubclassFromModule_(module, class_): '''Get the subclass of a class from a specific module.''' @@ -686,10 +455,6 @@ def getSubclassFromModule_(module, class_): # ExternalEncoding = '' -# Set this to false in order to deactivate during export, the use of -# name space prefixes captured from the input document. -UseCapturedNS_ = True -CapturedNsmap_ = {} Tag_pattern_ = re_.compile(r'({.*})?(.*)') String_cleanup_pat_ = re_.compile(r"[\n\r\s]+") Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)') @@ -785,26 +550,18 @@ def find_attr_value_(attr_name, node): value = attrs.get(attr_name) elif len(attr_parts) == 2: prefix, name = attr_parts - if prefix == 'xml': - namespace = 'http://www.w3.org/XML/1998/namespace' - else: - namespace = node.nsmap.get(prefix) + namespace = node.nsmap.get(prefix) if namespace is not None: value = attrs.get('{%s}%s' % (namespace, name, )) return value -def encode_str_2_3(instr): - return instr - - class GDSParseError(Exception): pass def raise_parse_error(node, msg): - if node is not None: - msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, ) + msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, ) raise GDSParseError(msg) @@ -869,7 +626,7 @@ def exportSimple(self, outfile, level, name): self.name, base64.b64encode(self.value), self.name)) - def to_etree(self, element, mapping_=None, nsmap_=None): + def to_etree(self, element): if self.category == MixedContainer.CategoryText: # Prevent exporting empty content as empty lines. if self.value.strip(): @@ -889,7 +646,7 @@ def to_etree(self, element, mapping_=None, nsmap_=None): subelement.text = self.to_etree_simple() else: # category == MixedContainer.CategoryComplex self.value.to_etree(element) - def to_etree_simple(self, mapping_=None, nsmap_=None): + def to_etree_simple(self): if self.content_type == MixedContainer.TypeString: text = self.value elif (self.content_type == MixedContainer.TypeInteger or @@ -967,27 +724,25 @@ def _cast(typ, value): # -class BlockTypes(str, Enum): +class BlockTypes(object): VOLTAGE_CONC_DEP_BLOCK_MECHANISM='voltageConcDepBlockMechanism' -class Metric(str, Enum): - """Allowed metrics for InhomogeneousParam""" +class Metric(object): PATH_LENGTHFROMROOT='Path Length from root' -class PlasticityTypes(str, Enum): +class PlasticityTypes(object): TSODYKS_MARKRAM_DEP_MECHANISM='tsodyksMarkramDepMechanism' TSODYKS_MARKRAM_DEP_FAC_MECHANISM='tsodyksMarkramDepFacMechanism' -class ZeroOrOne(str, Enum): - """Value which is either 0 or 1""" +class ZeroOrOne(object): _0='0' _1='1' -class allowedSpaces(str, Enum): +class allowedSpaces(object): EUCLIDEAN__1_D='Euclidean_1D' EUCLIDEAN__2_D='Euclidean_2D' EUCLIDEAN__3_D='Euclidean_3D' @@ -996,12 +751,12 @@ class allowedSpaces(str, Enum): GRID__3_D='Grid_3D' -class channelTypes(str, Enum): +class channelTypes(object): ION_CHANNEL_PASSIVE='ionChannelPassive' ION_CHANNEL_HH='ionChannelHH' -class gateTypes(str, Enum): +class gateTypes(object): GATE_H_HRATES='gateHHrates' GATE_H_HRATES_TAU='gateHHratesTau' GATE_H_HTAU_INF='gateHHtauInf' @@ -1012,35 +767,29 @@ class gateTypes(str, Enum): GATE_FRACTIONAL='gateFractional' -class networkTypes(str, Enum): +class networkTypes(object): NETWORK='network' NETWORK_WITH_TEMPERATURE='networkWithTemperature' -class populationTypes(str, Enum): +class populationTypes(object): POPULATION='population' POPULATION_LIST='populationList' class Property(GeneratedsSuper): """Generic property with a tag and value""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tag', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('tag', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, tag=None, value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, tag=None, value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.tag = _cast(None, tag) - self.tag_nsprefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1052,18 +801,6 @@ def factory(*args_, **kwargs_): else: return Property(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tag(self): - return self.tag - def set_tag(self, tag): - self.tag = tag - def get_value(self): - return self.value - def set_value(self, value): - self.value = value def hasContent_(self): if ( @@ -1079,10 +816,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Property': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1102,16 +837,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Property', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tag', node) @@ -1122,25 +853,21 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Property class Annotation(GeneratedsSuper): """Placeholder for MIRIAM related metadata, among others.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -1156,14 +883,6 @@ def factory(*args_, **kwargs_): else: return Annotation(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value def hasContent_(self): if ( self.anytypeobjs_ @@ -1171,7 +890,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Annotation', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Annotation', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Annotation') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -1179,10 +898,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Annotation': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1196,100 +913,80 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Annotation'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Annotation', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Annotation', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'Annotation') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'Annotation') + if obj_ is not None: + self.add_anytypeobjs_(obj_) # end class Annotation class ComponentType(GeneratedsSuper): """Contains an extension to NeuroML by creating custom LEMS ComponentType.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('extends', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('Property', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Property', 'type': 'LEMS_Property'}, None), - MemberSpec_('Parameter', 'Parameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Parameter', 'type': 'Parameter'}, None), - MemberSpec_('Constant', 'Constant', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Constant', 'type': 'Constant'}, None), - MemberSpec_('Exposure', 'Exposure', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Exposure', 'type': 'Exposure'}, None), - MemberSpec_('Requirement', 'Requirement', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Requirement', 'type': 'Requirement'}, None), - MemberSpec_('InstanceRequirement', 'InstanceRequirement', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'InstanceRequirement', 'type': 'InstanceRequirement'}, None), - MemberSpec_('Dynamics', 'Dynamics', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'Dynamics', 'type': 'Dynamics'}, None), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('extends', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('Property', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'LEMS_Property', u'name': u'Property', u'minOccurs': u'0'}, None), + MemberSpec_('Parameter', 'Parameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Parameter', u'name': u'Parameter', u'minOccurs': u'0'}, None), + MemberSpec_('Constant', 'Constant', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Constant', u'name': u'Constant', u'minOccurs': u'0'}, None), + MemberSpec_('Exposure', 'Exposure', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Exposure', u'name': u'Exposure', u'minOccurs': u'0'}, None), + MemberSpec_('Requirement', 'Requirement', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Requirement', u'name': u'Requirement', u'minOccurs': u'0'}, None), + MemberSpec_('InstanceRequirement', 'InstanceRequirement', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InstanceRequirement', u'name': u'InstanceRequirement', u'minOccurs': u'0'}, None), + MemberSpec_('Dynamics', 'Dynamics', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Dynamics', u'name': u'Dynamics', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, name=None, extends=None, description=None, Property=None, Parameter=None, Constant=None, Exposure=None, Requirement=None, InstanceRequirement=None, Dynamics=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, extends=None, description=None, Property=None, Parameter=None, Constant=None, Exposure=None, Requirement=None, InstanceRequirement=None, Dynamics=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.extends = _cast(None, extends) - self.extends_nsprefix_ = None self.description = _cast(None, description) - self.description_nsprefix_ = None if Property is None: self.Property = [] else: self.Property = Property - self.Property_nsprefix_ = None if Parameter is None: self.Parameter = [] else: self.Parameter = Parameter - self.Parameter_nsprefix_ = None if Constant is None: self.Constant = [] else: self.Constant = Constant - self.Constant_nsprefix_ = None if Exposure is None: self.Exposure = [] else: self.Exposure = Exposure - self.Exposure_nsprefix_ = None if Requirement is None: self.Requirement = [] else: self.Requirement = Requirement - self.Requirement_nsprefix_ = None if InstanceRequirement is None: self.InstanceRequirement = [] else: self.InstanceRequirement = InstanceRequirement - self.InstanceRequirement_nsprefix_ = None if Dynamics is None: self.Dynamics = [] else: self.Dynamics = Dynamics - self.Dynamics_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1301,92 +998,6 @@ def factory(*args_, **kwargs_): else: return ComponentType(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_Property(self): - return self.Property - def set_Property(self, Property): - self.Property = Property - def add_Property(self, value): - self.Property.append(value) - def insert_Property_at(self, index, value): - self.Property.insert(index, value) - def replace_Property_at(self, index, value): - self.Property[index] = value - def get_Parameter(self): - return self.Parameter - def set_Parameter(self, Parameter): - self.Parameter = Parameter - def add_Parameter(self, value): - self.Parameter.append(value) - def insert_Parameter_at(self, index, value): - self.Parameter.insert(index, value) - def replace_Parameter_at(self, index, value): - self.Parameter[index] = value - def get_Constant(self): - return self.Constant - def set_Constant(self, Constant): - self.Constant = Constant - def add_Constant(self, value): - self.Constant.append(value) - def insert_Constant_at(self, index, value): - self.Constant.insert(index, value) - def replace_Constant_at(self, index, value): - self.Constant[index] = value - def get_Exposure(self): - return self.Exposure - def set_Exposure(self, Exposure): - self.Exposure = Exposure - def add_Exposure(self, value): - self.Exposure.append(value) - def insert_Exposure_at(self, index, value): - self.Exposure.insert(index, value) - def replace_Exposure_at(self, index, value): - self.Exposure[index] = value - def get_Requirement(self): - return self.Requirement - def set_Requirement(self, Requirement): - self.Requirement = Requirement - def add_Requirement(self, value): - self.Requirement.append(value) - def insert_Requirement_at(self, index, value): - self.Requirement.insert(index, value) - def replace_Requirement_at(self, index, value): - self.Requirement[index] = value - def get_InstanceRequirement(self): - return self.InstanceRequirement - def set_InstanceRequirement(self, InstanceRequirement): - self.InstanceRequirement = InstanceRequirement - def add_InstanceRequirement(self, value): - self.InstanceRequirement.append(value) - def insert_InstanceRequirement_at(self, index, value): - self.InstanceRequirement.insert(index, value) - def replace_InstanceRequirement_at(self, index, value): - self.InstanceRequirement[index] = value - def get_Dynamics(self): - return self.Dynamics - def set_Dynamics(self, Dynamics): - self.Dynamics = Dynamics - def add_Dynamics(self, value): - self.Dynamics.append(value) - def insert_Dynamics_at(self, index, value): - self.Dynamics.insert(index, value) - def replace_Dynamics_at(self, index, value): - self.Dynamics[index] = value - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_extends(self): - return self.extends - def set_extends(self, extends): - self.extends = extends - def get_description(self): - return self.description - def set_description(self, description): - self.description = description def hasContent_(self): if ( self.Property or @@ -1400,7 +1011,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ComponentType', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ComponentType', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ComponentType') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -1408,10 +1019,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ComponentType': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1433,42 +1042,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.description is not None and 'description' not in already_processed: already_processed.add('description') outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ComponentType', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ComponentType', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for Property_ in self.Property: - namespaceprefix_ = self.Property_nsprefix_ + ':' if (UseCapturedNS_ and self.Property_nsprefix_) else '' Property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Property', pretty_print=pretty_print) for Parameter_ in self.Parameter: - namespaceprefix_ = self.Parameter_nsprefix_ + ':' if (UseCapturedNS_ and self.Parameter_nsprefix_) else '' Parameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Parameter', pretty_print=pretty_print) for Constant_ in self.Constant: - namespaceprefix_ = self.Constant_nsprefix_ + ':' if (UseCapturedNS_ and self.Constant_nsprefix_) else '' Constant_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Constant', pretty_print=pretty_print) for Exposure_ in self.Exposure: - namespaceprefix_ = self.Exposure_nsprefix_ + ':' if (UseCapturedNS_ and self.Exposure_nsprefix_) else '' Exposure_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Exposure', pretty_print=pretty_print) for Requirement_ in self.Requirement: - namespaceprefix_ = self.Requirement_nsprefix_ + ':' if (UseCapturedNS_ and self.Requirement_nsprefix_) else '' Requirement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Requirement', pretty_print=pretty_print) for InstanceRequirement_ in self.InstanceRequirement: - namespaceprefix_ = self.InstanceRequirement_nsprefix_ + ':' if (UseCapturedNS_ and self.InstanceRequirement_nsprefix_) else '' InstanceRequirement_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='InstanceRequirement', pretty_print=pretty_print) for Dynamics_ in self.Dynamics: - namespaceprefix_ = self.Dynamics_nsprefix_ + ':' if (UseCapturedNS_ and self.Dynamics_nsprefix_) else '' Dynamics_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Dynamics', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1483,40 +1081,40 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'Property': obj_ = LEMS_Property.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Property.append(obj_) obj_.original_tagname_ = 'Property' elif nodeName_ == 'Parameter': obj_ = Parameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Parameter.append(obj_) obj_.original_tagname_ = 'Parameter' elif nodeName_ == 'Constant': obj_ = Constant.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Constant.append(obj_) obj_.original_tagname_ = 'Constant' elif nodeName_ == 'Exposure': obj_ = Exposure.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Exposure.append(obj_) obj_.original_tagname_ = 'Exposure' elif nodeName_ == 'Requirement': obj_ = Requirement.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Requirement.append(obj_) obj_.original_tagname_ = 'Requirement' elif nodeName_ == 'InstanceRequirement': obj_ = InstanceRequirement.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.InstanceRequirement.append(obj_) obj_.original_tagname_ = 'InstanceRequirement' elif nodeName_ == 'Dynamics': obj_ = Dynamics.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Dynamics.append(obj_) obj_.original_tagname_ = 'Dynamics' # end class ComponentType @@ -1524,29 +1122,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Constant(GeneratedsSuper): """LEMS ComponentType for Constant.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('value', 'Nml2Quantity', 0, 0, {'use': 'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('value', 'Nml2Quantity', 0, 0, {'use': u'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, value=None, description=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, value=None, description=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.dimension = _cast(None, dimension) - self.dimension_nsprefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None self.description = _cast(None, description) - self.description_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1558,37 +1148,13 @@ def factory(*args_, **kwargs_): else: return Constant(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_dimension(self): - return self.dimension - def set_dimension(self, dimension): - self.dimension = dimension - def get_value(self): - return self.value - def set_value(self, value): - self.value = value - def get_description(self): - return self.description - def set_description(self, description): - self.description = description def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_patterns_, )) - validate_Nml2Quantity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_patterns_, )) + validate_Nml2Quantity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*$']] def hasContent_(self): if ( @@ -1604,10 +1170,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Constant': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1627,22 +1191,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' dimension=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.dimension), input_name='dimension')), )) if self.value is not None and 'value' not in already_processed: already_processed.add('value') - outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) + outfile.write(' value=%s' % (quote_attrib(self.value), )) if self.description is not None and 'description' not in already_processed: already_processed.add('description') outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Constant', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1662,33 +1222,26 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Constant class Exposure(GeneratedsSuper): """LEMS Exposure (ComponentType property)""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.dimension = _cast(None, dimension) - self.dimension_nsprefix_ = None self.description = _cast(None, description) - self.description_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -1700,22 +1253,6 @@ def factory(*args_, **kwargs_): else: return Exposure(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_dimension(self): - return self.dimension - def set_dimension(self, dimension): - self.dimension = dimension - def get_description(self): - return self.description - def set_description(self, description): - self.description = description def hasContent_(self): if ( @@ -1731,10 +1268,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Exposure': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1757,16 +1292,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' description=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.description), input_name='description')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Exposure', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1781,32 +1312,25 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'description' not in already_processed: already_processed.add('description') self.description = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Exposure class NamedDimensionalType(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.dimension = _cast(None, dimension) - self.dimension_nsprefix_ = None self.description = _cast(None, description) - self.description_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1819,24 +1343,6 @@ def factory(*args_, **kwargs_): else: return NamedDimensionalType(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_dimension(self): - return self.dimension - def set_dimension(self, dimension): - self.dimension = dimension - def get_description(self): - return self.description - def set_description(self, description): - self.description = description - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( @@ -1852,10 +1358,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'NamedDimensionalType': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -1879,23 +1383,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NamedDimensionalType', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -1914,35 +1410,27 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class NamedDimensionalType class NamedDimensionalVariable(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('dimension', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('description', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('exposure', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('dimension', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('description', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('exposure', 'xs:string', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, name=None, dimension=None, description=None, exposure=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, exposure=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.dimension = _cast(None, dimension) - self.dimension_nsprefix_ = None self.description = _cast(None, description) - self.description_nsprefix_ = None self.exposure = _cast(None, exposure) - self.exposure_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -1955,28 +1443,6 @@ def factory(*args_, **kwargs_): else: return NamedDimensionalVariable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_dimension(self): - return self.dimension - def set_dimension(self, dimension): - self.dimension = dimension - def get_description(self): - return self.description - def set_description(self, description): - self.description = description - def get_exposure(self): - return self.exposure - def set_exposure(self, exposure): - self.exposure = exposure - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( @@ -1992,10 +1458,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'NamedDimensionalVariable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2022,23 +1486,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NamedDimensionalVariable', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -2061,24 +1517,20 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class NamedDimensionalVariable class Parameter(NamedDimensionalType): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Parameter"), self).__init__(name, dimension, description, **kwargs_) + super(Parameter, self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2090,10 +1542,6 @@ def factory(*args_, **kwargs_): else: return Parameter(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Parameter, self).hasContent_() @@ -2109,10 +1557,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Parameter': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2126,43 +1572,34 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Parameter'): super(Parameter, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Parameter') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Parameter', fromsubclass_=False, pretty_print=True): - super(Parameter, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Parameter, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Parameter, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Parameter, self).buildChildren(child_, node, nodeName_, True) pass # end class Parameter class LEMS_Property(NamedDimensionalType): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('default_value', 'xs:double', 0, 1, {'use': 'optional'}), + MemberSpec_('default_value', 'xs:double', 0, 1, {'use': u'optional'}), ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, default_value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, default_value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("LEMS_Property"), self).__init__(name, dimension, description, **kwargs_) + super(LEMS_Property, self).__init__(name, dimension, description, **kwargs_) self.default_value = _cast(float, default_value) - self.default_value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2174,14 +1611,6 @@ def factory(*args_, **kwargs_): else: return LEMS_Property(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_defaultValue(self): - return self.default_value - def set_defaultValue(self, default_value): - self.default_value = default_value def hasContent_(self): if ( super(LEMS_Property, self).hasContent_() @@ -2197,10 +1626,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'LEMS_Property': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2217,45 +1644,39 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('default_value') outfile.write(' defaultValue="%s"' % self.gds_format_double(self.default_value, input_name='defaultValue')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='LEMS_Property', fromsubclass_=False, pretty_print=True): - super(LEMS_Property, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(LEMS_Property, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('defaultValue', node) if value is not None and 'defaultValue' not in already_processed: already_processed.add('defaultValue') - value = self.gds_parse_double(value, node, 'defaultValue') - self.default_value = value + try: + self.default_value = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (defaultValue): %s' % exp) super(LEMS_Property, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(LEMS_Property, self).buildChildren(child_, node, nodeName_, True) pass # end class LEMS_Property class Requirement(NamedDimensionalType): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalType - def __init__(self, name=None, dimension=None, description=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Requirement"), self).__init__(name, dimension, description, **kwargs_) + super(Requirement, self).__init__(name, dimension, description, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2267,10 +1688,6 @@ def factory(*args_, **kwargs_): else: return Requirement(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Requirement, self).hasContent_() @@ -2286,10 +1703,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Requirement': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2303,45 +1718,35 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Requirement'): super(Requirement, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Requirement') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Requirement', fromsubclass_=False, pretty_print=True): - super(Requirement, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Requirement, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Requirement, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Requirement, self).buildChildren(child_, node, nodeName_, True) pass # end class Requirement class InstanceRequirement(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('name', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, name=None, type=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, type=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.name = _cast(None, name) - self.name_nsprefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2353,18 +1758,6 @@ def factory(*args_, **kwargs_): else: return InstanceRequirement(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_name(self): - return self.name - def set_name(self, name): - self.name = name - def get_type(self): - return self.type - def set_type(self, type): - self.type = type def hasContent_(self): if ( @@ -2380,10 +1773,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InstanceRequirement': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2403,16 +1794,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InstanceRequirement', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -2423,48 +1810,40 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'type' not in already_processed: already_processed.add('type') self.type = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class InstanceRequirement class Dynamics(GeneratedsSuper): """LEMS ComponentType for Dynamics""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('StateVariable', 'StateVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'StateVariable', 'type': 'StateVariable'}, None), - MemberSpec_('DerivedVariable', 'DerivedVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'DerivedVariable', 'type': 'DerivedVariable'}, None), - MemberSpec_('ConditionalDerivedVariable', 'ConditionalDerivedVariable', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ConditionalDerivedVariable', 'type': 'ConditionalDerivedVariable'}, None), - MemberSpec_('TimeDerivative', 'TimeDerivative', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'TimeDerivative', 'type': 'TimeDerivative'}, None), + MemberSpec_('StateVariable', 'StateVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'StateVariable', u'name': u'StateVariable', u'minOccurs': u'0'}, None), + MemberSpec_('DerivedVariable', 'DerivedVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DerivedVariable', u'name': u'DerivedVariable', u'minOccurs': u'0'}, None), + MemberSpec_('ConditionalDerivedVariable', 'ConditionalDerivedVariable', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ConditionalDerivedVariable', u'name': u'ConditionalDerivedVariable', u'minOccurs': u'0'}, None), + MemberSpec_('TimeDerivative', 'TimeDerivative', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TimeDerivative', u'name': u'TimeDerivative', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, StateVariable=None, DerivedVariable=None, ConditionalDerivedVariable=None, TimeDerivative=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, StateVariable=None, DerivedVariable=None, ConditionalDerivedVariable=None, TimeDerivative=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None if StateVariable is None: self.StateVariable = [] else: self.StateVariable = StateVariable - self.StateVariable_nsprefix_ = None if DerivedVariable is None: self.DerivedVariable = [] else: self.DerivedVariable = DerivedVariable - self.DerivedVariable_nsprefix_ = None if ConditionalDerivedVariable is None: self.ConditionalDerivedVariable = [] else: self.ConditionalDerivedVariable = ConditionalDerivedVariable - self.ConditionalDerivedVariable_nsprefix_ = None if TimeDerivative is None: self.TimeDerivative = [] else: self.TimeDerivative = TimeDerivative - self.TimeDerivative_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2476,50 +1855,6 @@ def factory(*args_, **kwargs_): else: return Dynamics(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_StateVariable(self): - return self.StateVariable - def set_StateVariable(self, StateVariable): - self.StateVariable = StateVariable - def add_StateVariable(self, value): - self.StateVariable.append(value) - def insert_StateVariable_at(self, index, value): - self.StateVariable.insert(index, value) - def replace_StateVariable_at(self, index, value): - self.StateVariable[index] = value - def get_DerivedVariable(self): - return self.DerivedVariable - def set_DerivedVariable(self, DerivedVariable): - self.DerivedVariable = DerivedVariable - def add_DerivedVariable(self, value): - self.DerivedVariable.append(value) - def insert_DerivedVariable_at(self, index, value): - self.DerivedVariable.insert(index, value) - def replace_DerivedVariable_at(self, index, value): - self.DerivedVariable[index] = value - def get_ConditionalDerivedVariable(self): - return self.ConditionalDerivedVariable - def set_ConditionalDerivedVariable(self, ConditionalDerivedVariable): - self.ConditionalDerivedVariable = ConditionalDerivedVariable - def add_ConditionalDerivedVariable(self, value): - self.ConditionalDerivedVariable.append(value) - def insert_ConditionalDerivedVariable_at(self, index, value): - self.ConditionalDerivedVariable.insert(index, value) - def replace_ConditionalDerivedVariable_at(self, index, value): - self.ConditionalDerivedVariable[index] = value - def get_TimeDerivative(self): - return self.TimeDerivative - def set_TimeDerivative(self, TimeDerivative): - self.TimeDerivative = TimeDerivative - def add_TimeDerivative(self, value): - self.TimeDerivative.append(value) - def insert_TimeDerivative_at(self, index, value): - self.TimeDerivative.insert(index, value) - def replace_TimeDerivative_at(self, index, value): - self.TimeDerivative[index] = value def hasContent_(self): if ( self.StateVariable or @@ -2530,7 +1865,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Dynamics', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Dynamics', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Dynamics') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -2538,10 +1873,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Dynamics': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2555,55 +1888,47 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Dynamics'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Dynamics', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Dynamics', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for StateVariable_ in self.StateVariable: - namespaceprefix_ = self.StateVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.StateVariable_nsprefix_) else '' StateVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='StateVariable', pretty_print=pretty_print) for DerivedVariable_ in self.DerivedVariable: - namespaceprefix_ = self.DerivedVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.DerivedVariable_nsprefix_) else '' DerivedVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='DerivedVariable', pretty_print=pretty_print) for ConditionalDerivedVariable_ in self.ConditionalDerivedVariable: - namespaceprefix_ = self.ConditionalDerivedVariable_nsprefix_ + ':' if (UseCapturedNS_ and self.ConditionalDerivedVariable_nsprefix_) else '' ConditionalDerivedVariable_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ConditionalDerivedVariable', pretty_print=pretty_print) for TimeDerivative_ in self.TimeDerivative: - namespaceprefix_ = self.TimeDerivative_nsprefix_ + ':' if (UseCapturedNS_ and self.TimeDerivative_nsprefix_) else '' TimeDerivative_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='TimeDerivative', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'StateVariable': obj_ = StateVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.StateVariable.append(obj_) obj_.original_tagname_ = 'StateVariable' elif nodeName_ == 'DerivedVariable': obj_ = DerivedVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.DerivedVariable.append(obj_) obj_.original_tagname_ = 'DerivedVariable' elif nodeName_ == 'ConditionalDerivedVariable': obj_ = ConditionalDerivedVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ConditionalDerivedVariable.append(obj_) obj_.original_tagname_ = 'ConditionalDerivedVariable' elif nodeName_ == 'TimeDerivative': obj_ = TimeDerivative.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.TimeDerivative.append(obj_) obj_.original_tagname_ = 'TimeDerivative' # end class Dynamics @@ -2611,24 +1936,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class DerivedVariable(NamedDimensionalVariable): """LEMS ComponentType for DerivedVariable""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('value', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('select', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('value', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('select', 'xs:string', 0, 1, {'use': u'optional'}), ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, value=None, select=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, exposure=None, value=None, select=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("DerivedVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) + super(DerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) self.value = _cast(None, value) - self.value_nsprefix_ = None self.select = _cast(None, select) - self.select_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2640,18 +1959,6 @@ def factory(*args_, **kwargs_): else: return DerivedVariable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_value(self): - return self.value - def set_value(self, value): - self.value = value - def get_select(self): - return self.select - def set_select(self, select): - self.select = select def hasContent_(self): if ( super(DerivedVariable, self).hasContent_() @@ -2667,10 +1974,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'DerivedVariable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2690,18 +1995,14 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('select') outfile.write(' select=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.select), input_name='select')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DerivedVariable', fromsubclass_=False, pretty_print=True): - super(DerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(DerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('value', node) @@ -2713,25 +2014,21 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('select') self.select = value super(DerivedVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(DerivedVariable, self).buildChildren(child_, node, nodeName_, True) pass # end class DerivedVariable class StateVariable(NamedDimensionalVariable): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, exposure=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("StateVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) + super(StateVariable, self).__init__(name, dimension, description, exposure, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2743,10 +2040,6 @@ def factory(*args_, **kwargs_): else: return StateVariable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(StateVariable, self).hasContent_() @@ -2762,10 +2055,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'StateVariable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2779,22 +2070,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='StateVariable'): super(StateVariable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='StateVariable') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='StateVariable', fromsubclass_=False, pretty_print=True): - super(StateVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(StateVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(StateVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(StateVariable, self).buildChildren(child_, node, nodeName_, True) pass # end class StateVariable @@ -2802,24 +2089,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ConditionalDerivedVariable(NamedDimensionalVariable): """LEMS ComponentType for ConditionalDerivedVariable""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('Case', 'Case', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'Case', 'type': 'Case'}, None), + MemberSpec_('Case', 'Case', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Case', u'name': u'Case', u'minOccurs': u'1'}, None), ] subclass = None superclass = NamedDimensionalVariable - def __init__(self, name=None, dimension=None, description=None, exposure=None, Case=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, name=None, dimension=None, description=None, exposure=None, Case=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ConditionalDerivedVariable"), self).__init__(name, dimension, description, exposure, **kwargs_) + super(ConditionalDerivedVariable, self).__init__(name, dimension, description, exposure, **kwargs_) if Case is None: self.Case = [] else: self.Case = Case - self.Case_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2831,20 +2113,6 @@ def factory(*args_, **kwargs_): else: return ConditionalDerivedVariable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_Case(self): - return self.Case - def set_Case(self, Case): - self.Case = Case - def add_Case(self, value): - self.Case.append(value) - def insert_Case_at(self, index, value): - self.Case.insert(index, value) - def replace_Case_at(self, index, value): - self.Case[index] = value def hasContent_(self): if ( self.Case or @@ -2853,7 +2121,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ConditionalDerivedVariable', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConditionalDerivedVariable', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ConditionalDerivedVariable') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -2861,10 +2129,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ConditionalDerivedVariable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2878,32 +2144,27 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConditionalDerivedVariable'): super(ConditionalDerivedVariable, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConditionalDerivedVariable') - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ConditionalDerivedVariable', fromsubclass_=False, pretty_print=True): - super(ConditionalDerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConditionalDerivedVariable', fromsubclass_=False, pretty_print=True): + super(ConditionalDerivedVariable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for Case_ in self.Case: - namespaceprefix_ = self.Case_nsprefix_ + ':' if (UseCapturedNS_ and self.Case_nsprefix_) else '' Case_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Case', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ConditionalDerivedVariable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'Case': obj_ = Case.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.Case.append(obj_) obj_.original_tagname_ = 'Case' super(ConditionalDerivedVariable, self).buildChildren(child_, node, nodeName_, True) @@ -2911,23 +2172,17 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Case(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('condition', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('condition', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, condition=None, value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, condition=None, value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.condition = _cast(None, condition) - self.condition_nsprefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -2939,18 +2194,6 @@ def factory(*args_, **kwargs_): else: return Case(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_condition(self): - return self.condition - def set_condition(self, condition): - self.condition = condition - def get_value(self): - return self.value - def set_value(self, value): - self.value = value def hasContent_(self): if ( @@ -2966,10 +2209,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Case': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -2989,16 +2230,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Case', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('condition', node) @@ -3009,29 +2246,23 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Case class TimeDerivative(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('variable', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('variable', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, variable=None, value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, variable=None, value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.variable = _cast(None, variable) - self.variable_nsprefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3043,18 +2274,6 @@ def factory(*args_, **kwargs_): else: return TimeDerivative(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variable(self): - return self.variable - def set_variable(self, variable): - self.variable = variable - def get_value(self): - return self.value - def set_value(self, value): - self.value = value def hasContent_(self): if ( @@ -3070,10 +2289,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'TimeDerivative': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3093,16 +2310,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TimeDerivative', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('variable', node) @@ -3113,26 +2326,21 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class TimeDerivative class IncludeType(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('href', 'xs:anyURI', 0, 0, {'use': 'required'}), + MemberSpec_('href', 'xs:anyURI', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, href=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, href=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.href = _cast(None, href) - self.href_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3144,14 +2352,6 @@ def factory(*args_, **kwargs_): else: return IncludeType(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_href(self): - return self.href - def set_href(self, href): - self.href = href def hasContent_(self): if ( @@ -3167,10 +2367,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IncludeType': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3187,45 +2385,35 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' href=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.href), input_name='href')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IncludeType', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('href', node) if value is not None and 'href' not in already_processed: already_processed.add('href') self.href = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class IncludeType class Q10ConductanceScaling(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 0, {'use': 'required'}), + MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, q10_factor=None, experimental_temp=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, q10_factor=None, experimental_temp=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.q10_factor = _cast(None, q10_factor) - self.q10_factor_nsprefix_ = None self.experimental_temp = _cast(None, experimental_temp) - self.experimental_temp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3237,40 +2425,20 @@ def factory(*args_, **kwargs_): else: return Q10ConductanceScaling(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_q10Factor(self): - return self.q10_factor - def set_q10Factor(self, q10_factor): - self.q10_factor = q10_factor - def get_experimentalTemp(self): - return self.experimental_temp - def set_experimentalTemp(self, experimental_temp): - self.experimental_temp = experimental_temp def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] def hasContent_(self): if ( @@ -3286,10 +2454,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Q10ConductanceScaling': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3303,22 +2469,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10ConductanceScaling'): if self.q10_factor is not None and 'q10_factor' not in already_processed: already_processed.add('q10_factor') - outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10_factor), input_name='q10Factor')), )) + outfile.write(' q10Factor=%s' % (quote_attrib(self.q10_factor), )) if self.experimental_temp is not None and 'experimental_temp' not in already_processed: already_processed.add('experimental_temp') - outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimental_temp), input_name='experimentalTemp')), )) + outfile.write(' experimentalTemp=%s' % (quote_attrib(self.experimental_temp), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10ConductanceScaling', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('q10Factor', node) @@ -3331,35 +2493,27 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('experimentalTemp') self.experimental_temp = value self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Q10ConductanceScaling class Q10Settings(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('fixed_q10', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), - MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 1, {'use': 'optional'}), - MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('fixed_q10', 'Nml2Quantity_none', 0, 1, {'use': u'optional'}), + MemberSpec_('q10_factor', 'Nml2Quantity_none', 0, 1, {'use': u'optional'}), + MemberSpec_('experimental_temp', 'Nml2Quantity_temperature', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, fixed_q10=None, q10_factor=None, experimental_temp=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, fixed_q10=None, q10_factor=None, experimental_temp=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.fixed_q10 = _cast(None, fixed_q10) - self.fixed_q10_nsprefix_ = None self.q10_factor = _cast(None, q10_factor) - self.q10_factor_nsprefix_ = None self.experimental_temp = _cast(None, experimental_temp) - self.experimental_temp_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3371,59 +2525,27 @@ def factory(*args_, **kwargs_): else: return Q10Settings(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_fixedQ10(self): - return self.fixed_q10 - def set_fixedQ10(self, fixed_q10): - self.fixed_q10 = fixed_q10 - def get_q10Factor(self): - return self.q10_factor - def set_q10Factor(self, q10_factor): - self.q10_factor = q10_factor - def get_experimentalTemp(self): - return self.experimental_temp - def set_experimentalTemp(self, experimental_temp): - self.experimental_temp = experimental_temp def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] def hasContent_(self): if ( @@ -3439,10 +2561,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Q10Settings': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3456,28 +2576,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Q10Settings'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.fixed_q10 is not None and 'fixed_q10' not in already_processed: already_processed.add('fixed_q10') - outfile.write(' fixedQ10=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fixed_q10), input_name='fixedQ10')), )) + outfile.write(' fixedQ10=%s' % (quote_attrib(self.fixed_q10), )) if self.q10_factor is not None and 'q10_factor' not in already_processed: already_processed.add('q10_factor') - outfile.write(' q10Factor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.q10_factor), input_name='q10Factor')), )) + outfile.write(' q10Factor=%s' % (quote_attrib(self.q10_factor), )) if self.experimental_temp is not None and 'experimental_temp' not in already_processed: already_processed.add('experimental_temp') - outfile.write(' experimentalTemp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.experimental_temp), input_name='experimentalTemp')), )) + outfile.write(' experimentalTemp=%s' % (quote_attrib(self.experimental_temp), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Q10Settings', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -3500,35 +2616,27 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('experimentalTemp') self.experimental_temp = value self.validate_Nml2Quantity_temperature(self.experimental_temp) # validate type Nml2Quantity_temperature - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Q10Settings class HHRate(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 1, {'use': 'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 1, {'use': u'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, rate=None, midpoint=None, scale=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.rate = _cast(None, rate) - self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) - self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) - self.scale_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3540,59 +2648,27 @@ def factory(*args_, **kwargs_): else: return HHRate(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_rate(self): - return self.rate - def set_rate(self, rate): - self.rate = rate - def get_midpoint(self): - return self.midpoint - def set_midpoint(self, midpoint): - self.midpoint = midpoint - def get_scale(self): - return self.scale - def set_scale(self, scale): - self.scale = scale def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( @@ -3608,10 +2684,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'HHRate': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3625,28 +2699,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHRate'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) + outfile.write(' rate=%s' % (quote_attrib(self.rate), )) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) + outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) + outfile.write(' scale=%s' % (quote_attrib(self.scale), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHRate', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -3669,35 +2739,27 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('scale') self.scale = value self.validate_Nml2Quantity_voltage(self.scale) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class HHRate class HHVariable(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('rate', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('rate', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, rate=None, midpoint=None, scale=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.rate = _cast(float, rate) - self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) - self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) - self.scale_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3709,48 +2771,20 @@ def factory(*args_, **kwargs_): else: return HHVariable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_rate(self): - return self.rate - def set_rate(self, rate): - self.rate = rate - def get_midpoint(self): - return self.midpoint - def set_midpoint(self, midpoint): - self.midpoint = midpoint - def get_scale(self): - return self.scale - def set_scale(self, scale): - self.scale = scale def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( @@ -3766,10 +2800,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'HHVariable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3783,28 +2815,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHVariable'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') outfile.write(' rate="%s"' % self.gds_format_float(self.rate, input_name='rate')) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) + outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) + outfile.write(' scale=%s' % (quote_attrib(self.scale), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHVariable', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -3815,8 +2843,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('rate', node) if value is not None and 'rate' not in already_processed: already_processed.add('rate') - value = self.gds_parse_float(value, node, 'rate') - self.rate = value + try: + self.rate = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (rate): %s' % exp) value = find_attr_value_('midpoint', node) if value is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') @@ -3827,38 +2857,29 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('scale') self.scale = value self.validate_Nml2Quantity_voltage(self.scale) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class HHVariable class HHTime(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('rate', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), - MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), - MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': 'optional'}), - MemberSpec_('tau', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('rate', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), + MemberSpec_('midpoint', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('scale', 'Nml2Quantity_voltage', 0, 1, {'use': u'optional'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, rate=None, midpoint=None, scale=None, tau=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, rate=None, midpoint=None, scale=None, tau=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.rate = _cast(None, rate) - self.rate_nsprefix_ = None self.midpoint = _cast(None, midpoint) - self.midpoint_nsprefix_ = None self.scale = _cast(None, scale) - self.scale_nsprefix_ = None self.tau = _cast(None, tau) - self.tau_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -3870,63 +2891,27 @@ def factory(*args_, **kwargs_): else: return HHTime(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_rate(self): - return self.rate - def set_rate(self, rate): - self.rate = rate - def get_midpoint(self): - return self.midpoint - def set_midpoint(self, midpoint): - self.midpoint = midpoint - def get_scale(self): - return self.scale - def set_scale(self, scale): - self.scale = scale - def get_tau(self): - return self.tau - def set_tau(self, tau): - self.tau = tau def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( @@ -3942,10 +2927,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'HHTime': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -3959,31 +2942,27 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='HHTime'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) + outfile.write(' rate=%s' % (quote_attrib(self.rate), )) if self.midpoint is not None and 'midpoint' not in already_processed: already_processed.add('midpoint') - outfile.write(' midpoint=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.midpoint), input_name='midpoint')), )) + outfile.write(' midpoint=%s' % (quote_attrib(self.midpoint), )) if self.scale is not None and 'scale' not in already_processed: already_processed.add('scale') - outfile.write(' scale=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scale), input_name='scale')), )) + outfile.write(' scale=%s' % (quote_attrib(self.scale), )) if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) + outfile.write(' tau=%s' % (quote_attrib(self.tau), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HHTime', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -4011,38 +2990,29 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('tau') self.tau = value self.validate_Nml2Quantity_time(self.tau) # validate type Nml2Quantity_time - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class HHTime class BlockMechanism(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'BlockTypes', 0, 0, {'use': 'required'}), - MemberSpec_('species', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('block_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('scaling_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('scaling_volt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'BlockTypes', 0, 0, {'use': u'required'}), + MemberSpec_('species', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('block_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('scaling_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('scaling_volt', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, type=None, species=None, block_concentration=None, scaling_conc=None, scaling_volt=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, species=None, block_concentration=None, scaling_conc=None, scaling_volt=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.species = _cast(None, species) - self.species_nsprefix_ = None self.block_concentration = _cast(None, block_concentration) - self.block_concentration_nsprefix_ = None self.scaling_conc = _cast(None, scaling_conc) - self.scaling_conc_nsprefix_ = None self.scaling_volt = _cast(None, scaling_volt) - self.scaling_volt_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4054,76 +3024,39 @@ def factory(*args_, **kwargs_): else: return BlockMechanism(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def get_blockConcentration(self): - return self.block_concentration - def set_blockConcentration(self, block_concentration): - self.block_concentration = block_concentration - def get_scalingConc(self): - return self.scaling_conc - def set_scalingConc(self, scaling_conc): - self.scaling_conc = scaling_conc - def get_scalingVolt(self): - return self.scaling_volt - def set_scalingVolt(self, scaling_volt): - self.scaling_volt = scaling_volt def validate_BlockTypes(self, value): # Validate type BlockTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['voltageConcDepBlockMechanism'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on BlockTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on BlockTypes' % {"value" : value.encode("utf-8")} ) def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( @@ -4139,10 +3072,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BlockMechanism': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4156,31 +3087,27 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BlockMechanism'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) + outfile.write(' species=%s' % (quote_attrib(self.species), )) if self.block_concentration is not None and 'block_concentration' not in already_processed: already_processed.add('block_concentration') - outfile.write(' blockConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.block_concentration), input_name='blockConcentration')), )) + outfile.write(' blockConcentration=%s' % (quote_attrib(self.block_concentration), )) if self.scaling_conc is not None and 'scaling_conc' not in already_processed: already_processed.add('scaling_conc') - outfile.write(' scalingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scaling_conc), input_name='scalingConc')), )) + outfile.write(' scalingConc=%s' % (quote_attrib(self.scaling_conc), )) if self.scaling_volt is not None and 'scaling_volt' not in already_processed: already_processed.add('scaling_volt') - outfile.write(' scalingVolt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.scaling_volt), input_name='scalingVolt')), )) + outfile.write(' scalingVolt=%s' % (quote_attrib(self.scaling_volt), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BlockMechanism', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -4208,35 +3135,27 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('scalingVolt') self.scaling_volt = value self.validate_Nml2Quantity_voltage(self.scaling_volt) # validate type Nml2Quantity_voltage - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class BlockMechanism class PlasticityMechanism(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'PlasticityTypes', 0, 0, {'use': 'required'}), - MemberSpec_('init_release_prob', 'ZeroToOne', 0, 0, {'use': 'required'}), - MemberSpec_('tau_rec', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tau_fac', 'Nml2Quantity_time', 0, 1, {'use': 'optional'}), + MemberSpec_('type', 'PlasticityTypes', 0, 0, {'use': u'required'}), + MemberSpec_('init_release_prob', 'ZeroToOne', 0, 0, {'use': u'required'}), + MemberSpec_('tau_rec', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tau_fac', 'Nml2Quantity_time', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, type=None, init_release_prob=None, tau_rec=None, tau_fac=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, type=None, init_release_prob=None, tau_rec=None, tau_fac=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.init_release_prob = _cast(float, init_release_prob) - self.init_release_prob_nsprefix_ = None self.tau_rec = _cast(None, tau_rec) - self.tau_rec_nsprefix_ = None self.tau_fac = _cast(None, tau_fac) - self.tau_fac_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4248,65 +3167,32 @@ def factory(*args_, **kwargs_): else: return PlasticityMechanism(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_initReleaseProb(self): - return self.init_release_prob - def set_initReleaseProb(self, init_release_prob): - self.init_release_prob = init_release_prob - def get_tauRec(self): - return self.tau_rec - def set_tauRec(self, tau_rec): - self.tau_rec = tau_rec - def get_tauFac(self): - return self.tau_fac - def set_tauFac(self, tau_fac): - self.tau_fac = tau_fac def validate_PlasticityTypes(self, value): # Validate type PlasticityTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['tsodyksMarkramDepMechanism', 'tsodyksMarkramDepFacMechanism'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on PlasticityTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on PlasticityTypes' % {"value" : value.encode("utf-8")} ) def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value < 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) if value > 1: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( @@ -4322,10 +3208,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'PlasticityMechanism': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4339,28 +3223,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='PlasticityMechanism'): if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.init_release_prob is not None and 'init_release_prob' not in already_processed: already_processed.add('init_release_prob') - outfile.write(' initReleaseProb="%s"' % self.gds_format_float(self.init_release_prob, input_name='initReleaseProb')) + outfile.write(' initReleaseProb=%s' % (quote_attrib(self.init_release_prob), )) if self.tau_rec is not None and 'tau_rec' not in already_processed: already_processed.add('tau_rec') - outfile.write(' tauRec=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rec), input_name='tauRec')), )) + outfile.write(' tauRec=%s' % (quote_attrib(self.tau_rec), )) if self.tau_fac is not None and 'tau_fac' not in already_processed: already_processed.add('tau_fac') - outfile.write(' tauFac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_fac), input_name='tauFac')), )) + outfile.write(' tauFac=%s' % (quote_attrib(self.tau_fac), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PlasticityMechanism', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -4371,8 +3251,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('initReleaseProb', node) if value is not None and 'initReleaseProb' not in already_processed: already_processed.add('initReleaseProb') - value = self.gds_parse_float(value, node, 'initReleaseProb') - self.init_release_prob = value + try: + self.init_release_prob = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (initReleaseProb): %s' % exp) self.validate_ZeroToOne(self.init_release_prob) # validate type ZeroToOne value = find_attr_value_('tauRec', node) if value is not None and 'tauRec' not in already_processed: @@ -4384,29 +3266,23 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('tauFac') self.tau_fac = value self.validate_Nml2Quantity_time(self.tau_fac) # validate type Nml2Quantity_time - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class PlasticityMechanism class SegmentParent(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), - MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, segments=None, fraction_along='1', gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, segments=None, fraction_along='1', **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.segments = _cast(int, segments) - self.segments_nsprefix_ = None self.fraction_along = _cast(float, fraction_along) - self.fraction_along_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4418,41 +3294,17 @@ def factory(*args_, **kwargs_): else: return SegmentParent(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_fractionAlong(self): - return self.fraction_along - def set_fractionAlong(self, fraction_along): - self.fraction_along = fraction_along def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value < 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) if value > 1: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) def hasContent_(self): if ( @@ -4468,10 +3320,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SegmentParent': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4485,67 +3335,60 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentParent'): if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.fraction_along != 1 and 'fraction_along' not in already_processed: already_processed.add('fraction_along') - outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fraction_along, input_name='fractionAlong')) + outfile.write(' fractionAlong=%s' % (quote_attrib(self.fraction_along), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentParent', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = self.gds_parse_integer(value, node, 'segment') + try: + self.segments = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') - value = self.gds_parse_float(value, node, 'fractionAlong') - self.fraction_along = value + try: + self.fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (fractionAlong): %s' % exp) self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class SegmentParent class Point3DWithDiam(GeneratedsSuper): """A 3D point with diameter.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x', 'xs:double', 0, 0, {'use': 'required'}), - MemberSpec_('y', 'xs:double', 0, 0, {'use': 'required'}), - MemberSpec_('z', 'xs:double', 0, 0, {'use': 'required'}), - MemberSpec_('diameter', 'DoubleGreaterThanZero', 0, 0, {'use': 'required'}), + MemberSpec_('x', 'xs:double', 0, 0, {'use': u'required'}), + MemberSpec_('y', 'xs:double', 0, 0, {'use': u'required'}), + MemberSpec_('z', 'xs:double', 0, 0, {'use': u'required'}), + MemberSpec_('diameter', 'DoubleGreaterThanZero', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, x=None, y=None, z=None, diameter=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, x=None, y=None, z=None, diameter=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.x = _cast(float, x) - self.x_nsprefix_ = None self.y = _cast(float, y) - self.y_nsprefix_ = None self.z = _cast(float, z) - self.z_nsprefix_ = None self.diameter = _cast(float, diameter) - self.diameter_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4557,37 +3400,11 @@ def factory(*args_, **kwargs_): else: return Point3DWithDiam(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_x(self): - return self.x - def set_x(self, x): - self.x = x - def get_y(self): - return self.y - def set_y(self, y): - self.y = y - def get_z(self): - return self.z - def set_z(self, z): - self.z = z - def get_diameter(self): - return self.diameter - def set_diameter(self, diameter): - self.diameter = diameter def validate_DoubleGreaterThanZero(self, value): # Validate type DoubleGreaterThanZero, a restriction on xs:double. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value <= 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minExclusive restriction on DoubleGreaterThanZero' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on DoubleGreaterThanZero' % {"value" : value} ) def hasContent_(self): if ( @@ -4603,10 +3420,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Point3DWithDiam': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4629,43 +3444,47 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' z="%s"' % self.gds_format_double(self.z, input_name='z')) if self.diameter is not None and 'diameter' not in already_processed: already_processed.add('diameter') - outfile.write(' diameter="%s"' % self.gds_format_double(self.diameter, input_name='diameter')) + outfile.write(' diameter=%s' % (quote_attrib(self.diameter), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Point3DWithDiam', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('x', node) if value is not None and 'x' not in already_processed: already_processed.add('x') - value = self.gds_parse_double(value, node, 'x') - self.x = value + try: + self.x = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (x): %s' % exp) value = find_attr_value_('y', node) if value is not None and 'y' not in already_processed: already_processed.add('y') - value = self.gds_parse_double(value, node, 'y') - self.y = value + try: + self.y = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (y): %s' % exp) value = find_attr_value_('z', node) if value is not None and 'z' not in already_processed: already_processed.add('z') - value = self.gds_parse_double(value, node, 'z') - self.z = value + try: + self.z = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (z): %s' % exp) value = find_attr_value_('diameter', node) if value is not None and 'diameter' not in already_processed: already_processed.add('diameter') - value = self.gds_parse_double(value, node, 'diameter') - self.diameter = value + try: + self.diameter = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (diameter): %s' % exp) self.validate_DoubleGreaterThanZero(self.diameter) # validate type DoubleGreaterThanZero - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass def __str__(self): @@ -4692,20 +3511,15 @@ def distance_to(self, other_3d_point): class ProximalDetails(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('translation_start', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('translation_start', 'xs:double', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, translation_start=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, translation_start=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.translation_start = _cast(float, translation_start) - self.translation_start_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4717,14 +3531,6 @@ def factory(*args_, **kwargs_): else: return ProximalDetails(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_translationStart(self): - return self.translation_start - def set_translationStart(self, translation_start): - self.translation_start = translation_start def hasContent_(self): if ( @@ -4740,10 +3546,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ProximalDetails': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4760,43 +3564,36 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' translationStart="%s"' % self.gds_format_double(self.translation_start, input_name='translationStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ProximalDetails', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('translationStart', node) if value is not None and 'translationStart' not in already_processed: already_processed.add('translationStart') - value = self.gds_parse_double(value, node, 'translationStart') - self.translation_start = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + try: + self.translation_start = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (translationStart): %s' % exp) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class ProximalDetails class DistalDetails(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('normalization_end', 'xs:double', 0, 0, {'use': 'required'}), + MemberSpec_('normalization_end', 'xs:double', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, normalization_end=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, normalization_end=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.normalization_end = _cast(float, normalization_end) - self.normalization_end_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4808,14 +3605,6 @@ def factory(*args_, **kwargs_): else: return DistalDetails(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_normalizationEnd(self): - return self.normalization_end - def set_normalizationEnd(self, normalization_end): - self.normalization_end = normalization_end def hasContent_(self): if ( @@ -4831,10 +3620,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'DistalDetails': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4851,43 +3638,36 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' normalizationEnd="%s"' % self.gds_format_double(self.normalization_end, input_name='normalizationEnd')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DistalDetails', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('normalizationEnd', node) if value is not None and 'normalizationEnd' not in already_processed: already_processed.add('normalizationEnd') - value = self.gds_parse_double(value, node, 'normalizationEnd') - self.normalization_end = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + try: + self.normalization_end = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (normalizationEnd): %s' % exp) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class DistalDetails class Member(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.segments = _cast(int, segments) - self.segments_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -4899,21 +3679,9 @@ def factory(*args_, **kwargs_): else: return Member(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -4930,10 +3698,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Member': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -4947,48 +3713,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Member'): if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Member', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = self.gds_parse_integer(value, node, 'segment') + try: + self.segments = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Member class Include(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segment_groups', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('segment_groups', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, segment_groups=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, segment_groups=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5000,25 +3760,13 @@ def factory(*args_, **kwargs_): else: return Include(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( @@ -5034,10 +3782,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Include': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5051,19 +3797,15 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Include'): if self.segment_groups is not None and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Include', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentGroup', node) @@ -5071,29 +3813,23 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('segmentGroup') self.segment_groups = value self.validate_NmlId(self.segment_groups) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class Include class Path(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'from', 'type': 'SegmentEndPoint'}, None), - MemberSpec_('to', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'to', 'type': 'SegmentEndPoint'}, None), + MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'from', u'minOccurs': u'0'}, None), + MemberSpec_('to', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'to', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, from_=None, to=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.from_ = from_ - self.from__nsprefix_ = None self.to = to - self.to_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5105,18 +3841,6 @@ def factory(*args_, **kwargs_): else: return Path(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to def hasContent_(self): if ( self.from_ is not None or @@ -5125,7 +3849,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Path', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Path', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Path') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5133,10 +3857,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Path': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5150,62 +3872,50 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Path'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Path', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Path', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.from_ is not None: - namespaceprefix_ = self.from__nsprefix_ + ':' if (UseCapturedNS_ and self.from__nsprefix_) else '' self.from_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='from', pretty_print=pretty_print) if self.to is not None: - namespaceprefix_ = self.to_nsprefix_ + ':' if (UseCapturedNS_ and self.to_nsprefix_) else '' self.to.export(outfile, level, namespaceprefix_, namespacedef_='', name_='to', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'from': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.from_ = obj_ obj_.original_tagname_ = 'from' elif nodeName_ == 'to': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.to = obj_ obj_.original_tagname_ = 'to' # end class Path class SubTree(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'from', 'type': 'SegmentEndPoint'}, 3), - MemberSpec_('to', 'SegmentEndPoint', 0, 1, {'minOccurs': '0', 'name': 'to', 'type': 'SegmentEndPoint'}, 3), + MemberSpec_('from_', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'from', u'minOccurs': u'0'}, 3), + MemberSpec_('to', 'SegmentEndPoint', 0, 1, {u'type': u'SegmentEndPoint', u'name': u'to', u'minOccurs': u'0'}, 3), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, from_=None, to=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.from_ = from_ - self.from__nsprefix_ = None self.to = to - self.to_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5217,18 +3927,6 @@ def factory(*args_, **kwargs_): else: return SubTree(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to def hasContent_(self): if ( self.from_ is not None or @@ -5237,7 +3935,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='SubTree', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SubTree', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('SubTree') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5245,10 +3943,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SubTree': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5262,59 +3958,48 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SubTree'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='SubTree', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SubTree', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.from_ is not None: - namespaceprefix_ = self.from__nsprefix_ + ':' if (UseCapturedNS_ and self.from__nsprefix_) else '' self.from_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='from', pretty_print=pretty_print) if self.to is not None: - namespaceprefix_ = self.to_nsprefix_ + ':' if (UseCapturedNS_ and self.to_nsprefix_) else '' self.to.export(outfile, level, namespaceprefix_, namespacedef_='', name_='to', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'from': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.from_ = obj_ obj_.original_tagname_ = 'from' elif nodeName_ == 'to': obj_ = SegmentEndPoint.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.to = obj_ obj_.original_tagname_ = 'to' # end class SubTree class SegmentEndPoint(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.segments = _cast(int, segments) - self.segments_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5326,21 +4011,9 @@ def factory(*args_, **kwargs_): else: return SegmentEndPoint(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -5357,10 +4030,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SegmentEndPoint': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5374,117 +4045,100 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentEndPoint'): if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentEndPoint', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = self.gds_parse_integer(value, node, 'segment') + try: + self.segments = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class SegmentEndPoint class MembraneProperties(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channel_populations', 'ChannelPopulation', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelPopulation', 'type': 'ChannelPopulation'}, None), - MemberSpec_('channel_densities', 'ChannelDensity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensity', 'type': 'ChannelDensity'}, None), - MemberSpec_('channel_density_v_shifts', 'ChannelDensityVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityVShift', 'type': 'ChannelDensityVShift'}, None), - MemberSpec_('channel_density_nernsts', 'ChannelDensityNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernst', 'type': 'ChannelDensityNernst'}, None), - MemberSpec_('channel_density_ghks', 'ChannelDensityGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK', 'type': 'ChannelDensityGHK'}, None), - MemberSpec_('channel_density_ghk2s', 'ChannelDensityGHK2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityGHK2', 'type': 'ChannelDensityGHK2'}, None), - MemberSpec_('channel_density_non_uniforms', 'ChannelDensityNonUniform', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniform', 'type': 'ChannelDensityNonUniform'}, None), - MemberSpec_('channel_density_non_uniform_nernsts', 'ChannelDensityNonUniformNernst', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformNernst', 'type': 'ChannelDensityNonUniformNernst'}, None), - MemberSpec_('channel_density_non_uniform_ghks', 'ChannelDensityNonUniformGHK', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNonUniformGHK', 'type': 'ChannelDensityNonUniformGHK'}, None), - MemberSpec_('spike_threshes', 'SpikeThresh', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeThresh', 'type': 'SpikeThresh'}, None), - MemberSpec_('specific_capacitances', 'SpecificCapacitance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'specificCapacitance', 'type': 'SpecificCapacitance'}, None), - MemberSpec_('init_memb_potentials', 'InitMembPotential', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'initMembPotential', 'type': 'InitMembPotential'}, None), + MemberSpec_('channel_populations', 'ChannelPopulation', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelPopulation', u'name': u'channelPopulation', u'minOccurs': u'0'}, None), + MemberSpec_('channel_densities', 'ChannelDensity', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensity', u'name': u'channelDensity', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_v_shifts', 'ChannelDensityVShift', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityVShift', u'name': u'channelDensityVShift', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_nernsts', 'ChannelDensityNernst', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNernst', u'name': u'channelDensityNernst', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_ghks', 'ChannelDensityGHK', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityGHK', u'name': u'channelDensityGHK', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_ghk2s', 'ChannelDensityGHK2', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityGHK2', u'name': u'channelDensityGHK2', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_non_uniforms', 'ChannelDensityNonUniform', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniform', u'name': u'channelDensityNonUniform', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_non_uniform_nernsts', 'ChannelDensityNonUniformNernst', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniformNernst', u'name': u'channelDensityNonUniformNernst', u'minOccurs': u'0'}, None), + MemberSpec_('channel_density_non_uniform_ghks', 'ChannelDensityNonUniformGHK', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNonUniformGHK', u'name': u'channelDensityNonUniformGHK', u'minOccurs': u'0'}, None), + MemberSpec_('spike_threshes', 'SpikeThresh', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeThresh', u'name': u'spikeThresh', u'minOccurs': u'0'}, None), + MemberSpec_('specific_capacitances', 'SpecificCapacitance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpecificCapacitance', u'name': u'specificCapacitance', u'minOccurs': u'0'}, None), + MemberSpec_('init_memb_potentials', 'InitMembPotential', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InitMembPotential', u'name': u'initMembPotential', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None if channel_populations is None: self.channel_populations = [] else: self.channel_populations = channel_populations - self.channel_populations_nsprefix_ = None if channel_densities is None: self.channel_densities = [] else: self.channel_densities = channel_densities - self.channel_densities_nsprefix_ = None if channel_density_v_shifts is None: self.channel_density_v_shifts = [] else: self.channel_density_v_shifts = channel_density_v_shifts - self.channel_density_v_shifts_nsprefix_ = None if channel_density_nernsts is None: self.channel_density_nernsts = [] else: self.channel_density_nernsts = channel_density_nernsts - self.channel_density_nernsts_nsprefix_ = None if channel_density_ghks is None: self.channel_density_ghks = [] else: self.channel_density_ghks = channel_density_ghks - self.channel_density_ghks_nsprefix_ = None if channel_density_ghk2s is None: self.channel_density_ghk2s = [] else: self.channel_density_ghk2s = channel_density_ghk2s - self.channel_density_ghk2s_nsprefix_ = None if channel_density_non_uniforms is None: self.channel_density_non_uniforms = [] else: self.channel_density_non_uniforms = channel_density_non_uniforms - self.channel_density_non_uniforms_nsprefix_ = None if channel_density_non_uniform_nernsts is None: self.channel_density_non_uniform_nernsts = [] else: self.channel_density_non_uniform_nernsts = channel_density_non_uniform_nernsts - self.channel_density_non_uniform_nernsts_nsprefix_ = None if channel_density_non_uniform_ghks is None: self.channel_density_non_uniform_ghks = [] else: self.channel_density_non_uniform_ghks = channel_density_non_uniform_ghks - self.channel_density_non_uniform_ghks_nsprefix_ = None if spike_threshes is None: self.spike_threshes = [] else: self.spike_threshes = spike_threshes - self.spike_threshes_nsprefix_ = None if specific_capacitances is None: self.specific_capacitances = [] else: self.specific_capacitances = specific_capacitances - self.specific_capacitances_nsprefix_ = None if init_memb_potentials is None: self.init_memb_potentials = [] else: self.init_memb_potentials = init_memb_potentials - self.init_memb_potentials_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -5497,132 +4151,6 @@ def factory(*args_, **kwargs_): else: return MembraneProperties(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_channelPopulation(self): - return self.channel_populations - def set_channelPopulation(self, channel_populations): - self.channel_populations = channel_populations - def add_channelPopulation(self, value): - self.channel_populations.append(value) - def insert_channelPopulation_at(self, index, value): - self.channel_populations.insert(index, value) - def replace_channelPopulation_at(self, index, value): - self.channel_populations[index] = value - def get_channelDensity(self): - return self.channel_densities - def set_channelDensity(self, channel_densities): - self.channel_densities = channel_densities - def add_channelDensity(self, value): - self.channel_densities.append(value) - def insert_channelDensity_at(self, index, value): - self.channel_densities.insert(index, value) - def replace_channelDensity_at(self, index, value): - self.channel_densities[index] = value - def get_channelDensityVShift(self): - return self.channel_density_v_shifts - def set_channelDensityVShift(self, channel_density_v_shifts): - self.channel_density_v_shifts = channel_density_v_shifts - def add_channelDensityVShift(self, value): - self.channel_density_v_shifts.append(value) - def insert_channelDensityVShift_at(self, index, value): - self.channel_density_v_shifts.insert(index, value) - def replace_channelDensityVShift_at(self, index, value): - self.channel_density_v_shifts[index] = value - def get_channelDensityNernst(self): - return self.channel_density_nernsts - def set_channelDensityNernst(self, channel_density_nernsts): - self.channel_density_nernsts = channel_density_nernsts - def add_channelDensityNernst(self, value): - self.channel_density_nernsts.append(value) - def insert_channelDensityNernst_at(self, index, value): - self.channel_density_nernsts.insert(index, value) - def replace_channelDensityNernst_at(self, index, value): - self.channel_density_nernsts[index] = value - def get_channelDensityGHK(self): - return self.channel_density_ghks - def set_channelDensityGHK(self, channel_density_ghks): - self.channel_density_ghks = channel_density_ghks - def add_channelDensityGHK(self, value): - self.channel_density_ghks.append(value) - def insert_channelDensityGHK_at(self, index, value): - self.channel_density_ghks.insert(index, value) - def replace_channelDensityGHK_at(self, index, value): - self.channel_density_ghks[index] = value - def get_channelDensityGHK2(self): - return self.channel_density_ghk2s - def set_channelDensityGHK2(self, channel_density_ghk2s): - self.channel_density_ghk2s = channel_density_ghk2s - def add_channelDensityGHK2(self, value): - self.channel_density_ghk2s.append(value) - def insert_channelDensityGHK2_at(self, index, value): - self.channel_density_ghk2s.insert(index, value) - def replace_channelDensityGHK2_at(self, index, value): - self.channel_density_ghk2s[index] = value - def get_channelDensityNonUniform(self): - return self.channel_density_non_uniforms - def set_channelDensityNonUniform(self, channel_density_non_uniforms): - self.channel_density_non_uniforms = channel_density_non_uniforms - def add_channelDensityNonUniform(self, value): - self.channel_density_non_uniforms.append(value) - def insert_channelDensityNonUniform_at(self, index, value): - self.channel_density_non_uniforms.insert(index, value) - def replace_channelDensityNonUniform_at(self, index, value): - self.channel_density_non_uniforms[index] = value - def get_channelDensityNonUniformNernst(self): - return self.channel_density_non_uniform_nernsts - def set_channelDensityNonUniformNernst(self, channel_density_non_uniform_nernsts): - self.channel_density_non_uniform_nernsts = channel_density_non_uniform_nernsts - def add_channelDensityNonUniformNernst(self, value): - self.channel_density_non_uniform_nernsts.append(value) - def insert_channelDensityNonUniformNernst_at(self, index, value): - self.channel_density_non_uniform_nernsts.insert(index, value) - def replace_channelDensityNonUniformNernst_at(self, index, value): - self.channel_density_non_uniform_nernsts[index] = value - def get_channelDensityNonUniformGHK(self): - return self.channel_density_non_uniform_ghks - def set_channelDensityNonUniformGHK(self, channel_density_non_uniform_ghks): - self.channel_density_non_uniform_ghks = channel_density_non_uniform_ghks - def add_channelDensityNonUniformGHK(self, value): - self.channel_density_non_uniform_ghks.append(value) - def insert_channelDensityNonUniformGHK_at(self, index, value): - self.channel_density_non_uniform_ghks.insert(index, value) - def replace_channelDensityNonUniformGHK_at(self, index, value): - self.channel_density_non_uniform_ghks[index] = value - def get_spikeThresh(self): - return self.spike_threshes - def set_spikeThresh(self, spike_threshes): - self.spike_threshes = spike_threshes - def add_spikeThresh(self, value): - self.spike_threshes.append(value) - def insert_spikeThresh_at(self, index, value): - self.spike_threshes.insert(index, value) - def replace_spikeThresh_at(self, index, value): - self.spike_threshes[index] = value - def get_specificCapacitance(self): - return self.specific_capacitances - def set_specificCapacitance(self, specific_capacitances): - self.specific_capacitances = specific_capacitances - def add_specificCapacitance(self, value): - self.specific_capacitances.append(value) - def insert_specificCapacitance_at(self, index, value): - self.specific_capacitances.insert(index, value) - def replace_specificCapacitance_at(self, index, value): - self.specific_capacitances[index] = value - def get_initMembPotential(self): - return self.init_memb_potentials - def set_initMembPotential(self, init_memb_potentials): - self.init_memb_potentials = init_memb_potentials - def add_initMembPotential(self, value): - self.init_memb_potentials.append(value) - def insert_initMembPotential_at(self, index, value): - self.init_memb_potentials.insert(index, value) - def replace_initMembPotential_at(self, index, value): - self.init_memb_potentials[index] = value - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.channel_populations or @@ -5641,7 +4169,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('MembraneProperties') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5649,10 +4177,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'MembraneProperties': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5668,154 +4194,129 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for channelPopulation_ in self.channel_populations: - namespaceprefix_ = self.channel_populations_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_populations_nsprefix_) else '' channelPopulation_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelPopulation', pretty_print=pretty_print) for channelDensity_ in self.channel_densities: - namespaceprefix_ = self.channel_densities_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_densities_nsprefix_) else '' channelDensity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensity', pretty_print=pretty_print) for channelDensityVShift_ in self.channel_density_v_shifts: - namespaceprefix_ = self.channel_density_v_shifts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_v_shifts_nsprefix_) else '' channelDensityVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityVShift', pretty_print=pretty_print) for channelDensityNernst_ in self.channel_density_nernsts: - namespaceprefix_ = self.channel_density_nernsts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_nernsts_nsprefix_) else '' channelDensityNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernst', pretty_print=pretty_print) for channelDensityGHK_ in self.channel_density_ghks: - namespaceprefix_ = self.channel_density_ghks_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_ghks_nsprefix_) else '' channelDensityGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK', pretty_print=pretty_print) for channelDensityGHK2_ in self.channel_density_ghk2s: - namespaceprefix_ = self.channel_density_ghk2s_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_ghk2s_nsprefix_) else '' channelDensityGHK2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityGHK2', pretty_print=pretty_print) for channelDensityNonUniform_ in self.channel_density_non_uniforms: - namespaceprefix_ = self.channel_density_non_uniforms_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniforms_nsprefix_) else '' channelDensityNonUniform_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniform', pretty_print=pretty_print) for channelDensityNonUniformNernst_ in self.channel_density_non_uniform_nernsts: - namespaceprefix_ = self.channel_density_non_uniform_nernsts_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniform_nernsts_nsprefix_) else '' channelDensityNonUniformNernst_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformNernst', pretty_print=pretty_print) for channelDensityNonUniformGHK_ in self.channel_density_non_uniform_ghks: - namespaceprefix_ = self.channel_density_non_uniform_ghks_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_non_uniform_ghks_nsprefix_) else '' channelDensityNonUniformGHK_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNonUniformGHK', pretty_print=pretty_print) for spikeThresh_ in self.spike_threshes: - namespaceprefix_ = self.spike_threshes_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_threshes_nsprefix_) else '' spikeThresh_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeThresh', pretty_print=pretty_print) for specificCapacitance_ in self.specific_capacitances: - namespaceprefix_ = self.specific_capacitances_nsprefix_ + ':' if (UseCapturedNS_ and self.specific_capacitances_nsprefix_) else '' specificCapacitance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='specificCapacitance', pretty_print=pretty_print) for initMembPotential_ in self.init_memb_potentials: - namespaceprefix_ = self.init_memb_potentials_nsprefix_ + ':' if (UseCapturedNS_ and self.init_memb_potentials_nsprefix_) else '' initMembPotential_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='initMembPotential', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'channelPopulation': obj_ = ChannelPopulation.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_populations.append(obj_) obj_.original_tagname_ = 'channelPopulation' elif nodeName_ == 'channelDensity': class_obj_ = self.get_class_obj_(child_, ChannelDensity) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_densities.append(obj_) obj_.original_tagname_ = 'channelDensity' elif nodeName_ == 'channelDensityVShift': obj_ = ChannelDensityVShift.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_v_shifts.append(obj_) obj_.original_tagname_ = 'channelDensityVShift' elif nodeName_ == 'channelDensityNernst': class_obj_ = self.get_class_obj_(child_, ChannelDensityNernst) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_nernsts.append(obj_) obj_.original_tagname_ = 'channelDensityNernst' elif nodeName_ == 'channelDensityGHK': obj_ = ChannelDensityGHK.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_ghks.append(obj_) obj_.original_tagname_ = 'channelDensityGHK' elif nodeName_ == 'channelDensityGHK2': obj_ = ChannelDensityGHK2.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_ghk2s.append(obj_) obj_.original_tagname_ = 'channelDensityGHK2' elif nodeName_ == 'channelDensityNonUniform': obj_ = ChannelDensityNonUniform.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_non_uniforms.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniform' elif nodeName_ == 'channelDensityNonUniformNernst': obj_ = ChannelDensityNonUniformNernst.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_non_uniform_nernsts.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformNernst' elif nodeName_ == 'channelDensityNonUniformGHK': obj_ = ChannelDensityNonUniformGHK.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_non_uniform_ghks.append(obj_) obj_.original_tagname_ = 'channelDensityNonUniformGHK' elif nodeName_ == 'spikeThresh': obj_ = SpikeThresh.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_threshes.append(obj_) obj_.original_tagname_ = 'spikeThresh' elif nodeName_ == 'specificCapacitance': obj_ = SpecificCapacitance.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.specific_capacitances.append(obj_) obj_.original_tagname_ = 'specificCapacitance' elif nodeName_ == 'initMembPotential': obj_ = InitMembPotential.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.init_memb_potentials.append(obj_) obj_.original_tagname_ = 'initMembPotential' # end class MembraneProperties class MembraneProperties2CaPools(MembraneProperties): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('channel_density_nernst_ca2s', 'ChannelDensityNernstCa2', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'channelDensityNernstCa2', 'type': 'ChannelDensityNernstCa2'}, None), + MemberSpec_('channel_density_nernst_ca2s', 'ChannelDensityNernstCa2', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ChannelDensityNernstCa2', u'name': u'channelDensityNernstCa2', u'minOccurs': u'0'}, None), ] subclass = None superclass = MembraneProperties - def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, channel_density_nernst_ca2s=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, channel_populations=None, channel_densities=None, channel_density_v_shifts=None, channel_density_nernsts=None, channel_density_ghks=None, channel_density_ghk2s=None, channel_density_non_uniforms=None, channel_density_non_uniform_nernsts=None, channel_density_non_uniform_ghks=None, spike_threshes=None, specific_capacitances=None, init_memb_potentials=None, channel_density_nernst_ca2s=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("MembraneProperties2CaPools"), self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) + super(MembraneProperties2CaPools, self).__init__(channel_populations, channel_densities, channel_density_v_shifts, channel_density_nernsts, channel_density_ghks, channel_density_ghk2s, channel_density_non_uniforms, channel_density_non_uniform_nernsts, channel_density_non_uniform_ghks, spike_threshes, specific_capacitances, init_memb_potentials, **kwargs_) if channel_density_nernst_ca2s is None: self.channel_density_nernst_ca2s = [] else: self.channel_density_nernst_ca2s = channel_density_nernst_ca2s - self.channel_density_nernst_ca2s_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -5827,20 +4328,6 @@ def factory(*args_, **kwargs_): else: return MembraneProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_channelDensityNernstCa2(self): - return self.channel_density_nernst_ca2s - def set_channelDensityNernstCa2(self, channel_density_nernst_ca2s): - self.channel_density_nernst_ca2s = channel_density_nernst_ca2s - def add_channelDensityNernstCa2(self, value): - self.channel_density_nernst_ca2s.append(value) - def insert_channelDensityNernstCa2_at(self, index, value): - self.channel_density_nernst_ca2s.insert(index, value) - def replace_channelDensityNernstCa2_at(self, index, value): - self.channel_density_nernst_ca2s[index] = value def hasContent_(self): if ( self.channel_density_nernst_ca2s or @@ -5849,7 +4336,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties2CaPools', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties2CaPools', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('MembraneProperties2CaPools') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -5857,10 +4344,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'MembraneProperties2CaPools': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -5874,32 +4359,27 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MembraneProperties2CaPools'): super(MembraneProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MembraneProperties2CaPools') - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='MembraneProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(MembraneProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MembraneProperties2CaPools', fromsubclass_=False, pretty_print=True): + super(MembraneProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for channelDensityNernstCa2_ in self.channel_density_nernst_ca2s: - namespaceprefix_ = self.channel_density_nernst_ca2s_nsprefix_ + ':' if (UseCapturedNS_ and self.channel_density_nernst_ca2s_nsprefix_) else '' channelDensityNernstCa2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='channelDensityNernstCa2', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(MembraneProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'channelDensityNernstCa2': obj_ = ChannelDensityNernstCa2.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.channel_density_nernst_ca2s.append(obj_) obj_.original_tagname_ = 'channelDensityNernstCa2' super(MembraneProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) @@ -5907,26 +4387,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ValueAcrossSegOrSegGroup(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('value', 'Nml2Quantity', 0, 1, {'use': 'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('value', 'Nml2Quantity', 0, 1, {'use': u'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, value=None, segment_groups='all', segments=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(None, segments) - self.segments_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -5939,46 +4412,20 @@ def factory(*args_, **kwargs_): else: return ValueAcrossSegOrSegGroup(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_value(self): - return self.value - def set_value(self, value): - self.value = value - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity(self, value): # Validate type Nml2Quantity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_patterns_, )) - validate_Nml2Quantity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_patterns_, )) + validate_Nml2Quantity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*([_a-zA-Z0-9])*$']] def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( @@ -5994,10 +4441,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ValueAcrossSegOrSegGroup': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6011,33 +4456,25 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ValueAcrossSegOrSegGroup'): if self.value is not None and 'value' not in already_processed: already_processed.add('value') - outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) + outfile.write(' value=%s' % (quote_attrib(self.value), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ValueAcrossSegOrSegGroup', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('value', node) @@ -6059,32 +4496,25 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class ValueAcrossSegOrSegGroup class VariableParameter(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('parameter', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('segment_groups', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('inhomogeneous_value', 'InhomogeneousValue', 0, 1, {'minOccurs': '0', 'name': 'inhomogeneousValue', 'type': 'InhomogeneousValue'}, None), + MemberSpec_('parameter', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('segment_groups', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('inhomogeneous_value', 'InhomogeneousValue', 0, 1, {u'type': u'InhomogeneousValue', u'name': u'inhomogeneousValue', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, parameter=None, segment_groups=None, inhomogeneous_value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, parameter=None, segment_groups=None, inhomogeneous_value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.parameter = _cast(None, parameter) - self.parameter_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.inhomogeneous_value = inhomogeneous_value - self.inhomogeneous_value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6096,22 +4526,6 @@ def factory(*args_, **kwargs_): else: return VariableParameter(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_inhomogeneousValue(self): - return self.inhomogeneous_value - def set_inhomogeneousValue(self, inhomogeneous_value): - self.inhomogeneous_value = inhomogeneous_value - def get_parameter(self): - return self.parameter - def set_parameter(self, parameter): - self.parameter = parameter - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups def hasContent_(self): if ( self.inhomogeneous_value is not None @@ -6119,7 +4533,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='VariableParameter', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VariableParameter', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('VariableParameter') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -6127,10 +4541,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'VariableParameter': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6149,24 +4561,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.segment_groups is not None and 'segment_groups' not in already_processed: already_processed.add('segment_groups') outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='VariableParameter', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VariableParameter', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.inhomogeneous_value is not None: - namespaceprefix_ = self.inhomogeneous_value_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneous_value_nsprefix_) else '' self.inhomogeneous_value.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousValue', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('parameter', node) @@ -6177,33 +4584,27 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'segmentGroup' not in already_processed: already_processed.add('segmentGroup') self.segment_groups = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'inhomogeneousValue': obj_ = InhomogeneousValue.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.inhomogeneous_value = obj_ obj_.original_tagname_ = 'inhomogeneousValue' # end class VariableParameter class InhomogeneousValue(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('inhomogeneous_parameters', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('value', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('inhomogeneous_parameters', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('value', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, inhomogeneous_parameters=None, value=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, inhomogeneous_parameters=None, value=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.inhomogeneous_parameters = _cast(None, inhomogeneous_parameters) - self.inhomogeneous_parameters_nsprefix_ = None self.value = _cast(None, value) - self.value_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6215,18 +4616,6 @@ def factory(*args_, **kwargs_): else: return InhomogeneousValue(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_inhomogeneousParameter(self): - return self.inhomogeneous_parameters - def set_inhomogeneousParameter(self, inhomogeneous_parameters): - self.inhomogeneous_parameters = inhomogeneous_parameters - def get_value(self): - return self.value - def set_value(self, value): - self.value = value def hasContent_(self): if ( @@ -6242,10 +4631,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InhomogeneousValue': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6265,16 +4652,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InhomogeneousValue', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('inhomogeneousParameter', node) @@ -6285,42 +4668,33 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'value' not in already_processed: already_processed.add('value') self.value = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class InhomogeneousValue class Species(ValueAcrossSegOrSegGroup): - """Specifying the ion here again is redundant, the ion name should be the - same as id. Kept for now - until LEMS implementation can select by id. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ + """Specifying the ion here again is redundant, the ion name should be + the same as id. Kept for now until LEMS implementation can + select by id. TODO: remove.""" member_data_items_ = [ - MemberSpec_('id', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('concentration_model', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('ion', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('initial_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('initial_ext_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), + MemberSpec_('id', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('concentration_model', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('initial_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('initial_ext_concentration', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, id=None, concentration_model=None, ion=None, initial_concentration=None, initial_ext_concentration=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, id=None, concentration_model=None, ion=None, initial_concentration=None, initial_ext_concentration=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Species"), self).__init__(value, segment_groups, segments, **kwargs_) + super(Species, self).__init__(value, segment_groups, segments, **kwargs_) self.id = _cast(None, id) - self.id_nsprefix_ = None self.concentration_model = _cast(None, concentration_model) - self.concentration_model_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None self.initial_concentration = _cast(None, initial_concentration) - self.initial_concentration_nsprefix_ = None self.initial_ext_concentration = _cast(None, initial_ext_concentration) - self.initial_ext_concentration_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6332,52 +4706,20 @@ def factory(*args_, **kwargs_): else: return Species(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_id(self): - return self.id - def set_id(self, id): - self.id = id - def get_concentrationModel(self): - return self.concentration_model - def set_concentrationModel(self, concentration_model): - self.concentration_model = concentration_model - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion - def get_initialConcentration(self): - return self.initial_concentration - def set_initialConcentration(self, initial_concentration): - self.initial_concentration = initial_concentration - def get_initialExtConcentration(self): - return self.initial_ext_concentration - def set_initialExtConcentration(self, initial_ext_concentration): - self.initial_ext_concentration = initial_ext_concentration def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] def hasContent_(self): if ( super(Species, self).hasContent_() @@ -6393,10 +4735,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Species': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6411,32 +4751,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Species, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Species') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), )) + outfile.write(' id=%s' % (quote_attrib(self.id), )) if self.concentration_model is not None and 'concentration_model' not in already_processed: already_processed.add('concentration_model') - outfile.write(' concentrationModel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.concentration_model), input_name='concentrationModel')), )) + outfile.write(' concentrationModel=%s' % (quote_attrib(self.concentration_model), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) if self.initial_concentration is not None and 'initial_concentration' not in already_processed: already_processed.add('initial_concentration') - outfile.write(' initialConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initial_concentration), input_name='initialConcentration')), )) + outfile.write(' initialConcentration=%s' % (quote_attrib(self.initial_concentration), )) if self.initial_ext_concentration is not None and 'initial_ext_concentration' not in already_processed: already_processed.add('initial_ext_concentration') - outfile.write(' initialExtConcentration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initial_ext_concentration), input_name='initialExtConcentration')), )) + outfile.write(' initialExtConcentration=%s' % (quote_attrib(self.initial_ext_concentration), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Species', fromsubclass_=False, pretty_print=True): - super(Species, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Species, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) @@ -6465,36 +4801,30 @@ def buildAttributes(self, node, attrs, already_processed): self.initial_ext_concentration = value self.validate_Nml2Quantity_concentration(self.initial_ext_concentration) # validate type Nml2Quantity_concentration super(Species, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Species, self).buildChildren(child_, node, nodeName_, True) pass # end class Species class IntracellularProperties(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), - MemberSpec_('resistivities', 'Resistivity', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'resistivity', 'type': 'Resistivity'}, None), + MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), + MemberSpec_('resistivities', 'Resistivity', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Resistivity', u'name': u'resistivity', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, species=None, resistivities=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, species=None, resistivities=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None if species is None: self.species = [] else: self.species = species - self.species_nsprefix_ = None if resistivities is None: self.resistivities = [] else: self.resistivities = resistivities - self.resistivities_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -6507,32 +4837,6 @@ def factory(*args_, **kwargs_): else: return IntracellularProperties(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def add_species(self, value): - self.species.append(value) - def insert_species_at(self, index, value): - self.species.insert(index, value) - def replace_species_at(self, index, value): - self.species[index] = value - def get_resistivity(self): - return self.resistivities - def set_resistivity(self, resistivities): - self.resistivities = resistivities - def add_resistivity(self, value): - self.resistivities.append(value) - def insert_resistivity_at(self, index, value): - self.resistivities.insert(index, value) - def replace_resistivity_at(self, index, value): - self.resistivities[index] = value - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.species or @@ -6541,7 +4845,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='IntracellularProperties', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('IntracellularProperties') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -6549,10 +4853,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IntracellularProperties': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6568,66 +4870,52 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='IntracellularProperties', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: - namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) for resistivity_ in self.resistivities: - namespaceprefix_ = self.resistivities_nsprefix_ + ':' if (UseCapturedNS_ and self.resistivities_nsprefix_) else '' resistivity_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='resistivity', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.species.append(obj_) obj_.original_tagname_ = 'species' elif nodeName_ == 'resistivity': obj_ = Resistivity.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.resistivities.append(obj_) obj_.original_tagname_ = 'resistivity' # end class IntracellularProperties class IntracellularProperties2CaPools(IntracellularProperties): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = IntracellularProperties - def __init__(self, species=None, resistivities=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, species=None, resistivities=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IntracellularProperties2CaPools"), self).__init__(species, resistivities, **kwargs_) + super(IntracellularProperties2CaPools, self).__init__(species, resistivities, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6639,10 +4927,6 @@ def factory(*args_, **kwargs_): else: return IntracellularProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IntracellularProperties2CaPools, self).hasContent_() @@ -6658,10 +4942,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IntracellularProperties2CaPools': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6676,44 +4958,35 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IntracellularProperties2CaPools'): super(IntracellularProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IntracellularProperties2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IntracellularProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(IntracellularProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IntracellularProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IntracellularProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IntracellularProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) pass # end class IntracellularProperties2CaPools class ExtracellularPropertiesLocal(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), + MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), ] subclass = None superclass = None - def __init__(self, species=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, species=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None if species is None: self.species = [] else: self.species = species - self.species_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6725,20 +4998,6 @@ def factory(*args_, **kwargs_): else: return ExtracellularPropertiesLocal(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def add_species(self, value): - self.species.append(value) - def insert_species_at(self, index, value): - self.species.insert(index, value) - def replace_species_at(self, index, value): - self.species[index] = value def hasContent_(self): if ( self.species @@ -6746,7 +5005,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ExtracellularPropertiesLocal', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularPropertiesLocal', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('ExtracellularPropertiesLocal') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -6754,10 +5013,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExtracellularPropertiesLocal': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6771,66 +5028,51 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExtracellularPropertiesLocal'): pass - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='ExtracellularPropertiesLocal', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularPropertiesLocal', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: - namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): pass - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.species.append(obj_) obj_.original_tagname_ = 'species' # end class ExtracellularPropertiesLocal class SpaceStructure(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('x_spacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('y_spacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('z_spacing', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('x_start', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('y_start', 'xs:float', 0, 1, {'use': 'optional'}), - MemberSpec_('z_start', 'xs:float', 0, 1, {'use': 'optional'}), + MemberSpec_('y_spacing', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('z_spacing', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('x_start', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('y_start', 'xs:float', 0, 1, {'use': u'optional'}), + MemberSpec_('z_start', 'xs:float', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, x_spacing=None, y_spacing=None, z_spacing=None, x_start=0, y_start=0, z_start=0, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, x_spacing=None, y_spacing=None, z_spacing=None, x_start=0, y_start=0, z_start=0, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.x_spacing = _cast(float, x_spacing) - self.x_spacing_nsprefix_ = None self.y_spacing = _cast(float, y_spacing) - self.y_spacing_nsprefix_ = None self.z_spacing = _cast(float, z_spacing) - self.z_spacing_nsprefix_ = None self.x_start = _cast(float, x_start) - self.x_start_nsprefix_ = None self.y_start = _cast(float, y_start) - self.y_start_nsprefix_ = None self.z_start = _cast(float, z_start) - self.z_start_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -6842,34 +5084,6 @@ def factory(*args_, **kwargs_): else: return SpaceStructure(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_xSpacing(self): - return self.x_spacing - def set_xSpacing(self, x_spacing): - self.x_spacing = x_spacing - def get_ySpacing(self): - return self.y_spacing - def set_ySpacing(self, y_spacing): - self.y_spacing = y_spacing - def get_zSpacing(self): - return self.z_spacing - def set_zSpacing(self, z_spacing): - self.z_spacing = z_spacing - def get_xStart(self): - return self.x_start - def set_xStart(self, x_start): - self.x_start = x_start - def get_yStart(self): - return self.y_start - def set_yStart(self, y_start): - self.y_start = y_start - def get_zStart(self): - return self.z_start - def set_zStart(self, z_start): - self.z_start = z_start def hasContent_(self): if ( @@ -6885,10 +5099,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpaceStructure': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -6920,77 +5132,77 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' zStart="%s"' % self.gds_format_float(self.z_start, input_name='zStart')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpaceStructure', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xSpacing', node) if value is not None and 'xSpacing' not in already_processed: already_processed.add('xSpacing') - value = self.gds_parse_float(value, node, 'xSpacing') - self.x_spacing = value + try: + self.x_spacing = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (xSpacing): %s' % exp) value = find_attr_value_('ySpacing', node) if value is not None and 'ySpacing' not in already_processed: already_processed.add('ySpacing') - value = self.gds_parse_float(value, node, 'ySpacing') - self.y_spacing = value + try: + self.y_spacing = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (ySpacing): %s' % exp) value = find_attr_value_('zSpacing', node) if value is not None and 'zSpacing' not in already_processed: already_processed.add('zSpacing') - value = self.gds_parse_float(value, node, 'zSpacing') - self.z_spacing = value + try: + self.z_spacing = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (zSpacing): %s' % exp) value = find_attr_value_('xStart', node) if value is not None and 'xStart' not in already_processed: already_processed.add('xStart') - value = self.gds_parse_float(value, node, 'xStart') - self.x_start = value + try: + self.x_start = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (xStart): %s' % exp) value = find_attr_value_('yStart', node) if value is not None and 'yStart' not in already_processed: already_processed.add('yStart') - value = self.gds_parse_float(value, node, 'yStart') - self.y_start = value + try: + self.y_start = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (yStart): %s' % exp) value = find_attr_value_('zStart', node) if value is not None and 'zStart' not in already_processed: already_processed.add('zStart') - value = self.gds_parse_float(value, node, 'zStart') - self.z_start = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + try: + self.z_start = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (zStart): %s' % exp) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class SpaceStructure class Layout(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('spaces', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('random', 'RandomLayout', 0, 0, {'name': 'random', 'type': 'RandomLayout'}, 5), - MemberSpec_('grid', 'GridLayout', 0, 0, {'name': 'grid', 'type': 'GridLayout'}, 5), - MemberSpec_('unstructured', 'UnstructuredLayout', 0, 0, {'name': 'unstructured', 'type': 'UnstructuredLayout'}, 5), + MemberSpec_('random', 'RandomLayout', 0, 0, {u'type': u'RandomLayout', u'name': u'random'}, 5), + MemberSpec_('grid', 'GridLayout', 0, 0, {u'type': u'GridLayout', u'name': u'grid'}, 5), + MemberSpec_('unstructured', 'UnstructuredLayout', 0, 0, {u'type': u'UnstructuredLayout', u'name': u'unstructured'}, 5), ] subclass = None superclass = None - def __init__(self, spaces=None, random=None, grid=None, unstructured=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, spaces=None, random=None, grid=None, unstructured=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.spaces = _cast(None, spaces) - self.spaces_nsprefix_ = None self.random = random - self.random_nsprefix_ = None self.grid = grid - self.grid_nsprefix_ = None self.unstructured = unstructured - self.unstructured_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7002,37 +5214,13 @@ def factory(*args_, **kwargs_): else: return Layout(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_random(self): - return self.random - def set_random(self, random): - self.random = random - def get_grid(self): - return self.grid - def set_grid(self, grid): - self.grid = grid - def get_unstructured(self): - return self.unstructured - def set_unstructured(self, unstructured): - self.unstructured = unstructured - def get_space(self): - return self.spaces - def set_space(self, spaces): - self.spaces = spaces def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.random is not None or @@ -7042,7 +5230,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Layout', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Layout', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Layout') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -7050,10 +5238,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Layout': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7068,31 +5254,24 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Layout'): if self.spaces is not None and 'spaces' not in already_processed: already_processed.add('spaces') - outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spaces), input_name='space')), )) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Layout', fromsubclass_=False, pretty_print=True): + outfile.write(' space=%s' % (quote_attrib(self.spaces), )) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Layout', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.random is not None: - namespaceprefix_ = self.random_nsprefix_ + ':' if (UseCapturedNS_ and self.random_nsprefix_) else '' self.random.export(outfile, level, namespaceprefix_, namespacedef_='', name_='random', pretty_print=pretty_print) if self.grid is not None: - namespaceprefix_ = self.grid_nsprefix_ + ':' if (UseCapturedNS_ and self.grid_nsprefix_) else '' self.grid.export(outfile, level, namespaceprefix_, namespacedef_='', name_='grid', pretty_print=pretty_print) if self.unstructured is not None: - namespaceprefix_ = self.unstructured_nsprefix_ + ':' if (UseCapturedNS_ and self.unstructured_nsprefix_) else '' self.unstructured.export(outfile, level, namespaceprefix_, namespacedef_='', name_='unstructured', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) @@ -7100,40 +5279,35 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('space') self.spaces = value self.validate_NmlId(self.spaces) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'random': obj_ = RandomLayout.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.random = obj_ obj_.original_tagname_ = 'random' elif nodeName_ == 'grid': obj_ = GridLayout.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.grid = obj_ obj_.original_tagname_ = 'grid' elif nodeName_ == 'unstructured': obj_ = UnstructuredLayout.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.unstructured = obj_ obj_.original_tagname_ = 'unstructured' # end class Layout class UnstructuredLayout(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('number', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, number=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, number=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.number = _cast(int, number) - self.number_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7145,14 +5319,6 @@ def factory(*args_, **kwargs_): else: return UnstructuredLayout(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_number(self): - return self.number - def set_number(self, number): - self.number = number def hasContent_(self): if ( @@ -7168,10 +5334,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='U eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'UnstructuredLayout': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7188,47 +5352,40 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='UnstructuredLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - self.number = self.gds_parse_integer(value, node, 'number') + try: + self.number = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class UnstructuredLayout class RandomLayout(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('number', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('regions', 'NmlId', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, number=None, regions=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, number=None, regions=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.number = _cast(int, number) - self.number_nsprefix_ = None self.regions = _cast(None, regions) - self.regions_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7240,29 +5397,13 @@ def factory(*args_, **kwargs_): else: return RandomLayout(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_number(self): - return self.number - def set_number(self, number): - self.number = number - def get_region(self): - return self.regions - def set_region(self, regions): - self.regions = regions def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( @@ -7278,10 +5419,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'RandomLayout': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7298,25 +5437,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) if self.regions is not None and 'regions' not in already_processed: already_processed.add('regions') - outfile.write(' region=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.regions), input_name='region')), )) + outfile.write(' region=%s' % (quote_attrib(self.regions), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RandomLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - self.number = self.gds_parse_integer(value, node, 'number') + try: + self.number = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('region', node) @@ -7324,32 +5462,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('region') self.regions = value self.validate_NmlId(self.regions) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class RandomLayout class GridLayout(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('x_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('y_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('z_size', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), + MemberSpec_('y_size', 'xs:nonNegativeInteger', 0, 1, {'use': u'optional'}), + MemberSpec_('z_size', 'xs:nonNegativeInteger', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, x_size=None, y_size=None, z_size=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, x_size=None, y_size=None, z_size=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.x_size = _cast(int, x_size) - self.x_size_nsprefix_ = None self.y_size = _cast(int, y_size) - self.y_size_nsprefix_ = None self.z_size = _cast(int, z_size) - self.z_size_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7361,22 +5492,6 @@ def factory(*args_, **kwargs_): else: return GridLayout(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_xSize(self): - return self.x_size - def set_xSize(self, x_size): - self.x_size = x_size - def get_ySize(self): - return self.y_size - def set_ySize(self, y_size): - self.y_size = y_size - def get_zSize(self): - return self.z_size - def set_zSize(self, z_size): - self.z_size = z_size def hasContent_(self): if ( @@ -7392,10 +5507,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GridLayout': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7418,68 +5531,64 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' zSize="%s"' % self.gds_format_integer(self.z_size, input_name='zSize')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GridLayout', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xSize', node) if value is not None and 'xSize' not in already_processed: already_processed.add('xSize') - self.x_size = self.gds_parse_integer(value, node, 'xSize') + try: + self.x_size = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.x_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('ySize', node) if value is not None and 'ySize' not in already_processed: already_processed.add('ySize') - self.y_size = self.gds_parse_integer(value, node, 'ySize') + try: + self.y_size = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.y_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('zSize', node) if value is not None and 'zSize' not in already_processed: already_processed.add('zSize') - self.z_size = self.gds_parse_integer(value, node, 'zSize') + try: + self.z_size = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.z_size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class GridLayout class Instance(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ MemberSpec_('id', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('i', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('j', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('k', 'xs:nonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('location', 'Location', 0, 0, {'name': 'location', 'type': 'Location'}, None), + MemberSpec_('location', 'Location', 0, 0, {u'type': u'Location', u'name': u'location'}, None), ] subclass = None superclass = None - def __init__(self, id=None, i=None, j=None, k=None, location=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, id=None, i=None, j=None, k=None, location=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.id = _cast(int, id) - self.id_nsprefix_ = None self.i = _cast(int, i) - self.i_nsprefix_ = None self.j = _cast(int, j) - self.j_nsprefix_ = None self.k = _cast(int, k) - self.k_nsprefix_ = None self.location = location - self.location_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7491,30 +5600,6 @@ def factory(*args_, **kwargs_): else: return Instance(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_location(self): - return self.location - def set_location(self, location): - self.location = location - def get_id(self): - return self.id - def set_id(self, id): - self.id = id - def get_i(self): - return self.i - def set_i(self, i): - self.i = i - def get_j(self): - return self.j - def set_j(self, j): - self.j = j - def get_k(self): - return self.k - def set_k(self, k): - self.k = k def hasContent_(self): if ( self.location is not None @@ -7522,7 +5607,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Instance', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Instance', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Instance') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -7530,10 +5615,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Instance': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7558,54 +5641,61 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.k is not None and 'k' not in already_processed: already_processed.add('k') outfile.write(' k="%s"' % self.gds_format_integer(self.k, input_name='k')) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Instance', fromsubclass_=False, pretty_print=True): + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Instance', fromsubclass_=False, pretty_print=True): if pretty_print: eol_ = '\n' else: eol_ = '' if self.location is not None: - namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else '' self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - self.id = self.gds_parse_integer(value, node, 'id') + try: + self.id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('i', node) if value is not None and 'i' not in already_processed: already_processed.add('i') - self.i = self.gds_parse_integer(value, node, 'i') + try: + self.i = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.i < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('j', node) if value is not None and 'j' not in already_processed: already_processed.add('j') - self.j = self.gds_parse_integer(value, node, 'j') + try: + self.j = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.j < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') value = find_attr_value_('k', node) if value is not None and 'k' not in already_processed: already_processed.add('k') - self.k = self.gds_parse_integer(value, node, 'k') + try: + self.k = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.k < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'location': obj_ = Location.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.location = obj_ obj_.original_tagname_ = 'location' @@ -7622,26 +5712,19 @@ def __repr__(self): class Location(GeneratedsSuper): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('x', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('y', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('z', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('x', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('y', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('z', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = None - def __init__(self, x=None, y=None, z=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, x=None, y=None, z=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.x = _cast(float, x) - self.x_nsprefix_ = None self.y = _cast(float, y) - self.y_nsprefix_ = None self.z = _cast(float, z) - self.z_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7653,22 +5736,6 @@ def factory(*args_, **kwargs_): else: return Location(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_x(self): - return self.x - def set_x(self, x): - self.x = x - def get_y(self): - return self.y - def set_y(self, y): - self.y = y - def get_z(self): - return self.z - def set_z(self, z): - self.z = z def hasContent_(self): if ( @@ -7684,10 +5751,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Location': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7710,34 +5775,36 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' z="%s"' % self.gds_format_float(self.z, input_name='z')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Location', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('x', node) if value is not None and 'x' not in already_processed: already_processed.add('x') - value = self.gds_parse_float(value, node, 'x') - self.x = value + try: + self.x = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (x): %s' % exp) value = find_attr_value_('y', node) if value is not None and 'y' not in already_processed: already_processed.add('y') - value = self.gds_parse_float(value, node, 'y') - self.y = value + try: + self.y = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (y): %s' % exp) value = find_attr_value_('z', node) if value is not None and 'z' not in already_processed: already_processed.add('z') - value = self.gds_parse_float(value, node, 'z') - self.z = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + try: + self.z = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (z): %s' % exp) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass def _format(self,value): @@ -7759,32 +5826,24 @@ def __repr__(self): class SynapticConnection(GeneratedsSuper): - """Single explicit connection. Introduced to test connections in LEMS. Will - probably be removed in favour of - connections wrapped in projection element""" - __hash__ = GeneratedsSuper.__hash__ + """Single explicit connection. Introduced to test connections in LEMS. + Will probably be removed in favour of connections wrapped in + projection element""" member_data_items_ = [ - MemberSpec_('from_', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('to', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('destination', 'NmlId', 0, 1, {'use': 'optional'}), + MemberSpec_('from_', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('to', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('destination', 'NmlId', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, from_=None, to=None, synapse=None, destination=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, from_=None, to=None, synapse=None, destination=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.from_ = _cast(None, from_) - self.from__nsprefix_ = None self.to = _cast(None, to) - self.to_nsprefix_ = None self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None self.destination = _cast(None, destination) - self.destination_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7796,37 +5855,13 @@ def factory(*args_, **kwargs_): else: return SynapticConnection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse - def get_destination(self): - return self.destination - def set_destination(self, destination): - self.destination = destination def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( @@ -7842,10 +5877,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SynapticConnection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -7868,19 +5901,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) if self.destination is not None and 'destination' not in already_processed: already_processed.add('destination') - outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) + outfile.write(' destination=%s' % (quote_attrib(self.destination), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SynapticConnection', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -7900,7 +5929,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('destination') self.destination = value self.validate_NmlId(self.destination) # validate type NmlId - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass def _get_cell_id(self,ref): @@ -7927,29 +5956,22 @@ def __str__(self): class ExplicitInput(GeneratedsSuper): - """Single explicit input. Introduced to test inputs in LEMS. Will probably - be removed in favour of - inputs wrapped in inputList element""" - __hash__ = GeneratedsSuper.__hash__ + """Single explicit input. Introduced to test inputs in LEMS. Will + probably be removed in favour of inputs wrapped in inputList + element""" member_data_items_ = [ - MemberSpec_('target', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('input', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('target', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('input', 'xs:string', 0, 0, {'use': u'required'}), MemberSpec_('destination', 'xs:string', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, target=None, input=None, destination=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, target=None, input=None, destination=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.target = _cast(None, target) - self.target_nsprefix_ = None self.input = _cast(None, input) - self.input_nsprefix_ = None self.destination = _cast(None, destination) - self.destination_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -7961,22 +5983,6 @@ def factory(*args_, **kwargs_): else: return ExplicitInput(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_target(self): - return self.target - def set_target(self, target): - self.target = target - def get_input(self): - return self.input - def set_input(self, input): - self.input = input - def get_destination(self): - return self.destination - def set_destination(self, destination): - self.destination = destination def hasContent_(self): if ( @@ -7992,10 +5998,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExplicitInput': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8018,16 +6022,12 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExplicitInput', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('target', node) @@ -8042,7 +6042,7 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'destination' not in already_processed: already_processed.add('destination') self.destination = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass def _get_cell_id(self, id_string): @@ -8093,32 +6093,23 @@ def __str__(self): class Input(GeneratedsSuper): """Individual input to the cell specified by target""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': 'required'}), - MemberSpec_('target', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('destination', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('target', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('destination', 'NmlId', 0, 0, {'use': u'required'}), MemberSpec_('segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = None - def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.id = _cast(int, id) - self.id_nsprefix_ = None self.target = _cast(None, target) - self.target_nsprefix_ = None self.destination = _cast(None, destination) - self.destination_nsprefix_ = None self.segment_id = _cast(int, segment_id) - self.segment_id_nsprefix_ = None self.fraction_along = _cast(float, fraction_along) - self.fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8131,66 +6122,24 @@ def factory(*args_, **kwargs_): else: return Input(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_id(self): - return self.id - def set_id(self, id): - self.id = id - def get_target(self): - return self.target - def set_target(self, target): - self.target = target - def get_destination(self): - return self.destination - def set_destination(self, destination): - self.destination = destination - def get_segmentId(self): - return self.segment_id - def set_segmentId(self, segment_id): - self.segment_id = segment_id - def get_fractionAlong(self): - return self.fraction_along - def set_fractionAlong(self, fraction_along): - self.fraction_along = fraction_along - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value < 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) if value > 1: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) def hasContent_(self): if ( @@ -8206,10 +6155,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Input': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8223,45 +6170,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Input'): if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id="%s"' % self.gds_format_integer(self.id, input_name='id')) + outfile.write(' id=%s' % (quote_attrib(self.id), )) if self.target is not None and 'target' not in already_processed: already_processed.add('target') outfile.write(' target=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.target), input_name='target')), )) if self.destination is not None and 'destination' not in already_processed: already_processed.add('destination') - outfile.write(' destination=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.destination), input_name='destination')), )) + outfile.write(' destination=%s' % (quote_attrib(self.destination), )) if self.segment_id is not None and 'segment_id' not in already_processed: already_processed.add('segment_id') - outfile.write(' segmentId="%s"' % self.gds_format_integer(self.segment_id, input_name='segmentId')) + outfile.write(' segmentId=%s' % (quote_attrib(self.segment_id), )) if self.fraction_along is not None and 'fraction_along' not in already_processed: already_processed.add('fraction_along') - outfile.write(' fractionAlong="%s"' % self.gds_format_float(self.fraction_along, input_name='fractionAlong')) + outfile.write(' fractionAlong=%s' % (quote_attrib(self.fraction_along), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Input', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - self.id = self.gds_parse_integer(value, node, 'id') + try: + self.id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.id) # validate type NonNegativeInteger @@ -8277,21 +6219,26 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segmentId', node) if value is not None and 'segmentId' not in already_processed: already_processed.add('segmentId') - self.segment_id = self.gds_parse_integer(value, node, 'segmentId') + try: + self.segment_id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segment_id) # validate type NonNegativeInteger value = find_attr_value_('fractionAlong', node) if value is not None and 'fractionAlong' not in already_processed: already_processed.add('fractionAlong') - value = self.gds_parse_float(value, node, 'fractionAlong') - self.fraction_along = value + try: + self.fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (fractionAlong): %s' % exp) self.validate_ZeroToOne(self.fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass def _get_cell_id(self, id_string): @@ -8320,23 +6267,18 @@ def __str__(self): class InputW(Input): - """Individual input to the cell specified by target. Includes setting of - _weight for the connection""" - __hash__ = GeneratedsSuper.__hash__ + """Individual input to the cell specified by target. Includes setting + of _weight for the connection""" member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = Input - def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, weight=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, id=None, target=None, destination=None, segment_id=None, fraction_along=None, weight=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("InputW"), self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) + super(InputW, self).__init__(id, target, destination, segment_id, fraction_along, **kwargs_) self.weight = _cast(float, weight) - self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -8348,14 +6290,6 @@ def factory(*args_, **kwargs_): else: return InputW(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_weight(self): - return self.weight - def set_weight(self, weight): - self.weight = weight def hasContent_(self): if ( super(InputW, self).hasContent_() @@ -8371,10 +6305,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InputW': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8391,27 +6323,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InputW', fromsubclass_=False, pretty_print=True): - super(InputW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(InputW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - value = self.gds_parse_float(value, node, 'weight') - self.weight = value + try: + self.weight = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (weight): %s' % exp) super(InputW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(InputW, self).buildChildren(child_, node, nodeName_, True) pass @@ -8428,22 +6358,17 @@ def __str__(self): class BaseWithoutId(GeneratedsSuper): """Base element without ID specified *yet*, e.g. for an element with a - particular requirement on its id which does not comply with NmlId (e.g. - Segment needs nonNegativeInteger).""" - __hash__ = GeneratedsSuper.__hash__ + particular requirement on its id which does not comply with + NmlId (e.g. Segment needs nonNegativeInteger).""" member_data_items_ = [ - MemberSpec_('neuro_lex_id', 'NeuroLexId', 0, 1, {'use': 'optional'}), + MemberSpec_('neuro_lex_id', 'NeuroLexId', 0, 1, {'use': u'optional'}), ] subclass = None superclass = None - def __init__(self, neuro_lex_id=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None self.neuro_lex_id = _cast(None, neuro_lex_id) - self.neuro_lex_id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8456,27 +6381,13 @@ def factory(*args_, **kwargs_): else: return BaseWithoutId(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_neuroLexId(self): - return self.neuro_lex_id - def set_neuroLexId(self, neuro_lex_id): - self.neuro_lex_id = neuro_lex_id - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NeuroLexId(self, value): # Validate type NeuroLexId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NeuroLexId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NeuroLexId_patterns_, )) - validate_NeuroLexId_patterns_ = [['^([a-zA-Z0-9_:]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NeuroLexId_patterns_, )) + validate_NeuroLexId_patterns_ = [[u'^[a-zA-Z0-9_:]*$']] def hasContent_(self): if ( @@ -8492,10 +6403,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseWithoutId': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8509,27 +6418,19 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BaseWithoutId'): if self.neuro_lex_id is not None and 'neuro_lex_id' not in already_processed: already_processed.add('neuro_lex_id') - outfile.write(' neuroLexId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.neuro_lex_id), input_name='neuroLexId')), )) + outfile.write(' neuroLexId=%s' % (quote_attrib(self.neuro_lex_id), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseWithoutId', fromsubclass_=False, pretty_print=True): pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('neuroLexId', node) @@ -8541,29 +6442,24 @@ def buildAttributes(self, node, attrs, already_processed): if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): pass # end class BaseWithoutId class BaseNonNegativeIntegerId(BaseWithoutId): - """Anything which can have a unique (within its parent) id, which must be - an integer zero or greater.""" - __hash__ = GeneratedsSuper.__hash__ + """Anything which can have a unique (within its parent) id, which must + be an integer zero or greater.""" member_data_items_ = [ - MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': 'required'}), + MemberSpec_('id', 'NonNegativeInteger', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseWithoutId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseNonNegativeIntegerId"), self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + super(BaseNonNegativeIntegerId, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(int, id) - self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8576,23 +6472,9 @@ def factory(*args_, **kwargs_): else: return BaseNonNegativeIntegerId(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_id(self): - return self.id - def set_id(self, id): - self.id = id - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -8609,10 +6491,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseNonNegativeIntegerId': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8627,34 +6507,29 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseNonNegativeIntegerId, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseNonNegativeIntegerId') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id="%s"' % self.gds_format_integer(self.id, input_name='id')) + outfile.write(' id=%s' % (quote_attrib(self.id), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseNonNegativeIntegerId', fromsubclass_=False, pretty_print=True): - super(BaseNonNegativeIntegerId, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BaseNonNegativeIntegerId, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) if value is not None and 'id' not in already_processed: already_processed.add('id') - self.id = self.gds_parse_integer(value, node, 'id') + try: + self.id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.id) # validate type NonNegativeInteger @@ -8663,7 +6538,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseNonNegativeIntegerId, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseNonNegativeIntegerId, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseNonNegativeIntegerId @@ -8671,22 +6546,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Base(BaseWithoutId): """Anything which can have a unique (within its parent) id of the form - NmlId (spaceless combination of letters, numbers and underscore).""" - __hash__ = GeneratedsSuper.__hash__ + NmlId (spaceless combination of letters, numbers and + underscore).""" member_data_items_ = [ - MemberSpec_('id', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('id', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseWithoutId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Base"), self).__init__(neuro_lex_id, extensiontype_, **kwargs_) + super(Base, self).__init__(neuro_lex_id, extensiontype_, **kwargs_) self.id = _cast(None, id) - self.id_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8699,27 +6570,13 @@ def factory(*args_, **kwargs_): else: return Base(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_id(self): - return self.id - def set_id(self, id): - self.id = id - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( super(Base, self).hasContent_() @@ -8735,10 +6592,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Base': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8753,28 +6608,20 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Base, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Base') if self.id is not None and 'id' not in already_processed: already_processed.add('id') - outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), )) + outfile.write(' id=%s' % (quote_attrib(self.id), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Base', fromsubclass_=False, pretty_print=True): - super(Base, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Base, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('id', node) @@ -8787,7 +6634,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(Base, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Base, self).buildChildren(child_, node, nodeName_, True) pass # end class Base @@ -8796,34 +6643,26 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Standalone(Base): """Elements which can stand alone and be referenced by id, e.g. cell, morphology.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('metaid', 'MetaId', 0, 1, {'use': 'optional'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('properties', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), - MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), + MemberSpec_('metaid', 'MetaId', 0, 1, {'use': u'optional'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('properties', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Property', u'name': u'property', u'minOccurs': u'0'}, None), + MemberSpec_('annotation', 'Annotation', 0, 1, {u'type': u'Annotation', u'name': u'annotation', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Standalone"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(Standalone, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.metaid = _cast(None, metaid) - self.metaid_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None if properties is None: self.properties = [] else: self.properties = properties - self.properties_nsprefix_ = None self.annotation = annotation - self.annotation_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -8836,55 +6675,17 @@ def factory(*args_, **kwargs_): else: return Standalone(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_property(self): - return self.properties - def set_property(self, properties): - self.properties = properties - def add_property(self, value): - self.properties.append(value) - def insert_property_at(self, index, value): - self.properties.insert(index, value) - def replace_property_at(self, index, value): - self.properties[index] = value - def get_annotation(self): - return self.annotation - def set_annotation(self, annotation): - self.annotation = annotation - def get_metaid(self): - return self.metaid - def set_metaid(self, metaid): - self.metaid = metaid - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_MetaId(self, value): # Validate type MetaId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_MetaId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_MetaId_patterns_, )) - validate_MetaId_patterns_ = [['^([a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_MetaId_patterns_, )) + validate_MetaId_patterns_ = [[u'^[a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.notes is not None or @@ -8895,7 +6696,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Standalone', pretty_print=True): + def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Standalone', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('Standalone') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ @@ -8903,10 +6704,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Standalone': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -8922,41 +6721,30 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Standalone, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Standalone') if self.metaid is not None and 'metaid' not in already_processed: already_processed.add('metaid') - outfile.write(' metaid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.metaid), input_name='metaid')), )) + outfile.write(' metaid=%s' % (quote_attrib(self.metaid), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) - def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.neuroml.org/schema/neuroml2" ', name_='Standalone', fromsubclass_=False, pretty_print=True): - super(Standalone, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + outfile.write(' xsi:type="%s"' % self.extensiontype_) + def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Standalone', fromsubclass_=False, pretty_print=True): + super(Standalone, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) for property_ in self.properties: - namespaceprefix_ = self.properties_nsprefix_ + ':' if (UseCapturedNS_ and self.properties_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: - namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' self.annotation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='annotation', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('metaid', node) @@ -8969,23 +6757,21 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(Standalone, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.properties.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.annotation = obj_ obj_.original_tagname_ = 'annotation' super(Standalone, self).buildChildren(child_, node, nodeName_, True) @@ -8993,27 +6779,20 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpikeSourcePoisson(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('start', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('start', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, start=None, duration=None, rate=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, start=None, duration=None, rate=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeSourcePoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SpikeSourcePoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.start = _cast(None, start) - self.start_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.rate = _cast(None, rate) - self.rate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9025,44 +6804,20 @@ def factory(*args_, **kwargs_): else: return SpikeSourcePoisson(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_start(self): - return self.start - def set_start(self, start): - self.start = start - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_rate(self): - return self.rate - def set_rate(self, rate): - self.rate = rate def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def hasContent_(self): if ( super(SpikeSourcePoisson, self).hasContent_() @@ -9078,10 +6833,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeSourcePoisson': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9097,25 +6850,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeSourcePoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeSourcePoisson') if self.start is not None and 'start' not in already_processed: already_processed.add('start') - outfile.write(' start=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start), input_name='start')), )) + outfile.write(' start=%s' % (quote_attrib(self.start), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.rate is not None and 'rate' not in already_processed: already_processed.add('rate') - outfile.write(' rate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rate), input_name='rate')), )) + outfile.write(' rate=%s' % (quote_attrib(self.rate), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeSourcePoisson', fromsubclass_=False, pretty_print=True): - super(SpikeSourcePoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SpikeSourcePoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('start', node) @@ -9134,7 +6883,7 @@ def buildAttributes(self, node, attrs, already_processed): self.rate = value self.validate_Nml2Quantity_pertime(self.rate) # validate type Nml2Quantity_pertime super(SpikeSourcePoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeSourcePoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeSourcePoisson @@ -9143,36 +6892,28 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class InputList(Base): """List of inputs to a population. Currents will be provided by the specified component.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('populations', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('input', 'Input', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'input', 'type': 'Input'}, None), - MemberSpec_('input_ws', 'InputW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputW', 'type': 'InputW'}, None), + MemberSpec_('populations', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('component', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('input', 'Input', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Input', u'name': u'input', u'minOccurs': u'0'}, None), + MemberSpec_('input_ws', 'InputW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InputW', u'name': u'inputW', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, populations=None, component=None, input=None, input_ws=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, populations=None, component=None, input=None, input_ws=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("InputList"), self).__init__(neuro_lex_id, id, **kwargs_) + super(InputList, self).__init__(neuro_lex_id, id, **kwargs_) self.populations = _cast(None, populations) - self.populations_nsprefix_ = None self.component = _cast(None, component) - self.component_nsprefix_ = None if input is None: self.input = [] else: self.input = input - self.input_nsprefix_ = None if input_ws is None: self.input_ws = [] else: self.input_ws = input_ws - self.input_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9184,49 +6925,13 @@ def factory(*args_, **kwargs_): else: return InputList(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_input(self): - return self.input - def set_input(self, input): - self.input = input - def add_input(self, value): - self.input.append(value) - def insert_input_at(self, index, value): - self.input.insert(index, value) - def replace_input_at(self, index, value): - self.input[index] = value - def get_inputW(self): - return self.input_ws - def set_inputW(self, input_ws): - self.input_ws = input_ws - def add_inputW(self, value): - self.input_ws.append(value) - def insert_inputW_at(self, index, value): - self.input_ws.insert(index, value) - def replace_inputW_at(self, index, value): - self.input_ws[index] = value - def get_population(self): - return self.populations - def set_population(self, populations): - self.populations = populations - def get_component(self): - return self.component - def set_component(self, component): - self.component = component def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.input or @@ -9244,10 +6949,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InputList': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9263,32 +6966,26 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(InputList, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InputList') if self.populations is not None and 'populations' not in already_processed: already_processed.add('populations') - outfile.write(' population=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.populations), input_name='population')), )) + outfile.write(' population=%s' % (quote_attrib(self.populations), )) if self.component is not None and 'component' not in already_processed: already_processed.add('component') - outfile.write(' component=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.component), input_name='component')), )) + outfile.write(' component=%s' % (quote_attrib(self.component), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InputList', fromsubclass_=False, pretty_print=True): - super(InputList, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(InputList, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for input_ in self.input: - namespaceprefix_ = self.input_nsprefix_ + ':' if (UseCapturedNS_ and self.input_nsprefix_) else '' input_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='input', pretty_print=pretty_print) for inputW_ in self.input_ws: - namespaceprefix_ = self.input_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.input_ws_nsprefix_) else '' inputW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputW', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('population', node) @@ -9302,16 +6999,16 @@ def buildAttributes(self, node, attrs, already_processed): self.component = value self.validate_NmlId(self.component) # validate type NmlId super(InputList, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'input': class_obj_ = self.get_class_obj_(child_, Input) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.input.append(obj_) obj_.original_tagname_ = 'input' elif nodeName_ == 'inputW': obj_ = InputW.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.input_ws.append(obj_) obj_.original_tagname_ = 'inputW' super(InputList, self).buildChildren(child_, node, nodeName_, True) @@ -9377,18 +7074,14 @@ def __str__(self): class BaseConnection(BaseNonNegativeIntegerId): """Base of all synaptic connections (chemical/electrical/analog, etc.) inside projections""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseConnection"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(BaseConnection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -9401,12 +7094,6 @@ def factory(*args_, **kwargs_): else: return BaseConnection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseConnection, self).hasContent_() @@ -9422,10 +7109,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseConnection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9441,24 +7126,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnection', fromsubclass_=False, pretty_print=True): - super(BaseConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BaseConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -9466,7 +7143,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseConnection, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnection @@ -9475,24 +7152,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class BaseProjection(Base): """Base for projection (set of synaptic connections) between two populations""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('presynaptic_population', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('postsynaptic_population', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('presynaptic_population', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('postsynaptic_population', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseProjection"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(BaseProjection, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.presynaptic_population = _cast(None, presynaptic_population) - self.presynaptic_population_nsprefix_ = None self.postsynaptic_population = _cast(None, postsynaptic_population) - self.postsynaptic_population_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -9505,31 +7176,13 @@ def factory(*args_, **kwargs_): else: return BaseProjection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_presynapticPopulation(self): - return self.presynaptic_population - def set_presynapticPopulation(self, presynaptic_population): - self.presynaptic_population = presynaptic_population - def get_postsynapticPopulation(self): - return self.postsynaptic_population - def set_postsynapticPopulation(self, postsynaptic_population): - self.postsynaptic_population = postsynaptic_population - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( super(BaseProjection, self).hasContent_() @@ -9545,10 +7198,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseProjection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9563,31 +7214,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseProjection') if self.presynaptic_population is not None and 'presynaptic_population' not in already_processed: already_processed.add('presynaptic_population') - outfile.write(' presynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.presynaptic_population), input_name='presynapticPopulation')), )) + outfile.write(' presynapticPopulation=%s' % (quote_attrib(self.presynaptic_population), )) if self.postsynaptic_population is not None and 'postsynaptic_population' not in already_processed: already_processed.add('postsynaptic_population') - outfile.write(' postsynapticPopulation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.postsynaptic_population), input_name='postsynapticPopulation')), )) + outfile.write(' postsynapticPopulation=%s' % (quote_attrib(self.postsynaptic_population), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseProjection', fromsubclass_=False, pretty_print=True): - super(BaseProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BaseProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('presynapticPopulation', node) @@ -9605,29 +7248,24 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseProjection, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseProjection class CellSet(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('select', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('select', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, select=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, select=None, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("CellSet"), self).__init__(neuro_lex_id, id, **kwargs_) + super(CellSet, self).__init__(neuro_lex_id, id, **kwargs_) self.select = _cast(None, select) - self.select_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -9643,18 +7281,6 @@ def factory(*args_, **kwargs_): else: return CellSet(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value - def get_select(self): - return self.select - def set_select(self, select): - self.select = select def hasContent_(self): if ( self.anytypeobjs_ or @@ -9671,10 +7297,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'CellSet': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9692,26 +7316,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('select') outfile.write(' select=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.select), input_name='select')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CellSet', fromsubclass_=False, pretty_print=True): - super(CellSet, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(CellSet, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('select', node) @@ -9719,47 +7336,38 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('select') self.select = value super(CellSet, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'CellSet') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'CellSet') + if obj_ is not None: + self.add_anytypeobjs_(obj_) super(CellSet, self).buildChildren(child_, node, nodeName_, True) # end class CellSet class Population(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('component', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('size', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('type', 'populationTypes', 0, 1, {'use': 'optional'}), - MemberSpec_('extracellular_properties', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('layout', 'Layout', 0, 1, {'minOccurs': '0', 'name': 'layout', 'type': 'Layout'}, 4), - MemberSpec_('instances', 'Instance', 1, 0, {'maxOccurs': 'unbounded', 'name': 'instance', 'type': 'Instance'}, 4), + MemberSpec_('component', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('size', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), + MemberSpec_('type', 'populationTypes', 0, 1, {'use': u'optional'}), + MemberSpec_('extracellular_properties', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('layout', 'Layout', 0, 1, {u'type': u'Layout', u'name': u'layout', u'minOccurs': u'0'}, 4), + MemberSpec_('instances', 'Instance', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Instance', u'name': u'instance'}, 4), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, component=None, size=None, type=None, extracellular_properties=None, layout=None, instances=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, component=None, size=None, type=None, extracellular_properties=None, layout=None, instances=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Population"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(Population, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.component = _cast(None, component) - self.component_nsprefix_ = None self.size = _cast(int, size) - self.size_nsprefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.extracellular_properties = _cast(None, extracellular_properties) - self.extracellular_properties_nsprefix_ = None self.layout = layout - self.layout_nsprefix_ = None if instances is None: self.instances = [] else: self.instances = instances - self.instances_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -9771,72 +7379,29 @@ def factory(*args_, **kwargs_): else: return Population(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_layout(self): - return self.layout - def set_layout(self, layout): - self.layout = layout - def get_instance(self): - return self.instances - def set_instance(self, instances): - self.instances = instances - def add_instance(self, value): - self.instances.append(value) - def insert_instance_at(self, index, value): - self.instances.insert(index, value) - def replace_instance_at(self, index, value): - self.instances[index] = value - def get_component(self): - return self.component - def set_component(self, component): - self.component = component - def get_size(self): - return self.size - def set_size(self, size): - self.size = size - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_extracellularProperties(self): - return self.extracellular_properties - def set_extracellularProperties(self, extracellular_properties): - self.extracellular_properties = extracellular_properties def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_populationTypes(self, value): # Validate type populationTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['population', 'populationList'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on populationTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on populationTypes' % {"value" : value.encode("utf-8")} ) def hasContent_(self): if ( self.layout is not None or @@ -9854,10 +7419,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Population': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -9873,38 +7436,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Population, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Population') if self.component is not None and 'component' not in already_processed: already_processed.add('component') - outfile.write(' component=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.component), input_name='component')), )) + outfile.write(' component=%s' % (quote_attrib(self.component), )) if self.size is not None and 'size' not in already_processed: already_processed.add('size') - outfile.write(' size="%s"' % self.gds_format_integer(self.size, input_name='size')) + outfile.write(' size=%s' % (quote_attrib(self.size), )) if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.extracellular_properties is not None and 'extracellular_properties' not in already_processed: already_processed.add('extracellular_properties') - outfile.write(' extracellularProperties=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.extracellular_properties), input_name='extracellularProperties')), )) + outfile.write(' extracellularProperties=%s' % (quote_attrib(self.extracellular_properties), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Population', fromsubclass_=False, pretty_print=True): - super(Population, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Population, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.layout is not None: - namespaceprefix_ = self.layout_nsprefix_ + ':' if (UseCapturedNS_ and self.layout_nsprefix_) else '' self.layout.export(outfile, level, namespaceprefix_, namespacedef_='', name_='layout', pretty_print=pretty_print) for instance_ in self.instances: - namespaceprefix_ = self.instances_nsprefix_ + ':' if (UseCapturedNS_ and self.instances_nsprefix_) else '' instance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='instance', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('component', node) @@ -9915,7 +7472,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('size', node) if value is not None and 'size' not in already_processed: already_processed.add('size') - self.size = self.gds_parse_integer(value, node, 'size') + try: + self.size = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.size < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.size) # validate type NonNegativeInteger @@ -9930,15 +7490,15 @@ def buildAttributes(self, node, attrs, already_processed): self.extracellular_properties = value self.validate_NmlId(self.extracellular_properties) # validate type NmlId super(Population, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'layout': obj_ = Layout.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.layout = obj_ obj_.original_tagname_ = 'layout' elif nodeName_ == 'instance': obj_ = Instance.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.instances.append(obj_) obj_.original_tagname_ = 'instance' super(Population, self).buildChildren(child_, node, nodeName_, True) @@ -9992,22 +7552,17 @@ def __str__(self): class Region(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spaces', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('spaces', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, spaces=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, spaces=None, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Region"), self).__init__(neuro_lex_id, id, **kwargs_) + super(Region, self).__init__(neuro_lex_id, id, **kwargs_) self.spaces = _cast(None, spaces) - self.spaces_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -10023,29 +7578,13 @@ def factory(*args_, **kwargs_): else: return Region(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value - def get_space(self): - return self.spaces - def set_space(self, spaces): - self.spaces = spaces def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -10062,10 +7601,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Region': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10081,28 +7618,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Region, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Region') if self.spaces is not None and 'spaces' not in already_processed: already_processed.add('spaces') - outfile.write(' space=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spaces), input_name='space')), )) + outfile.write(' space=%s' % (quote_attrib(self.spaces), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Region', fromsubclass_=False, pretty_print=True): - super(Region, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Region, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('space', node) @@ -10111,32 +7641,27 @@ def buildAttributes(self, node, attrs, already_processed): self.spaces = value self.validate_NmlId(self.spaces) # validate type NmlId super(Region, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'Region') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'Region') + if obj_ is not None: + self.add_anytypeobjs_(obj_) super(Region, self).buildChildren(child_, node, nodeName_, True) # end class Region class Space(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('based_on', 'allowedSpaces', 0, 1, {'use': 'optional'}), - MemberSpec_('structure', 'SpaceStructure', 0, 1, {'minOccurs': '0', 'name': 'structure', 'type': 'SpaceStructure'}, None), + MemberSpec_('based_on', 'allowedSpaces', 0, 1, {'use': u'optional'}), + MemberSpec_('structure', 'SpaceStructure', 0, 1, {u'type': u'SpaceStructure', u'name': u'structure', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, based_on=None, structure=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, based_on=None, structure=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Space"), self).__init__(neuro_lex_id, id, **kwargs_) + super(Space, self).__init__(neuro_lex_id, id, **kwargs_) self.based_on = _cast(None, based_on) - self.based_on_nsprefix_ = None self.structure = structure - self.structure_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10148,31 +7673,18 @@ def factory(*args_, **kwargs_): else: return Space(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_structure(self): - return self.structure - def set_structure(self, structure): - self.structure = structure - def get_basedOn(self): - return self.based_on - def set_basedOn(self, based_on): - self.based_on = based_on def validate_allowedSpaces(self, value): # Validate type allowedSpaces, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['Euclidean_1D', 'Euclidean_2D', 'Euclidean_3D', 'Grid_1D', 'Grid_2D', 'Grid_3D'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on allowedSpaces' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on allowedSpaces' % {"value" : value.encode("utf-8")} ) def hasContent_(self): if ( self.structure is not None or @@ -10189,10 +7701,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Space': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10208,26 +7718,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Space, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Space') if self.based_on is not None and 'based_on' not in already_processed: already_processed.add('based_on') - outfile.write(' basedOn=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.based_on), input_name='basedOn')), )) + outfile.write(' basedOn=%s' % (quote_attrib(self.based_on), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Space', fromsubclass_=False, pretty_print=True): - super(Space, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Space, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.structure is not None: - namespaceprefix_ = self.structure_nsprefix_ + ':' if (UseCapturedNS_ and self.structure_nsprefix_) else '' self.structure.export(outfile, level, namespaceprefix_, namespacedef_='', name_='structure', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('basedOn', node) @@ -10236,10 +7741,10 @@ def buildAttributes(self, node, attrs, already_processed): self.based_on = value self.validate_allowedSpaces(self.based_on) # validate type allowedSpaces super(Space, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'structure': obj_ = SpaceStructure.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.structure = obj_ obj_.original_tagname_ = 'structure' super(Space, self).buildChildren(child_, node, nodeName_, True) @@ -10247,90 +7752,73 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Network(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'networkTypes', 0, 1, {'use': 'optional'}), - MemberSpec_('temperature', 'Nml2Quantity_temperature', 0, 1, {'use': 'optional'}), - MemberSpec_('spaces', 'Space', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'space', 'type': 'Space'}, None), - MemberSpec_('regions', 'Region', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'region', 'type': 'Region'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularPropertiesLocal', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularPropertiesLocal'}, None), - MemberSpec_('populations', 'Population', 1, 0, {'maxOccurs': 'unbounded', 'name': 'population', 'type': 'Population'}, None), - MemberSpec_('cell_sets', 'CellSet', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cellSet', 'type': 'CellSet'}, None), - MemberSpec_('synaptic_connections', 'SynapticConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'synapticConnection', 'type': 'SynapticConnection'}, None), - MemberSpec_('projections', 'Projection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'projection', 'type': 'Projection'}, None), - MemberSpec_('electrical_projections', 'ElectricalProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalProjection', 'type': 'ElectricalProjection'}, None), - MemberSpec_('continuous_projections', 'ContinuousProjection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousProjection', 'type': 'ContinuousProjection'}, None), - MemberSpec_('explicit_inputs', 'ExplicitInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'explicitInput', 'type': 'ExplicitInput'}, None), - MemberSpec_('input_lists', 'InputList', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inputList', 'type': 'InputList'}, None), + MemberSpec_('type', 'networkTypes', 0, 1, {'use': u'optional'}), + MemberSpec_('temperature', 'Nml2Quantity_temperature', 0, 1, {'use': u'optional'}), + MemberSpec_('spaces', 'Space', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Space', u'name': u'space', u'minOccurs': u'0'}, None), + MemberSpec_('regions', 'Region', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Region', u'name': u'region', u'minOccurs': u'0'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularPropertiesLocal', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExtracellularPropertiesLocal', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('populations', 'Population', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Population', u'name': u'population'}, None), + MemberSpec_('cell_sets', 'CellSet', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CellSet', u'name': u'cellSet', u'minOccurs': u'0'}, None), + MemberSpec_('synaptic_connections', 'SynapticConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SynapticConnection', u'name': u'synapticConnection', u'minOccurs': u'0'}, None), + MemberSpec_('projections', 'Projection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Projection', u'name': u'projection', u'minOccurs': u'0'}, None), + MemberSpec_('electrical_projections', 'ElectricalProjection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalProjection', u'name': u'electricalProjection', u'minOccurs': u'0'}, None), + MemberSpec_('continuous_projections', 'ContinuousProjection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousProjection', u'name': u'continuousProjection', u'minOccurs': u'0'}, None), + MemberSpec_('explicit_inputs', 'ExplicitInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExplicitInput', u'name': u'explicitInput', u'minOccurs': u'0'}, None), + MemberSpec_('input_lists', 'InputList', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InputList', u'name': u'inputList', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, type=None, temperature=None, spaces=None, regions=None, extracellular_properties=None, populations=None, cell_sets=None, synaptic_connections=None, projections=None, electrical_projections=None, continuous_projections=None, explicit_inputs=None, input_lists=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, type=None, temperature=None, spaces=None, regions=None, extracellular_properties=None, populations=None, cell_sets=None, synaptic_connections=None, projections=None, electrical_projections=None, continuous_projections=None, explicit_inputs=None, input_lists=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Network"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(Network, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.type = _cast(None, type) - self.type_nsprefix_ = None self.temperature = _cast(None, temperature) - self.temperature_nsprefix_ = None if spaces is None: self.spaces = [] else: self.spaces = spaces - self.spaces_nsprefix_ = None if regions is None: self.regions = [] else: self.regions = regions - self.regions_nsprefix_ = None if extracellular_properties is None: self.extracellular_properties = [] else: self.extracellular_properties = extracellular_properties - self.extracellular_properties_nsprefix_ = None if populations is None: self.populations = [] else: self.populations = populations - self.populations_nsprefix_ = None if cell_sets is None: self.cell_sets = [] else: self.cell_sets = cell_sets - self.cell_sets_nsprefix_ = None if synaptic_connections is None: self.synaptic_connections = [] else: self.synaptic_connections = synaptic_connections - self.synaptic_connections_nsprefix_ = None if projections is None: self.projections = [] else: self.projections = projections - self.projections_nsprefix_ = None if electrical_projections is None: self.electrical_projections = [] else: self.electrical_projections = electrical_projections - self.electrical_projections_nsprefix_ = None if continuous_projections is None: self.continuous_projections = [] else: self.continuous_projections = continuous_projections - self.continuous_projections_nsprefix_ = None if explicit_inputs is None: self.explicit_inputs = [] else: self.explicit_inputs = explicit_inputs - self.explicit_inputs_nsprefix_ = None if input_lists is None: self.input_lists = [] else: self.input_lists = input_lists - self.input_lists_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10342,152 +7830,25 @@ def factory(*args_, **kwargs_): else: return Network(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_space(self): - return self.spaces - def set_space(self, spaces): - self.spaces = spaces - def add_space(self, value): - self.spaces.append(value) - def insert_space_at(self, index, value): - self.spaces.insert(index, value) - def replace_space_at(self, index, value): - self.spaces[index] = value - def get_region(self): - return self.regions - def set_region(self, regions): - self.regions = regions - def add_region(self, value): - self.regions.append(value) - def insert_region_at(self, index, value): - self.regions.insert(index, value) - def replace_region_at(self, index, value): - self.regions[index] = value - def get_extracellularProperties(self): - return self.extracellular_properties - def set_extracellularProperties(self, extracellular_properties): - self.extracellular_properties = extracellular_properties - def add_extracellularProperties(self, value): - self.extracellular_properties.append(value) - def insert_extracellularProperties_at(self, index, value): - self.extracellular_properties.insert(index, value) - def replace_extracellularProperties_at(self, index, value): - self.extracellular_properties[index] = value - def get_population(self): - return self.populations - def set_population(self, populations): - self.populations = populations - def add_population(self, value): - self.populations.append(value) - def insert_population_at(self, index, value): - self.populations.insert(index, value) - def replace_population_at(self, index, value): - self.populations[index] = value - def get_cellSet(self): - return self.cell_sets - def set_cellSet(self, cell_sets): - self.cell_sets = cell_sets - def add_cellSet(self, value): - self.cell_sets.append(value) - def insert_cellSet_at(self, index, value): - self.cell_sets.insert(index, value) - def replace_cellSet_at(self, index, value): - self.cell_sets[index] = value - def get_synapticConnection(self): - return self.synaptic_connections - def set_synapticConnection(self, synaptic_connections): - self.synaptic_connections = synaptic_connections - def add_synapticConnection(self, value): - self.synaptic_connections.append(value) - def insert_synapticConnection_at(self, index, value): - self.synaptic_connections.insert(index, value) - def replace_synapticConnection_at(self, index, value): - self.synaptic_connections[index] = value - def get_projection(self): - return self.projections - def set_projection(self, projections): - self.projections = projections - def add_projection(self, value): - self.projections.append(value) - def insert_projection_at(self, index, value): - self.projections.insert(index, value) - def replace_projection_at(self, index, value): - self.projections[index] = value - def get_electricalProjection(self): - return self.electrical_projections - def set_electricalProjection(self, electrical_projections): - self.electrical_projections = electrical_projections - def add_electricalProjection(self, value): - self.electrical_projections.append(value) - def insert_electricalProjection_at(self, index, value): - self.electrical_projections.insert(index, value) - def replace_electricalProjection_at(self, index, value): - self.electrical_projections[index] = value - def get_continuousProjection(self): - return self.continuous_projections - def set_continuousProjection(self, continuous_projections): - self.continuous_projections = continuous_projections - def add_continuousProjection(self, value): - self.continuous_projections.append(value) - def insert_continuousProjection_at(self, index, value): - self.continuous_projections.insert(index, value) - def replace_continuousProjection_at(self, index, value): - self.continuous_projections[index] = value - def get_explicitInput(self): - return self.explicit_inputs - def set_explicitInput(self, explicit_inputs): - self.explicit_inputs = explicit_inputs - def add_explicitInput(self, value): - self.explicit_inputs.append(value) - def insert_explicitInput_at(self, index, value): - self.explicit_inputs.insert(index, value) - def replace_explicitInput_at(self, index, value): - self.explicit_inputs[index] = value - def get_inputList(self): - return self.input_lists - def set_inputList(self, input_lists): - self.input_lists = input_lists - def add_inputList(self, value): - self.input_lists.append(value) - def insert_inputList_at(self, index, value): - self.input_lists.insert(index, value) - def replace_inputList_at(self, index, value): - self.input_lists[index] = value - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_temperature(self): - return self.temperature - def set_temperature(self, temperature): - self.temperature = temperature def validate_networkTypes(self, value): # Validate type networkTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['network', 'networkWithTemperature'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on networkTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on networkTypes' % {"value" : value.encode("utf-8")} ) def validate_Nml2Quantity_temperature(self, value): # Validate type Nml2Quantity_temperature, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_temperature_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_temperature_patterns_, )) - validate_Nml2Quantity_temperature_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_temperature_patterns_, )) + validate_Nml2Quantity_temperature_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(degC)$']] def hasContent_(self): if ( self.spaces or @@ -10514,10 +7875,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Network': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10533,59 +7892,44 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Network, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Network') if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.temperature is not None and 'temperature' not in already_processed: already_processed.add('temperature') - outfile.write(' temperature=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.temperature), input_name='temperature')), )) + outfile.write(' temperature=%s' % (quote_attrib(self.temperature), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Network', fromsubclass_=False, pretty_print=True): - super(Network, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Network, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for space_ in self.spaces: - namespaceprefix_ = self.spaces_nsprefix_ + ':' if (UseCapturedNS_ and self.spaces_nsprefix_) else '' space_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='space', pretty_print=pretty_print) for region_ in self.regions: - namespaceprefix_ = self.regions_nsprefix_ + ':' if (UseCapturedNS_ and self.regions_nsprefix_) else '' region_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='region', pretty_print=pretty_print) for extracellularProperties_ in self.extracellular_properties: - namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) for population_ in self.populations: - namespaceprefix_ = self.populations_nsprefix_ + ':' if (UseCapturedNS_ and self.populations_nsprefix_) else '' population_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='population', pretty_print=pretty_print) for cellSet_ in self.cell_sets: - namespaceprefix_ = self.cell_sets_nsprefix_ + ':' if (UseCapturedNS_ and self.cell_sets_nsprefix_) else '' cellSet_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cellSet', pretty_print=pretty_print) for synapticConnection_ in self.synaptic_connections: - namespaceprefix_ = self.synaptic_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.synaptic_connections_nsprefix_) else '' synapticConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='synapticConnection', pretty_print=pretty_print) for projection_ in self.projections: - namespaceprefix_ = self.projections_nsprefix_ + ':' if (UseCapturedNS_ and self.projections_nsprefix_) else '' projection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='projection', pretty_print=pretty_print) for electricalProjection_ in self.electrical_projections: - namespaceprefix_ = self.electrical_projections_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_projections_nsprefix_) else '' electricalProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalProjection', pretty_print=pretty_print) for continuousProjection_ in self.continuous_projections: - namespaceprefix_ = self.continuous_projections_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_projections_nsprefix_) else '' continuousProjection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousProjection', pretty_print=pretty_print) for explicitInput_ in self.explicit_inputs: - namespaceprefix_ = self.explicit_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.explicit_inputs_nsprefix_) else '' explicitInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='explicitInput', pretty_print=pretty_print) for inputList_ in self.input_lists: - namespaceprefix_ = self.input_lists_nsprefix_ + ':' if (UseCapturedNS_ and self.input_lists_nsprefix_) else '' inputList_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inputList', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -10599,60 +7943,60 @@ def buildAttributes(self, node, attrs, already_processed): self.temperature = value self.validate_Nml2Quantity_temperature(self.temperature) # validate type Nml2Quantity_temperature super(Network, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'space': obj_ = Space.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spaces.append(obj_) obj_.original_tagname_ = 'space' elif nodeName_ == 'region': obj_ = Region.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.regions.append(obj_) obj_.original_tagname_ = 'region' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularPropertiesLocal.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.extracellular_properties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'population': obj_ = Population.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.populations.append(obj_) obj_.original_tagname_ = 'population' elif nodeName_ == 'cellSet': obj_ = CellSet.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.cell_sets.append(obj_) obj_.original_tagname_ = 'cellSet' elif nodeName_ == 'synapticConnection': obj_ = SynapticConnection.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.synaptic_connections.append(obj_) obj_.original_tagname_ = 'synapticConnection' elif nodeName_ == 'projection': obj_ = Projection.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.projections.append(obj_) obj_.original_tagname_ = 'projection' elif nodeName_ == 'electricalProjection': obj_ = ElectricalProjection.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.electrical_projections.append(obj_) obj_.original_tagname_ = 'electricalProjection' elif nodeName_ == 'continuousProjection': obj_ = ContinuousProjection.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.continuous_projections.append(obj_) obj_.original_tagname_ = 'continuousProjection' elif nodeName_ == 'explicitInput': obj_ = ExplicitInput.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.explicit_inputs.append(obj_) obj_.original_tagname_ = 'explicitInput' elif nodeName_ == 'inputList': obj_ = InputList.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.input_lists.append(obj_) obj_.original_tagname_ = 'inputList' super(Network, self).buildChildren(child_, node, nodeName_, True) @@ -10720,33 +8064,24 @@ def exportHdf5(self, h5file, h5Group): class TransientPoissonFiringSynapse(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, delay=None, duration=None, synapse=None, spike_target=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, delay=None, duration=None, synapse=None, spike_target=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("TransientPoissonFiringSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(TransientPoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.average_rate = _cast(None, average_rate) - self.average_rate_nsprefix_ = None self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None self.spike_target = _cast(None, spike_target) - self.spike_target_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10758,52 +8093,20 @@ def factory(*args_, **kwargs_): else: return TransientPoissonFiringSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_averageRate(self): - return self.average_rate - def set_averageRate(self, average_rate): - self.average_rate = average_rate - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse - def get_spikeTarget(self): - return self.spike_target - def set_spikeTarget(self, spike_target): - self.spike_target = spike_target def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(TransientPoissonFiringSynapse, self).hasContent_() @@ -10819,10 +8122,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'TransientPoissonFiringSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10838,13 +8139,13 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(TransientPoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TransientPoissonFiringSynapse') if self.average_rate is not None and 'average_rate' not in already_processed: already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) + outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) @@ -10852,17 +8153,13 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('spike_target') outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TransientPoissonFiringSynapse', fromsubclass_=False, pretty_print=True): - super(TransientPoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(TransientPoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) @@ -10889,34 +8186,27 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('spikeTarget') self.spike_target = value super(TransientPoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(TransientPoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class TransientPoissonFiringSynapse class PoissonFiringSynapse(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), - MemberSpec_('synapse', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('synapse', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, synapse=None, spike_target=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, synapse=None, spike_target=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("PoissonFiringSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(PoissonFiringSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.average_rate = _cast(None, average_rate) - self.average_rate_nsprefix_ = None self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None self.spike_target = _cast(None, spike_target) - self.spike_target_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -10928,33 +8218,13 @@ def factory(*args_, **kwargs_): else: return PoissonFiringSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_averageRate(self): - return self.average_rate - def set_averageRate(self, average_rate): - self.average_rate = average_rate - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse - def get_spikeTarget(self): - return self.spike_target - def set_spikeTarget(self, spike_target): - self.spike_target = spike_target def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def hasContent_(self): if ( super(PoissonFiringSynapse, self).hasContent_() @@ -10970,10 +8240,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'PoissonFiringSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -10989,7 +8257,7 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PoissonFiringSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PoissonFiringSynapse') if self.average_rate is not None and 'average_rate' not in already_processed: already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) + outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) @@ -10997,17 +8265,13 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('spike_target') outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PoissonFiringSynapse', fromsubclass_=False, pretty_print=True): - super(PoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(PoissonFiringSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) @@ -11024,28 +8288,23 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('spikeTarget') self.spike_target = value super(PoissonFiringSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(PoissonFiringSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class PoissonFiringSynapse class SpikeGeneratorPoisson(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), + MemberSpec_('average_rate', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeGeneratorPoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(SpikeGeneratorPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.average_rate = _cast(None, average_rate) - self.average_rate_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -11058,27 +8317,13 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorPoisson(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_averageRate(self): - return self.average_rate - def set_averageRate(self, average_rate): - self.average_rate = average_rate - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def hasContent_(self): if ( super(SpikeGeneratorPoisson, self).hasContent_() @@ -11094,10 +8339,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeGeneratorPoisson': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11113,27 +8356,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeGeneratorPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorPoisson') if self.average_rate is not None and 'average_rate' not in already_processed: already_processed.add('average_rate') - outfile.write(' averageRate=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.average_rate), input_name='averageRate')), )) + outfile.write(' averageRate=%s' % (quote_attrib(self.average_rate), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorPoisson', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorPoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SpikeGeneratorPoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('averageRate', node) @@ -11146,31 +8381,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(SpikeGeneratorPoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeGeneratorPoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorPoisson class SpikeGeneratorRandom(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('max_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('min_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('max_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('min_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, max_isi=None, min_isi=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, max_isi=None, min_isi=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeGeneratorRandom"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SpikeGeneratorRandom, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.max_isi = _cast(None, max_isi) - self.max_isi_nsprefix_ = None self.min_isi = _cast(None, min_isi) - self.min_isi_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11182,29 +8411,13 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorRandom(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_maxISI(self): - return self.max_isi - def set_maxISI(self, max_isi): - self.max_isi = max_isi - def get_minISI(self): - return self.min_isi - def set_minISI(self, min_isi): - self.min_isi = min_isi def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(SpikeGeneratorRandom, self).hasContent_() @@ -11220,10 +8433,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeGeneratorRandom': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11239,22 +8450,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeGeneratorRandom, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRandom') if self.max_isi is not None and 'max_isi' not in already_processed: already_processed.add('max_isi') - outfile.write(' maxISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.max_isi), input_name='maxISI')), )) + outfile.write(' maxISI=%s' % (quote_attrib(self.max_isi), )) if self.min_isi is not None and 'min_isi' not in already_processed: already_processed.add('min_isi') - outfile.write(' minISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.min_isi), input_name='minISI')), )) + outfile.write(' minISI=%s' % (quote_attrib(self.min_isi), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRandom', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorRandom, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SpikeGeneratorRandom, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('maxISI', node) @@ -11268,28 +8475,23 @@ def buildAttributes(self, node, attrs, already_processed): self.min_isi = value self.validate_Nml2Quantity_time(self.min_isi) # validate type Nml2Quantity_time super(SpikeGeneratorRandom, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeGeneratorRandom, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorRandom class SpikeGenerator(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, period=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, period=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SpikeGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.period = _cast(None, period) - self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11301,25 +8503,13 @@ def factory(*args_, **kwargs_): else: return SpikeGenerator(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_period(self): - return self.period - def set_period(self, period): - self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(SpikeGenerator, self).hasContent_() @@ -11335,10 +8525,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeGenerator': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11354,19 +8542,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGenerator') if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) + outfile.write(' period=%s' % (quote_attrib(self.period), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGenerator', fromsubclass_=False, pretty_print=True): - super(SpikeGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SpikeGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('period', node) @@ -11375,37 +8559,30 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SpikeGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGenerator class TimedSynapticInput(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('spikes', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('spike_target', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('spikes', 'Spike', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Spike', u'name': u'spike', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse=None, spike_target=None, spikes=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse=None, spike_target=None, spikes=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("TimedSynapticInput"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(TimedSynapticInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None self.spike_target = _cast(None, spike_target) - self.spike_target_nsprefix_ = None if spikes is None: self.spikes = [] else: self.spikes = spikes - self.spikes_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11417,39 +8594,13 @@ def factory(*args_, **kwargs_): else: return TimedSynapticInput(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_spike(self): - return self.spikes - def set_spike(self, spikes): - self.spikes = spikes - def add_spike(self, value): - self.spikes.append(value) - def insert_spike_at(self, index, value): - self.spikes.insert(index, value) - def replace_spike_at(self, index, value): - self.spikes[index] = value - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse - def get_spikeTarget(self): - return self.spike_target - def set_spikeTarget(self, spike_target): - self.spike_target = spike_target def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.spikes or @@ -11466,10 +8617,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'TimedSynapticInput': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11485,29 +8634,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(TimedSynapticInput, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TimedSynapticInput') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) + outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) if self.spike_target is not None and 'spike_target' not in already_processed: already_processed.add('spike_target') outfile.write(' spikeTarget=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spike_target), input_name='spikeTarget')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TimedSynapticInput', fromsubclass_=False, pretty_print=True): - super(TimedSynapticInput, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(TimedSynapticInput, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for spike_ in self.spikes: - namespaceprefix_ = self.spikes_nsprefix_ + ':' if (UseCapturedNS_ and self.spikes_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -11520,10 +8664,10 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('spikeTarget') self.spike_target = value super(TimedSynapticInput, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spikes.append(obj_) obj_.original_tagname_ = 'spike' super(TimedSynapticInput, self).buildChildren(child_, node, nodeName_, True) @@ -11531,24 +8675,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SpikeArray(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('spikes', 'Spike', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spike', 'type': 'Spike'}, None), + MemberSpec_('spikes', 'Spike', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Spike', u'name': u'spike', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, spikes=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, spikes=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeArray"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SpikeArray, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if spikes is None: self.spikes = [] else: self.spikes = spikes - self.spikes_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11560,20 +8699,6 @@ def factory(*args_, **kwargs_): else: return SpikeArray(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_spike(self): - return self.spikes - def set_spike(self, spikes): - self.spikes = spikes - def add_spike(self, value): - self.spikes.append(value) - def insert_spike_at(self, index, value): - self.spikes.insert(index, value) - def replace_spike_at(self, index, value): - self.spikes[index] = value def hasContent_(self): if ( self.spikes or @@ -11590,10 +8715,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeArray': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11608,31 +8731,26 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeArray'): super(SpikeArray, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeArray') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeArray', fromsubclass_=False, pretty_print=True): - super(SpikeArray, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(SpikeArray, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for spike_ in self.spikes: - namespaceprefix_ = self.spikes_nsprefix_ + ':' if (UseCapturedNS_ and self.spikes_nsprefix_) else '' spike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spike', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(SpikeArray, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'spike': obj_ = Spike.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spikes.append(obj_) obj_.original_tagname_ = 'spike' super(SpikeArray, self).buildChildren(child_, node, nodeName_, True) @@ -11640,21 +8758,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Spike(BaseNonNegativeIntegerId): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('time', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('time', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, time=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, time=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Spike"), self).__init__(neuro_lex_id, id, **kwargs_) + super(Spike, self).__init__(neuro_lex_id, id, **kwargs_) self.time = _cast(None, time) - self.time_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11666,25 +8779,13 @@ def factory(*args_, **kwargs_): else: return Spike(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_time(self): - return self.time - def set_time(self, time): - self.time = time def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(Spike, self).hasContent_() @@ -11700,10 +8801,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Spike': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11718,20 +8817,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Spike, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Spike') if self.time is not None and 'time' not in already_processed: already_processed.add('time') - outfile.write(' time=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.time), input_name='time')), )) + outfile.write(' time=%s' % (quote_attrib(self.time), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Spike', fromsubclass_=False, pretty_print=True): - super(Spike, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Spike, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('time', node) @@ -11740,46 +8835,35 @@ def buildAttributes(self, node, attrs, already_processed): self.time = value self.validate_Nml2Quantity_time(self.time) # validate type Nml2Quantity_time super(Spike, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Spike, self).buildChildren(child_, node, nodeName_, True) pass # end class Spike class VoltageClampTriple(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('active', 'ZeroOrOne', 0, 0, {'use': 'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('conditioning_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('testing_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('return_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), + MemberSpec_('active', 'ZeroOrOne', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('conditioning_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('testing_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('return_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, active=None, delay=None, duration=None, conditioning_voltage=None, testing_voltage=None, return_voltage=None, simple_series_resistance=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, active=None, delay=None, duration=None, conditioning_voltage=None, testing_voltage=None, return_voltage=None, simple_series_resistance=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("VoltageClampTriple"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(VoltageClampTriple, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.active = _cast(float, active) - self.active_nsprefix_ = None self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.conditioning_voltage = _cast(None, conditioning_voltage) - self.conditioning_voltage_nsprefix_ = None self.testing_voltage = _cast(None, testing_voltage) - self.testing_voltage_nsprefix_ = None self.return_voltage = _cast(None, return_voltage) - self.return_voltage_nsprefix_ = None self.simple_series_resistance = _cast(None, simple_series_resistance) - self.simple_series_resistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -11791,84 +8875,39 @@ def factory(*args_, **kwargs_): else: return VoltageClampTriple(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_active(self): - return self.active - def set_active(self, active): - self.active = active - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_conditioningVoltage(self): - return self.conditioning_voltage - def set_conditioningVoltage(self, conditioning_voltage): - self.conditioning_voltage = conditioning_voltage - def get_testingVoltage(self): - return self.testing_voltage - def set_testingVoltage(self, testing_voltage): - self.testing_voltage = testing_voltage - def get_returnVoltage(self): - return self.return_voltage - def set_returnVoltage(self, return_voltage): - self.return_voltage = return_voltage - def get_simpleSeriesResistance(self): - return self.simple_series_resistance - def set_simpleSeriesResistance(self, simple_series_resistance): - self.simple_series_resistance = simple_series_resistance def validate_ZeroOrOne(self, value): # Validate type ZeroOrOne, a restriction on xs:double. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False - value = value - enumerations = [0.0, 1.0] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on ZeroOrOne' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + if value is not None and Validate_simpletypes_: + value = str(value) + enumerations = ['0', '1'] + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on ZeroOrOne' % {"value" : value.encode("utf-8")} ) def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_resistance(self, value): # Validate type Nml2Quantity_resistance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_resistance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_resistance_patterns_, )) - validate_Nml2Quantity_resistance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_resistance_patterns_, )) + validate_Nml2Quantity_resistance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm)$']] def hasContent_(self): if ( super(VoltageClampTriple, self).hasContent_() @@ -11884,10 +8923,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'VoltageClampTriple': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -11903,44 +8940,42 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(VoltageClampTriple, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='VoltageClampTriple') if self.active is not None and 'active' not in already_processed: already_processed.add('active') - outfile.write(' active="%s"' % self.gds_format_double(self.active, input_name='active')) + outfile.write(' active=%s' % (quote_attrib(self.active), )) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.conditioning_voltage is not None and 'conditioning_voltage' not in already_processed: already_processed.add('conditioning_voltage') - outfile.write(' conditioningVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conditioning_voltage), input_name='conditioningVoltage')), )) + outfile.write(' conditioningVoltage=%s' % (quote_attrib(self.conditioning_voltage), )) if self.testing_voltage is not None and 'testing_voltage' not in already_processed: already_processed.add('testing_voltage') - outfile.write(' testingVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.testing_voltage), input_name='testingVoltage')), )) + outfile.write(' testingVoltage=%s' % (quote_attrib(self.testing_voltage), )) if self.return_voltage is not None and 'return_voltage' not in already_processed: already_processed.add('return_voltage') - outfile.write(' returnVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.return_voltage), input_name='returnVoltage')), )) + outfile.write(' returnVoltage=%s' % (quote_attrib(self.return_voltage), )) if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: already_processed.add('simple_series_resistance') - outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simple_series_resistance), input_name='simpleSeriesResistance')), )) + outfile.write(' simpleSeriesResistance=%s' % (quote_attrib(self.simple_series_resistance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClampTriple', fromsubclass_=False, pretty_print=True): - super(VoltageClampTriple, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(VoltageClampTriple, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('active', node) if value is not None and 'active' not in already_processed: already_processed.add('active') - value = self.gds_parse_double(value, node, 'active') - self.active = value + try: + self.active = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (active): %s' % exp) self.validate_ZeroOrOne(self.active) # validate type ZeroOrOne value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: @@ -11973,37 +9008,29 @@ def buildAttributes(self, node, attrs, already_processed): self.simple_series_resistance = value self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance super(VoltageClampTriple, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(VoltageClampTriple, self).buildChildren(child_, node, nodeName_, True) pass # end class VoltageClampTriple class VoltageClamp(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('target_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('target_voltage', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('simple_series_resistance', 'Nml2Quantity_resistance', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, target_voltage=None, simple_series_resistance=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, target_voltage=None, simple_series_resistance=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("VoltageClamp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(VoltageClamp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.target_voltage = _cast(None, target_voltage) - self.target_voltage_nsprefix_ = None self.simple_series_resistance = _cast(None, simple_series_resistance) - self.simple_series_resistance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12015,59 +9042,27 @@ def factory(*args_, **kwargs_): else: return VoltageClamp(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_targetVoltage(self): - return self.target_voltage - def set_targetVoltage(self, target_voltage): - self.target_voltage = target_voltage - def get_simpleSeriesResistance(self): - return self.simple_series_resistance - def set_simpleSeriesResistance(self, simple_series_resistance): - self.simple_series_resistance = simple_series_resistance def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_resistance(self, value): # Validate type Nml2Quantity_resistance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_resistance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_resistance_patterns_, )) - validate_Nml2Quantity_resistance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_resistance_patterns_, )) + validate_Nml2Quantity_resistance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(ohm|kohm|Mohm)$']] def hasContent_(self): if ( super(VoltageClamp, self).hasContent_() @@ -12083,10 +9078,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='V eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'VoltageClamp': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12102,28 +9095,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(VoltageClamp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='VoltageClamp') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.target_voltage is not None and 'target_voltage' not in already_processed: already_processed.add('target_voltage') - outfile.write(' targetVoltage=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.target_voltage), input_name='targetVoltage')), )) + outfile.write(' targetVoltage=%s' % (quote_attrib(self.target_voltage), )) if self.simple_series_resistance is not None and 'simple_series_resistance' not in already_processed: already_processed.add('simple_series_resistance') - outfile.write(' simpleSeriesResistance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.simple_series_resistance), input_name='simpleSeriesResistance')), )) + outfile.write(' simpleSeriesResistance=%s' % (quote_attrib(self.simple_series_resistance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='VoltageClamp', fromsubclass_=False, pretty_print=True): - super(VoltageClamp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(VoltageClamp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -12147,43 +9136,36 @@ def buildAttributes(self, node, attrs, already_processed): self.simple_series_resistance = value self.validate_Nml2Quantity_resistance(self.simple_series_resistance) # validate type Nml2Quantity_resistance super(VoltageClamp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(VoltageClamp, self).buildChildren(child_, node, nodeName_, True) pass # end class VoltageClamp class CompoundInputDL(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), - MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), - MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), + MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGeneratorDL', u'name': u'pulseGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGeneratorDL', u'name': u'sineGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGeneratorDL', u'name': u'rampGeneratorDL', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generator_dls=None, sine_generator_dls=None, ramp_generator_dls=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generator_dls=None, sine_generator_dls=None, ramp_generator_dls=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("CompoundInputDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(CompoundInputDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if pulse_generator_dls is None: self.pulse_generator_dls = [] else: self.pulse_generator_dls = pulse_generator_dls - self.pulse_generator_dls_nsprefix_ = None if sine_generator_dls is None: self.sine_generator_dls = [] else: self.sine_generator_dls = sine_generator_dls - self.sine_generator_dls_nsprefix_ = None if ramp_generator_dls is None: self.ramp_generator_dls = [] else: self.ramp_generator_dls = ramp_generator_dls - self.ramp_generator_dls_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12195,40 +9177,6 @@ def factory(*args_, **kwargs_): else: return CompoundInputDL(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_pulseGeneratorDL(self): - return self.pulse_generator_dls - def set_pulseGeneratorDL(self, pulse_generator_dls): - self.pulse_generator_dls = pulse_generator_dls - def add_pulseGeneratorDL(self, value): - self.pulse_generator_dls.append(value) - def insert_pulseGeneratorDL_at(self, index, value): - self.pulse_generator_dls.insert(index, value) - def replace_pulseGeneratorDL_at(self, index, value): - self.pulse_generator_dls[index] = value - def get_sineGeneratorDL(self): - return self.sine_generator_dls - def set_sineGeneratorDL(self, sine_generator_dls): - self.sine_generator_dls = sine_generator_dls - def add_sineGeneratorDL(self, value): - self.sine_generator_dls.append(value) - def insert_sineGeneratorDL_at(self, index, value): - self.sine_generator_dls.insert(index, value) - def replace_sineGeneratorDL_at(self, index, value): - self.sine_generator_dls[index] = value - def get_rampGeneratorDL(self): - return self.ramp_generator_dls - def set_rampGeneratorDL(self, ramp_generator_dls): - self.ramp_generator_dls = ramp_generator_dls - def add_rampGeneratorDL(self, value): - self.ramp_generator_dls.append(value) - def insert_rampGeneratorDL_at(self, index, value): - self.ramp_generator_dls.insert(index, value) - def replace_rampGeneratorDL_at(self, index, value): - self.ramp_generator_dls[index] = value def hasContent_(self): if ( self.pulse_generator_dls or @@ -12247,10 +9195,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'CompoundInputDL': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12265,47 +9211,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CompoundInputDL'): super(CompoundInputDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CompoundInputDL') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundInputDL', fromsubclass_=False, pretty_print=True): - super(CompoundInputDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(CompoundInputDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for pulseGeneratorDL_ in self.pulse_generator_dls: - namespaceprefix_ = self.pulse_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generator_dls_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) for sineGeneratorDL_ in self.sine_generator_dls: - namespaceprefix_ = self.sine_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generator_dls_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) for rampGeneratorDL_ in self.ramp_generator_dls: - namespaceprefix_ = self.ramp_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generator_dls_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(CompoundInputDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.pulse_generator_dls.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sine_generator_dls.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ramp_generator_dls.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' super(CompoundInputDL, self).buildChildren(child_, node, nodeName_, True) @@ -12313,36 +9252,29 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class CompoundInput(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), - MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), - MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), + MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGenerator', u'name': u'pulseGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGenerator', u'name': u'sineGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGenerator', u'name': u'rampGenerator', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generators=None, sine_generators=None, ramp_generators=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, pulse_generators=None, sine_generators=None, ramp_generators=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("CompoundInput"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(CompoundInput, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if pulse_generators is None: self.pulse_generators = [] else: self.pulse_generators = pulse_generators - self.pulse_generators_nsprefix_ = None if sine_generators is None: self.sine_generators = [] else: self.sine_generators = sine_generators - self.sine_generators_nsprefix_ = None if ramp_generators is None: self.ramp_generators = [] else: self.ramp_generators = ramp_generators - self.ramp_generators_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12354,40 +9286,6 @@ def factory(*args_, **kwargs_): else: return CompoundInput(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_pulseGenerator(self): - return self.pulse_generators - def set_pulseGenerator(self, pulse_generators): - self.pulse_generators = pulse_generators - def add_pulseGenerator(self, value): - self.pulse_generators.append(value) - def insert_pulseGenerator_at(self, index, value): - self.pulse_generators.insert(index, value) - def replace_pulseGenerator_at(self, index, value): - self.pulse_generators[index] = value - def get_sineGenerator(self): - return self.sine_generators - def set_sineGenerator(self, sine_generators): - self.sine_generators = sine_generators - def add_sineGenerator(self, value): - self.sine_generators.append(value) - def insert_sineGenerator_at(self, index, value): - self.sine_generators.insert(index, value) - def replace_sineGenerator_at(self, index, value): - self.sine_generators[index] = value - def get_rampGenerator(self): - return self.ramp_generators - def set_rampGenerator(self, ramp_generators): - self.ramp_generators = ramp_generators - def add_rampGenerator(self, value): - self.ramp_generators.append(value) - def insert_rampGenerator_at(self, index, value): - self.ramp_generators.insert(index, value) - def replace_rampGenerator_at(self, index, value): - self.ramp_generators[index] = value def hasContent_(self): if ( self.pulse_generators or @@ -12406,10 +9304,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'CompoundInput': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12424,47 +9320,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CompoundInput'): super(CompoundInput, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CompoundInput') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundInput', fromsubclass_=False, pretty_print=True): - super(CompoundInput, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(CompoundInput, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for pulseGenerator_ in self.pulse_generators: - namespaceprefix_ = self.pulse_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generators_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) for sineGenerator_ in self.sine_generators: - namespaceprefix_ = self.sine_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generators_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) for rampGenerator_ in self.ramp_generators: - namespaceprefix_ = self.ramp_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generators_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(CompoundInput, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.pulse_generators.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sine_generators.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ramp_generators.append(obj_) obj_.original_tagname_ = 'rampGenerator' super(CompoundInput, self).buildChildren(child_, node, nodeName_, True) @@ -12472,33 +9361,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class RampGeneratorDL(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('start_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('finish_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('baseline_amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('start_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('finish_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('baseline_amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("RampGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(RampGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.start_amplitude = _cast(None, start_amplitude) - self.start_amplitude_nsprefix_ = None self.finish_amplitude = _cast(None, finish_amplitude) - self.finish_amplitude_nsprefix_ = None self.baseline_amplitude = _cast(None, baseline_amplitude) - self.baseline_amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12510,52 +9390,20 @@ def factory(*args_, **kwargs_): else: return RampGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_startAmplitude(self): - return self.start_amplitude - def set_startAmplitude(self, start_amplitude): - self.start_amplitude = start_amplitude - def get_finishAmplitude(self): - return self.finish_amplitude - def set_finishAmplitude(self, finish_amplitude): - self.finish_amplitude = finish_amplitude - def get_baselineAmplitude(self): - return self.baseline_amplitude - def set_baselineAmplitude(self, baseline_amplitude): - self.baseline_amplitude = baseline_amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(RampGeneratorDL, self).hasContent_() @@ -12571,10 +9419,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'RampGeneratorDL': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12590,31 +9436,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(RampGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RampGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.start_amplitude is not None and 'start_amplitude' not in already_processed: already_processed.add('start_amplitude') - outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start_amplitude), input_name='startAmplitude')), )) + outfile.write(' startAmplitude=%s' % (quote_attrib(self.start_amplitude), )) if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: already_processed.add('finish_amplitude') - outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finish_amplitude), input_name='finishAmplitude')), )) + outfile.write(' finishAmplitude=%s' % (quote_attrib(self.finish_amplitude), )) if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: already_processed.add('baseline_amplitude') - outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baseline_amplitude), input_name='baselineAmplitude')), )) + outfile.write(' baselineAmplitude=%s' % (quote_attrib(self.baseline_amplitude), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGeneratorDL', fromsubclass_=False, pretty_print=True): - super(RampGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(RampGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -12643,40 +9485,31 @@ def buildAttributes(self, node, attrs, already_processed): self.baseline_amplitude = value self.validate_Nml2Quantity_none(self.baseline_amplitude) # validate type Nml2Quantity_none super(RampGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(RampGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class RampGeneratorDL class RampGenerator(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('start_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), - MemberSpec_('finish_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), - MemberSpec_('baseline_amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('start_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('finish_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('baseline_amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, start_amplitude=None, finish_amplitude=None, baseline_amplitude=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("RampGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(RampGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.start_amplitude = _cast(None, start_amplitude) - self.start_amplitude_nsprefix_ = None self.finish_amplitude = _cast(None, finish_amplitude) - self.finish_amplitude_nsprefix_ = None self.baseline_amplitude = _cast(None, baseline_amplitude) - self.baseline_amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12688,52 +9521,20 @@ def factory(*args_, **kwargs_): else: return RampGenerator(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_startAmplitude(self): - return self.start_amplitude - def set_startAmplitude(self, start_amplitude): - self.start_amplitude = start_amplitude - def get_finishAmplitude(self): - return self.finish_amplitude - def set_finishAmplitude(self, finish_amplitude): - self.finish_amplitude = finish_amplitude - def get_baselineAmplitude(self): - return self.baseline_amplitude - def set_baselineAmplitude(self, baseline_amplitude): - self.baseline_amplitude = baseline_amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(RampGenerator, self).hasContent_() @@ -12749,10 +9550,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'RampGenerator': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12768,31 +9567,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(RampGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='RampGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.start_amplitude is not None and 'start_amplitude' not in already_processed: already_processed.add('start_amplitude') - outfile.write(' startAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.start_amplitude), input_name='startAmplitude')), )) + outfile.write(' startAmplitude=%s' % (quote_attrib(self.start_amplitude), )) if self.finish_amplitude is not None and 'finish_amplitude' not in already_processed: already_processed.add('finish_amplitude') - outfile.write(' finishAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.finish_amplitude), input_name='finishAmplitude')), )) + outfile.write(' finishAmplitude=%s' % (quote_attrib(self.finish_amplitude), )) if self.baseline_amplitude is not None and 'baseline_amplitude' not in already_processed: already_processed.add('baseline_amplitude') - outfile.write(' baselineAmplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.baseline_amplitude), input_name='baselineAmplitude')), )) + outfile.write(' baselineAmplitude=%s' % (quote_attrib(self.baseline_amplitude), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='RampGenerator', fromsubclass_=False, pretty_print=True): - super(RampGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(RampGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -12821,40 +9616,31 @@ def buildAttributes(self, node, attrs, already_processed): self.baseline_amplitude = value self.validate_Nml2Quantity_current(self.baseline_amplitude) # validate type Nml2Quantity_current super(RampGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(RampGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class RampGenerator class SineGeneratorDL(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SineGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SineGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.phase = _cast(None, phase) - self.phase_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) - self.amplitude_nsprefix_ = None self.period = _cast(None, period) - self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -12866,52 +9652,20 @@ def factory(*args_, **kwargs_): else: return SineGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_phase(self): - return self.phase - def set_phase(self, phase): - self.phase = phase - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_amplitude(self): - return self.amplitude - def set_amplitude(self, amplitude): - self.amplitude = amplitude - def get_period(self): - return self.period - def set_period(self, period): - self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(SineGeneratorDL, self).hasContent_() @@ -12927,10 +9681,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SineGeneratorDL': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -12946,31 +9698,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SineGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SineGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.phase is not None and 'phase' not in already_processed: already_processed.add('phase') - outfile.write(' phase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phase), input_name='phase')), )) + outfile.write(' phase=%s' % (quote_attrib(self.phase), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) + outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) + outfile.write(' period=%s' % (quote_attrib(self.period), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SineGeneratorDL', fromsubclass_=False, pretty_print=True): - super(SineGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SineGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -12999,40 +9747,31 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SineGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SineGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class SineGeneratorDL class SineGenerator(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), - MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('phase', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), + MemberSpec_('period', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, phase=None, duration=None, amplitude=None, period=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SineGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SineGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.phase = _cast(None, phase) - self.phase_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) - self.amplitude_nsprefix_ = None self.period = _cast(None, period) - self.period_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13044,63 +9783,27 @@ def factory(*args_, **kwargs_): else: return SineGenerator(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_phase(self): - return self.phase - def set_phase(self, phase): - self.phase = phase - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_amplitude(self): - return self.amplitude - def set_amplitude(self, amplitude): - self.amplitude = amplitude - def get_period(self): - return self.period - def set_period(self, period): - self.period = period def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(SineGenerator, self).hasContent_() @@ -13116,10 +9819,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SineGenerator': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13135,31 +9836,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SineGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SineGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.phase is not None and 'phase' not in already_processed: already_processed.add('phase') - outfile.write(' phase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phase), input_name='phase')), )) + outfile.write(' phase=%s' % (quote_attrib(self.phase), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) + outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) if self.period is not None and 'period' not in already_processed: already_processed.add('period') - outfile.write(' period=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.period), input_name='period')), )) + outfile.write(' period=%s' % (quote_attrib(self.period), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SineGenerator', fromsubclass_=False, pretty_print=True): - super(SineGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SineGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -13188,7 +9885,7 @@ def buildAttributes(self, node, attrs, already_processed): self.period = value self.validate_Nml2Quantity_time(self.period) # validate type Nml2Quantity_time super(SineGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SineGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class SineGenerator @@ -13197,27 +9894,20 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class PulseGeneratorDL(Standalone): """Generates a constant current pulse of a certain amplitude (non dimensional) for a specified duration after a delay.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("PulseGeneratorDL"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(PulseGeneratorDL, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) - self.amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13229,44 +9919,20 @@ def factory(*args_, **kwargs_): else: return PulseGeneratorDL(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_amplitude(self): - return self.amplitude - def set_amplitude(self, amplitude): - self.amplitude = amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(PulseGeneratorDL, self).hasContent_() @@ -13282,10 +9948,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'PulseGeneratorDL': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13301,25 +9965,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PulseGeneratorDL, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PulseGeneratorDL') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) + outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PulseGeneratorDL', fromsubclass_=False, pretty_print=True): - super(PulseGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(PulseGeneratorDL, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -13338,7 +9998,7 @@ def buildAttributes(self, node, attrs, already_processed): self.amplitude = value self.validate_Nml2Quantity_none(self.amplitude) # validate type Nml2Quantity_none super(PulseGeneratorDL, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(PulseGeneratorDL, self).buildChildren(child_, node, nodeName_, True) pass # end class PulseGeneratorDL @@ -13347,27 +10007,20 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class PulseGenerator(Standalone): """Generates a constant current pulse of a certain amplitude (with dimensions for current) for a specified duration after a delay.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('duration', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('amplitude', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, delay=None, duration=None, amplitude=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("PulseGenerator"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(PulseGenerator, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.delay = _cast(None, delay) - self.delay_nsprefix_ = None self.duration = _cast(None, duration) - self.duration_nsprefix_ = None self.amplitude = _cast(None, amplitude) - self.amplitude_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13379,44 +10032,20 @@ def factory(*args_, **kwargs_): else: return PulseGenerator(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay - def get_duration(self): - return self.duration - def set_duration(self, duration): - self.duration = duration - def get_amplitude(self): - return self.amplitude - def set_amplitude(self, amplitude): - self.amplitude = amplitude def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(PulseGenerator, self).hasContent_() @@ -13432,10 +10061,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'PulseGenerator': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13451,25 +10078,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PulseGenerator, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PulseGenerator') if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) if self.duration is not None and 'duration' not in already_processed: already_processed.add('duration') - outfile.write(' duration=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.duration), input_name='duration')), )) + outfile.write(' duration=%s' % (quote_attrib(self.duration), )) if self.amplitude is not None and 'amplitude' not in already_processed: already_processed.add('amplitude') - outfile.write(' amplitude=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.amplitude), input_name='amplitude')), )) + outfile.write(' amplitude=%s' % (quote_attrib(self.amplitude), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PulseGenerator', fromsubclass_=False, pretty_print=True): - super(PulseGenerator, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(PulseGenerator, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('delay', node) @@ -13488,32 +10111,26 @@ def buildAttributes(self, node, attrs, already_processed): self.amplitude = value self.validate_Nml2Quantity_current(self.amplitude) # validate type Nml2Quantity_current super(PulseGenerator, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(PulseGenerator, self).buildChildren(child_, node, nodeName_, True) pass # end class PulseGenerator class ReactionScheme(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('source', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('source', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, source=None, type=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, source=None, type=None, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ReactionScheme"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ReactionScheme, self).__init__(neuro_lex_id, id, **kwargs_) self.source = _cast(None, source) - self.source_nsprefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -13529,22 +10146,6 @@ def factory(*args_, **kwargs_): else: return ReactionScheme(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value - def get_source(self): - return self.source - def set_source(self, source): - self.source = source - def get_type(self): - return self.type - def set_type(self, type): - self.type = type def hasContent_(self): if ( self.anytypeobjs_ or @@ -13561,10 +10162,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ReactionScheme': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13585,26 +10184,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('type') outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ReactionScheme', fromsubclass_=False, pretty_print=True): - super(ReactionScheme, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ReactionScheme, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('source', node) @@ -13616,32 +10208,28 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('type') self.type = value super(ReactionScheme, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'ReactionScheme') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'ReactionScheme') + if obj_ is not None: + self.add_anytypeobjs_(obj_) super(ReactionScheme, self).buildChildren(child_, node, nodeName_, True) # end class ReactionScheme class ExtracellularProperties(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'Species', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'species', 'type': 'Species'}, None), + MemberSpec_('species', 'Species', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Species', u'name': u'species', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, species=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, species=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExtracellularProperties"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ExtracellularProperties, self).__init__(neuro_lex_id, id, **kwargs_) if species is None: self.species = [] else: self.species = species - self.species_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13653,20 +10241,6 @@ def factory(*args_, **kwargs_): else: return ExtracellularProperties(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def add_species(self, value): - self.species.append(value) - def insert_species_at(self, index, value): - self.species.insert(index, value) - def replace_species_at(self, index, value): - self.species[index] = value def hasContent_(self): if ( self.species or @@ -13683,10 +10257,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExtracellularProperties': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13701,31 +10273,26 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExtracellularProperties'): super(ExtracellularProperties, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExtracellularProperties') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExtracellularProperties', fromsubclass_=False, pretty_print=True): - super(ExtracellularProperties, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ExtracellularProperties, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for species_ in self.species: - namespaceprefix_ = self.species_nsprefix_ + ':' if (UseCapturedNS_ and self.species_nsprefix_) else '' species_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='species', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ExtracellularProperties, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'species': obj_ = Species.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.species.append(obj_) obj_.original_tagname_ = 'species' super(ExtracellularProperties, self).buildChildren(child_, node, nodeName_, True) @@ -13734,42 +10301,32 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityGHK2(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityGHK2"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelDensityGHK2, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) - self.cond_density_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(None, segments) - self.segments_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13781,52 +10338,20 @@ def factory(*args_, **kwargs_): else: return ChannelDensityGHK2(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_condDensity(self): - return self.cond_density - def set_condDensity(self, cond_density): - self.cond_density = cond_density - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] def hasContent_(self): if ( super(ChannelDensityGHK2, self).hasContent_() @@ -13842,10 +10367,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityGHK2': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -13860,32 +10383,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityGHK2, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK2') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.cond_density is not None and 'cond_density' not in already_processed: already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) + outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityGHK2', fromsubclass_=False, pretty_print=True): - super(ChannelDensityGHK2, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityGHK2, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -13914,7 +10433,7 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityGHK2, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ChannelDensityGHK2, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityGHK2 @@ -13922,42 +10441,32 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityGHK(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('permeability', 'Nml2Quantity_permeability', 0, 0, {'use': 'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('permeability', 'Nml2Quantity_permeability', 0, 0, {'use': u'required'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, permeability=None, segment_groups='all', segments=None, ion=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, permeability=None, segment_groups='all', segments=None, ion=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityGHK"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelDensityGHK, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.permeability = _cast(None, permeability) - self.permeability_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(None, segments) - self.segments_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -13969,52 +10478,20 @@ def factory(*args_, **kwargs_): else: return ChannelDensityGHK(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_permeability(self): - return self.permeability - def set_permeability(self, permeability): - self.permeability = permeability - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_permeability(self, value): # Validate type Nml2Quantity_permeability, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_permeability_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_permeability_patterns_, )) - validate_Nml2Quantity_permeability_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m_per_s| um_per_ms|cm_per_s|cm_per_ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_permeability_patterns_, )) + validate_Nml2Quantity_permeability_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m_per_s| um_per_ms|cm_per_s|cm_per_ms)$']] def hasContent_(self): if ( super(ChannelDensityGHK, self).hasContent_() @@ -14030,10 +10507,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityGHK': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14048,32 +10523,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityGHK') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.permeability is not None and 'permeability' not in already_processed: already_processed.add('permeability') - outfile.write(' permeability=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.permeability), input_name='permeability')), )) + outfile.write(' permeability=%s' % (quote_attrib(self.permeability), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityGHK', fromsubclass_=False, pretty_print=True): - super(ChannelDensityGHK, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityGHK, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -14102,7 +10573,7 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityGHK, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ChannelDensityGHK, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityGHK @@ -14110,48 +10581,37 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityNernst(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityNernst"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(ChannelDensityNernst, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) - self.cond_density_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(None, segments) - self.segments_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14164,64 +10624,20 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNernst(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_condDensity(self): - return self.cond_density - def set_condDensity(self, cond_density): - self.cond_density = cond_density - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] def hasContent_(self): if ( self.variable_parameters or @@ -14238,10 +10654,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityNernst': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14257,46 +10671,37 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNernst') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.cond_density is not None and 'cond_density' not in already_processed: already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) + outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segments), input_name='segment')), )) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNernst', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNernst, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNernst, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -14329,10 +10734,10 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ChannelDensityNernst, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNernst, self).buildChildren(child_, node, nodeName_, True) @@ -14341,51 +10746,39 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensity(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': 'optional'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('cond_density', 'Nml2Quantity_conductanceDensity', 0, 1, {'use': u'optional'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensity"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(ChannelDensity, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.cond_density = _cast(None, cond_density) - self.cond_density_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(int, segments) - self.segments_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -14398,86 +10791,30 @@ def factory(*args_, **kwargs_): else: return ChannelDensity(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_condDensity(self): - return self.cond_density - def set_condDensity(self, cond_density): - self.cond_density = cond_density - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -14495,10 +10832,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensity': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14514,49 +10849,40 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensity, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensity') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.cond_density is not None and 'cond_density' not in already_processed: already_processed.add('cond_density') - outfile.write(' condDensity=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cond_density), input_name='condDensity')), )) + outfile.write(' condDensity=%s' % (quote_attrib(self.cond_density), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensity', fromsubclass_=False, pretty_print=True): - super(ChannelDensity, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensity, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -14582,7 +10908,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = self.gds_parse_integer(value, node, 'segment') + try: + self.segments = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger @@ -14596,10 +10925,10 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ChannelDensity, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensity, self).buildChildren(child_, node, nodeName_, True) @@ -14608,39 +10937,31 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityNonUniformGHK(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityNonUniformGHK"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelDensityNonUniformGHK, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14652,39 +10973,13 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniformGHK(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.variable_parameters or @@ -14701,10 +10996,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniformGHK': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14720,29 +11013,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityNonUniformGHK, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformGHK') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniformGHK', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniformGHK, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniformGHK, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -14756,10 +11044,10 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniformGHK, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformGHK, self).buildChildren(child_, node, nodeName_, True) @@ -14768,39 +11056,31 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityNonUniformNernst(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, ion=None, variable_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityNonUniformNernst"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelDensityNonUniformNernst, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14812,39 +11092,13 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniformNernst(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.variable_parameters or @@ -14861,10 +11115,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniformNernst': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -14880,29 +11132,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityNonUniformNernst, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniformNernst') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniformNernst', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniformNernst, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniformNernst, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -14916,10 +11163,10 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniformNernst, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniformNernst, self).buildChildren(child_, node, nodeName_, True) @@ -14928,42 +11175,33 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelDensityNonUniform(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, erev=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, erev=None, ion=None, variable_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityNonUniform"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelDensityNonUniform, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -14975,54 +11213,20 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNonUniform(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( self.variable_parameters or @@ -15039,10 +11243,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityNonUniform': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15058,32 +11260,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityNonUniform, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNonUniform') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNonUniform', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNonUniform, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelDensityNonUniform, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -15102,10 +11299,10 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelDensityNonUniform, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelDensityNonUniform, self).buildChildren(child_, node, nodeName_, True) @@ -15114,51 +11311,39 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ChannelPopulation(Base): """Specifying the ion here again is redundant, this will be set in - ionChannel definition. It is added here - TEMPORARILY since selecting all ca or na conducting channel - populations/densities in a cell would be difficult otherwise. - Also, it will make it easier to set the correct native simulator value for - erev (e.g. ek for ion = k in NEURON). - Currently a required attribute. - It should be removed in the longer term, due to possible inconsistencies in - this value and that in the ionChannel + ionChannel definition. It is added here TEMPORARILY since + selecting all ca or na conducting channel populations/densities + in a cell would be difficult otherwise. Also, it will make it + easier to set the correct native simulator value for erev (e.g. + ek for ion = k in NEURON). Currently a required attribute. It + should be removed in the longer term, due to possible + inconsistencies in this value and that in the ionChannel element. TODO: remove.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('number', 'NonNegativeInteger', 0, 0, {'use': 'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'variableParameter', 'type': 'VariableParameter'}, None), + MemberSpec_('ion_channel', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('number', 'NonNegativeInteger', 0, 0, {'use': u'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('segment_groups', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('segments', 'NonNegativeInteger', 0, 1, {'use': u'optional'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('variable_parameters', 'VariableParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VariableParameter', u'name': u'variableParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, number=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, number=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelPopulation"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ChannelPopulation, self).__init__(neuro_lex_id, id, **kwargs_) self.ion_channel = _cast(None, ion_channel) - self.ion_channel_nsprefix_ = None self.number = _cast(int, number) - self.number_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None self.segment_groups = _cast(None, segment_groups) - self.segment_groups_nsprefix_ = None self.segments = _cast(int, segments) - self.segments_nsprefix_ = None self.ion = _cast(None, ion) - self.ion_nsprefix_ = None if variable_parameters is None: self.variable_parameters = [] else: self.variable_parameters = variable_parameters - self.variable_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15170,74 +11355,24 @@ def factory(*args_, **kwargs_): else: return ChannelPopulation(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_variableParameter(self): - return self.variable_parameters - def set_variableParameter(self, variable_parameters): - self.variable_parameters = variable_parameters - def add_variableParameter(self, value): - self.variable_parameters.append(value) - def insert_variableParameter_at(self, index, value): - self.variable_parameters.insert(index, value) - def replace_variableParameter_at(self, index, value): - self.variable_parameters[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def get_number(self): - return self.number - def set_number(self, number): - self.number = number - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( self.variable_parameters or @@ -15254,10 +11389,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelPopulation': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15273,41 +11406,36 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelPopulation, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelPopulation') if self.ion_channel is not None and 'ion_channel' not in already_processed: already_processed.add('ion_channel') - outfile.write(' ionChannel=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion_channel), input_name='ionChannel')), )) + outfile.write(' ionChannel=%s' % (quote_attrib(self.ion_channel), )) if self.number is not None and 'number' not in already_processed: already_processed.add('number') - outfile.write(' number="%s"' % self.gds_format_integer(self.number, input_name='number')) + outfile.write(' number=%s' % (quote_attrib(self.number), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) if self.segment_groups != "all" and 'segment_groups' not in already_processed: already_processed.add('segment_groups') - outfile.write(' segmentGroup=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.segment_groups), input_name='segmentGroup')), )) + outfile.write(' segmentGroup=%s' % (quote_attrib(self.segment_groups), )) if self.segments is not None and 'segments' not in already_processed: already_processed.add('segments') - outfile.write(' segment="%s"' % self.gds_format_integer(self.segments, input_name='segment')) + outfile.write(' segment=%s' % (quote_attrib(self.segments), )) if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelPopulation', fromsubclass_=False, pretty_print=True): - super(ChannelPopulation, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ChannelPopulation, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for variableParameter_ in self.variable_parameters: - namespaceprefix_ = self.variable_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.variable_parameters_nsprefix_) else '' variableParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variableParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ionChannel', node) @@ -15318,7 +11446,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('number', node) if value is not None and 'number' not in already_processed: already_processed.add('number') - self.number = self.gds_parse_integer(value, node, 'number') + try: + self.number = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.number < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.number) # validate type NonNegativeInteger @@ -15335,7 +11466,10 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('segment', node) if value is not None and 'segment' not in already_processed: already_processed.add('segment') - self.segments = self.gds_parse_integer(value, node, 'segment') + try: + self.segments = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.segments < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.segments) # validate type NonNegativeInteger @@ -15345,10 +11479,10 @@ def buildAttributes(self, node, attrs, already_processed): self.ion = value self.validate_NmlId(self.ion) # validate type NmlId super(ChannelPopulation, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'variableParameter': obj_ = VariableParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.variable_parameters.append(obj_) obj_.original_tagname_ = 'variableParameter' super(ChannelPopulation, self).buildChildren(child_, node, nodeName_, True) @@ -15356,20 +11490,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Resistivity(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library - generation (e.g. libNeuroML)""" - __hash__ = GeneratedsSuper.__hash__ + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate + library generation (e.g. libNeuroML)""" member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Resistivity"), self).__init__(value, segment_groups, segments, **kwargs_) + super(Resistivity, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15381,10 +11511,6 @@ def factory(*args_, **kwargs_): else: return Resistivity(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Resistivity, self).hasContent_() @@ -15400,10 +11526,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Resistivity': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15417,42 +11541,34 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Resistivity'): super(Resistivity, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Resistivity') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Resistivity', fromsubclass_=False, pretty_print=True): - super(Resistivity, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Resistivity, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Resistivity, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Resistivity, self).buildChildren(child_, node, nodeName_, True) pass # end class Resistivity class InitMembPotential(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library - generation (e.g. libNeuroML)""" - __hash__ = GeneratedsSuper.__hash__ + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate + library generation (e.g. libNeuroML)""" member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("InitMembPotential"), self).__init__(value, segment_groups, segments, **kwargs_) + super(InitMembPotential, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15464,10 +11580,6 @@ def factory(*args_, **kwargs_): else: return InitMembPotential(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(InitMembPotential, self).hasContent_() @@ -15483,10 +11595,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InitMembPotential': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15500,42 +11610,34 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='InitMembPotential'): super(InitMembPotential, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='InitMembPotential') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InitMembPotential', fromsubclass_=False, pretty_print=True): - super(InitMembPotential, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(InitMembPotential, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(InitMembPotential, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(InitMembPotential, self).buildChildren(child_, node, nodeName_, True) pass # end class InitMembPotential class SpecificCapacitance(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library - generation (e.g. libNeuroML)""" - __hash__ = GeneratedsSuper.__hash__ + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate + library generation (e.g. libNeuroML)""" member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpecificCapacitance"), self).__init__(value, segment_groups, segments, **kwargs_) + super(SpecificCapacitance, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15547,10 +11649,6 @@ def factory(*args_, **kwargs_): else: return SpecificCapacitance(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SpecificCapacitance, self).hasContent_() @@ -15566,10 +11664,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpecificCapacitance': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15583,42 +11679,34 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpecificCapacitance'): super(SpecificCapacitance, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpecificCapacitance') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpecificCapacitance', fromsubclass_=False, pretty_print=True): - super(SpecificCapacitance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(SpecificCapacitance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(SpecificCapacitance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpecificCapacitance, self).buildChildren(child_, node, nodeName_, True) pass # end class SpecificCapacitance class SpikeThresh(ValueAcrossSegOrSegGroup): - """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate library - generation (e.g. libNeuroML)""" - __hash__ = GeneratedsSuper.__hash__ + """Using a thin extension of ValueAcrossSegOrSegGroup to facilitate + library generation (e.g. libNeuroML)""" member_data_items_ = [ ] subclass = None superclass = ValueAcrossSegOrSegGroup - def __init__(self, value=None, segment_groups='all', segments=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, value=None, segment_groups='all', segments=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeThresh"), self).__init__(value, segment_groups, segments, **kwargs_) + super(SpikeThresh, self).__init__(value, segment_groups, segments, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15630,10 +11718,6 @@ def factory(*args_, **kwargs_): else: return SpikeThresh(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SpikeThresh, self).hasContent_() @@ -15649,10 +11733,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeThresh': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15666,52 +11748,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SpikeThresh'): super(SpikeThresh, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeThresh') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeThresh', fromsubclass_=False, pretty_print=True): - super(SpikeThresh, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(SpikeThresh, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(SpikeThresh, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeThresh, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeThresh class BiophysicalProperties2CaPools(Standalone): - """Standalone element which is usually inside a single cell, but could be - outside and - referenced by id.""" - __hash__ = GeneratedsSuper.__hash__ + """Standalone element which is usually inside a single cell, but could + be outside and referenced by id.""" member_data_items_ = [ - MemberSpec_('membrane_properties2_ca_pools', 'MembraneProperties2CaPools', 0, 0, {'name': 'membraneProperties2CaPools', 'type': 'MembraneProperties2CaPools'}, None), - MemberSpec_('intracellular_properties2_ca_pools', 'IntracellularProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties2CaPools', 'type': 'IntracellularProperties2CaPools'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('membrane_properties2_ca_pools', 'MembraneProperties2CaPools', 0, 0, {u'type': u'MembraneProperties2CaPools', u'name': u'membraneProperties2CaPools'}, None), + MemberSpec_('intracellular_properties2_ca_pools', 'IntracellularProperties2CaPools', 0, 1, {u'type': u'IntracellularProperties2CaPools', u'name': u'intracellularProperties2CaPools', u'minOccurs': u'0'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties2_ca_pools=None, intracellular_properties2_ca_pools=None, extracellular_properties=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties2_ca_pools=None, intracellular_properties2_ca_pools=None, extracellular_properties=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BiophysicalProperties2CaPools"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(BiophysicalProperties2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.membrane_properties2_ca_pools = membrane_properties2_ca_pools - self.membrane_properties2_ca_pools_nsprefix_ = None self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools - self.intracellular_properties2_ca_pools_nsprefix_ = None self.extracellular_properties = extracellular_properties - self.extracellular_properties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15723,22 +11793,6 @@ def factory(*args_, **kwargs_): else: return BiophysicalProperties2CaPools(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_membraneProperties2CaPools(self): - return self.membrane_properties2_ca_pools - def set_membraneProperties2CaPools(self, membrane_properties2_ca_pools): - self.membrane_properties2_ca_pools = membrane_properties2_ca_pools - def get_intracellularProperties2CaPools(self): - return self.intracellular_properties2_ca_pools - def set_intracellularProperties2CaPools(self, intracellular_properties2_ca_pools): - self.intracellular_properties2_ca_pools = intracellular_properties2_ca_pools - def get_extracellularProperties(self): - return self.extracellular_properties - def set_extracellularProperties(self, extracellular_properties): - self.extracellular_properties = extracellular_properties def hasContent_(self): if ( self.membrane_properties2_ca_pools is not None or @@ -15757,10 +11811,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BiophysicalProperties2CaPools': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15775,47 +11827,40 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BiophysicalProperties2CaPools'): super(BiophysicalProperties2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BiophysicalProperties2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BiophysicalProperties2CaPools', fromsubclass_=False, pretty_print=True): - super(BiophysicalProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BiophysicalProperties2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.membrane_properties2_ca_pools is not None: - namespaceprefix_ = self.membrane_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.membrane_properties2_ca_pools_nsprefix_) else '' self.membrane_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties2CaPools', pretty_print=pretty_print) if self.intracellular_properties2_ca_pools is not None: - namespaceprefix_ = self.intracellular_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties2_ca_pools_nsprefix_) else '' self.intracellular_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties2CaPools', pretty_print=pretty_print) if self.extracellular_properties is not None: - namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(BiophysicalProperties2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'membraneProperties2CaPools': obj_ = MembraneProperties2CaPools.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.membrane_properties2_ca_pools = obj_ obj_.original_tagname_ = 'membraneProperties2CaPools' elif nodeName_ == 'intracellularProperties2CaPools': obj_ = IntracellularProperties2CaPools.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.intracellular_properties2_ca_pools = obj_ obj_.original_tagname_ = 'intracellularProperties2CaPools' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.extracellular_properties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties2CaPools, self).buildChildren(child_, node, nodeName_, True) @@ -15823,30 +11868,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class BiophysicalProperties(Standalone): - """Standalone element which is usually inside a single cell, but could be - outside and - referenced by id.""" - __hash__ = GeneratedsSuper.__hash__ + """Standalone element which is usually inside a single cell, but could + be outside and referenced by id.""" member_data_items_ = [ - MemberSpec_('membrane_properties', 'MembraneProperties', 0, 0, {'name': 'membraneProperties', 'type': 'MembraneProperties'}, None), - MemberSpec_('intracellular_properties', 'IntracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), + MemberSpec_('membrane_properties', 'MembraneProperties', 0, 0, {u'type': u'MembraneProperties', u'name': u'membraneProperties'}, None), + MemberSpec_('intracellular_properties', 'IntracellularProperties', 0, 1, {u'type': u'IntracellularProperties', u'name': u'intracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 0, 1, {u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties=None, intracellular_properties=None, extracellular_properties=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, membrane_properties=None, intracellular_properties=None, extracellular_properties=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BiophysicalProperties"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(BiophysicalProperties, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.membrane_properties = membrane_properties - self.membrane_properties_nsprefix_ = None self.intracellular_properties = intracellular_properties - self.intracellular_properties_nsprefix_ = None self.extracellular_properties = extracellular_properties - self.extracellular_properties_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15858,22 +11895,6 @@ def factory(*args_, **kwargs_): else: return BiophysicalProperties(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_membraneProperties(self): - return self.membrane_properties - def set_membraneProperties(self, membrane_properties): - self.membrane_properties = membrane_properties - def get_intracellularProperties(self): - return self.intracellular_properties - def set_intracellularProperties(self, intracellular_properties): - self.intracellular_properties = intracellular_properties - def get_extracellularProperties(self): - return self.extracellular_properties - def set_extracellularProperties(self, extracellular_properties): - self.extracellular_properties = extracellular_properties def hasContent_(self): if ( self.membrane_properties is not None or @@ -15892,10 +11913,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BiophysicalProperties': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -15910,49 +11929,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BiophysicalProperties'): super(BiophysicalProperties, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BiophysicalProperties') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BiophysicalProperties', fromsubclass_=False, pretty_print=True): - super(BiophysicalProperties, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BiophysicalProperties, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.membrane_properties is not None: - namespaceprefix_ = self.membrane_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.membrane_properties_nsprefix_) else '' self.membrane_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='membraneProperties', pretty_print=pretty_print) if self.intracellular_properties is not None: - namespaceprefix_ = self.intracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties_nsprefix_) else '' self.intracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) if self.extracellular_properties is not None: - namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' self.extracellular_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(BiophysicalProperties, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'membraneProperties': class_obj_ = self.get_class_obj_(child_, MembraneProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.membrane_properties = obj_ obj_.original_tagname_ = 'membraneProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.intracellular_properties = obj_ obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.extracellular_properties = obj_ obj_.original_tagname_ = 'extracellularProperties' super(BiophysicalProperties, self).buildChildren(child_, node, nodeName_, True) @@ -15960,30 +11972,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class InhomogeneousParameter(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('variable', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('metric', 'Metric', 0, 0, {'use': 'required'}), - MemberSpec_('proximal', 'ProximalDetails', 0, 1, {'minOccurs': '0', 'name': 'proximal', 'type': 'ProximalDetails'}, None), - MemberSpec_('distal', 'DistalDetails', 0, 1, {'minOccurs': '0', 'name': 'distal', 'type': 'DistalDetails'}, None), + MemberSpec_('variable', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('metric', 'Metric', 0, 0, {'use': u'required'}), + MemberSpec_('proximal', 'ProximalDetails', 0, 1, {u'type': u'ProximalDetails', u'name': u'proximal', u'minOccurs': u'0'}, None), + MemberSpec_('distal', 'DistalDetails', 0, 1, {u'type': u'DistalDetails', u'name': u'distal', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, variable=None, metric=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, variable=None, metric=None, proximal=None, distal=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("InhomogeneousParameter"), self).__init__(neuro_lex_id, id, **kwargs_) + super(InhomogeneousParameter, self).__init__(neuro_lex_id, id, **kwargs_) self.variable = _cast(None, variable) - self.variable_nsprefix_ = None self.metric = _cast(None, metric) - self.metric_nsprefix_ = None self.proximal = proximal - self.proximal_nsprefix_ = None self.distal = distal - self.distal_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -15995,39 +11999,18 @@ def factory(*args_, **kwargs_): else: return InhomogeneousParameter(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_proximal(self): - return self.proximal - def set_proximal(self, proximal): - self.proximal = proximal - def get_distal(self): - return self.distal - def set_distal(self, distal): - self.distal = distal - def get_variable(self): - return self.variable - def set_variable(self, variable): - self.variable = variable - def get_metric(self): - return self.metric - def set_metric(self, metric): - self.metric = metric def validate_Metric(self, value): # Validate type Metric, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['Path Length from root'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on Metric' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on Metric' % {"value" : value.encode("utf-8")} ) def hasContent_(self): if ( self.proximal is not None or @@ -16045,10 +12028,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'InhomogeneousParameter': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16067,29 +12048,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' variable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.variable), input_name='variable')), )) if self.metric is not None and 'metric' not in already_processed: already_processed.add('metric') - outfile.write(' metric=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.metric), input_name='metric')), )) + outfile.write(' metric=%s' % (quote_attrib(self.metric), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='InhomogeneousParameter', fromsubclass_=False, pretty_print=True): - super(InhomogeneousParameter, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(InhomogeneousParameter, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.proximal is not None: - namespaceprefix_ = self.proximal_nsprefix_ + ':' if (UseCapturedNS_ and self.proximal_nsprefix_) else '' self.proximal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='proximal', pretty_print=pretty_print) if self.distal is not None: - namespaceprefix_ = self.distal_nsprefix_ + ':' if (UseCapturedNS_ and self.distal_nsprefix_) else '' self.distal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='distal', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('variable', node) @@ -16102,15 +12077,15 @@ def buildAttributes(self, node, attrs, already_processed): self.metric = value self.validate_Metric(self.metric) # validate type Metric super(InhomogeneousParameter, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'proximal': obj_ = ProximalDetails.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.proximal = obj_ obj_.original_tagname_ = 'proximal' elif nodeName_ == 'distal': obj_ = DistalDetails.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.distal = obj_ obj_.original_tagname_ = 'distal' super(InhomogeneousParameter, self).buildChildren(child_, node, nodeName_, True) @@ -16118,61 +12093,49 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class SegmentGroup(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('properties', 'Property', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'property', 'type': 'Property'}, None), - MemberSpec_('annotation', 'Annotation', 0, 1, {'minOccurs': '0', 'name': 'annotation', 'type': 'Annotation'}, None), - MemberSpec_('members', 'Member', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'member', 'type': 'Member'}, None), - MemberSpec_('includes', 'Include', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'Include'}, None), - MemberSpec_('paths', 'Path', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'path', 'type': 'Path'}, None), - MemberSpec_('sub_trees', 'SubTree', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subTree', 'type': 'SubTree'}, None), - MemberSpec_('inhomogeneous_parameters', 'InhomogeneousParameter', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'inhomogeneousParameter', 'type': 'InhomogeneousParameter'}, None), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('properties', 'Property', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Property', u'name': u'property', u'minOccurs': u'0'}, None), + MemberSpec_('annotation', 'Annotation', 0, 1, {u'type': u'Annotation', u'name': u'annotation', u'minOccurs': u'0'}, None), + MemberSpec_('members', 'Member', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Member', u'name': u'member', u'minOccurs': u'0'}, None), + MemberSpec_('includes', 'Include', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Include', u'name': u'include', u'minOccurs': u'0'}, None), + MemberSpec_('paths', 'Path', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Path', u'name': u'path', u'minOccurs': u'0'}, None), + MemberSpec_('sub_trees', 'SubTree', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SubTree', u'name': u'subTree', u'minOccurs': u'0'}, None), + MemberSpec_('inhomogeneous_parameters', 'InhomogeneousParameter', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'InhomogeneousParameter', u'name': u'inhomogeneousParameter', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, notes=None, properties=None, annotation=None, members=None, includes=None, paths=None, sub_trees=None, inhomogeneous_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, notes=None, properties=None, annotation=None, members=None, includes=None, paths=None, sub_trees=None, inhomogeneous_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SegmentGroup"), self).__init__(neuro_lex_id, id, **kwargs_) + super(SegmentGroup, self).__init__(neuro_lex_id, id, **kwargs_) self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None if properties is None: self.properties = [] else: self.properties = properties - self.properties_nsprefix_ = None self.annotation = annotation - self.annotation_nsprefix_ = None if members is None: self.members = [] else: self.members = members - self.members_nsprefix_ = None if includes is None: self.includes = [] else: self.includes = includes - self.includes_nsprefix_ = None if paths is None: self.paths = [] else: self.paths = paths - self.paths_nsprefix_ = None if sub_trees is None: self.sub_trees = [] else: self.sub_trees = sub_trees - self.sub_trees_nsprefix_ = None if inhomogeneous_parameters is None: self.inhomogeneous_parameters = [] else: self.inhomogeneous_parameters = inhomogeneous_parameters - self.inhomogeneous_parameters_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16184,88 +12147,10 @@ def factory(*args_, **kwargs_): else: return SegmentGroup(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_property(self): - return self.properties - def set_property(self, properties): - self.properties = properties - def add_property(self, value): - self.properties.append(value) - def insert_property_at(self, index, value): - self.properties.insert(index, value) - def replace_property_at(self, index, value): - self.properties[index] = value - def get_annotation(self): - return self.annotation - def set_annotation(self, annotation): - self.annotation = annotation - def get_member(self): - return self.members - def set_member(self, members): - self.members = members - def add_member(self, value): - self.members.append(value) - def insert_member_at(self, index, value): - self.members.insert(index, value) - def replace_member_at(self, index, value): - self.members[index] = value - def get_include(self): - return self.includes - def set_include(self, includes): - self.includes = includes - def add_include(self, value): - self.includes.append(value) - def insert_include_at(self, index, value): - self.includes.insert(index, value) - def replace_include_at(self, index, value): - self.includes[index] = value - def get_path(self): - return self.paths - def set_path(self, paths): - self.paths = paths - def add_path(self, value): - self.paths.append(value) - def insert_path_at(self, index, value): - self.paths.insert(index, value) - def replace_path_at(self, index, value): - self.paths[index] = value - def get_subTree(self): - return self.sub_trees - def set_subTree(self, sub_trees): - self.sub_trees = sub_trees - def add_subTree(self, value): - self.sub_trees.append(value) - def insert_subTree_at(self, index, value): - self.sub_trees.insert(index, value) - def replace_subTree_at(self, index, value): - self.sub_trees[index] = value - def get_inhomogeneousParameter(self): - return self.inhomogeneous_parameters - def set_inhomogeneousParameter(self, inhomogeneous_parameters): - self.inhomogeneous_parameters = inhomogeneous_parameters - def add_inhomogeneousParameter(self, value): - self.inhomogeneous_parameters.append(value) - def insert_inhomogeneousParameter_at(self, index, value): - self.inhomogeneous_parameters.insert(index, value) - def replace_inhomogeneousParameter_at(self, index, value): - self.inhomogeneous_parameters[index] = value def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def hasContent_(self): if ( self.notes is not None or @@ -16289,10 +12174,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SegmentGroup': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16307,91 +12190,77 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SegmentGroup'): super(SegmentGroup, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SegmentGroup') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SegmentGroup', fromsubclass_=False, pretty_print=True): - super(SegmentGroup, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(SegmentGroup, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) for property_ in self.properties: - namespaceprefix_ = self.properties_nsprefix_ + ':' if (UseCapturedNS_ and self.properties_nsprefix_) else '' property_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='property', pretty_print=pretty_print) if self.annotation is not None: - namespaceprefix_ = self.annotation_nsprefix_ + ':' if (UseCapturedNS_ and self.annotation_nsprefix_) else '' self.annotation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='annotation', pretty_print=pretty_print) for member_ in self.members: - namespaceprefix_ = self.members_nsprefix_ + ':' if (UseCapturedNS_ and self.members_nsprefix_) else '' member_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='member', pretty_print=pretty_print) for include_ in self.includes: - namespaceprefix_ = self.includes_nsprefix_ + ':' if (UseCapturedNS_ and self.includes_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) for path_ in self.paths: - namespaceprefix_ = self.paths_nsprefix_ + ':' if (UseCapturedNS_ and self.paths_nsprefix_) else '' path_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='path', pretty_print=pretty_print) for subTree_ in self.sub_trees: - namespaceprefix_ = self.sub_trees_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_trees_nsprefix_) else '' subTree_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subTree', pretty_print=pretty_print) for inhomogeneousParameter_ in self.inhomogeneous_parameters: - namespaceprefix_ = self.inhomogeneous_parameters_nsprefix_ + ':' if (UseCapturedNS_ and self.inhomogeneous_parameters_nsprefix_) else '' inhomogeneousParameter_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inhomogeneousParameter', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(SegmentGroup, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'property': obj_ = Property.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.properties.append(obj_) obj_.original_tagname_ = 'property' elif nodeName_ == 'annotation': obj_ = Annotation.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.annotation = obj_ obj_.original_tagname_ = 'annotation' elif nodeName_ == 'member': obj_ = Member.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.members.append(obj_) obj_.original_tagname_ = 'member' elif nodeName_ == 'include': obj_ = Include.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.includes.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'path': obj_ = Path.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.paths.append(obj_) obj_.original_tagname_ = 'path' elif nodeName_ == 'subTree': obj_ = SubTree.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sub_trees.append(obj_) obj_.original_tagname_ = 'subTree' elif nodeName_ == 'inhomogeneousParameter': obj_ = InhomogeneousParameter.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.inhomogeneous_parameters.append(obj_) obj_.original_tagname_ = 'inhomogeneousParameter' super(SegmentGroup, self).buildChildren(child_, node, nodeName_, True) @@ -16409,30 +12278,22 @@ def __repr__(self): class Segment(BaseNonNegativeIntegerId): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('name', 'xs:string', 0, 1, {'use': 'optional'}), - MemberSpec_('parent', 'SegmentParent', 0, 1, {'minOccurs': '0', 'name': 'parent', 'type': 'SegmentParent'}, None), - MemberSpec_('proximal', 'Point3DWithDiam', 0, 1, {'minOccurs': '0', 'name': 'proximal', 'type': 'Point3DWithDiam'}, None), - MemberSpec_('distal', 'Point3DWithDiam', 0, 0, {'minOccurs': '1', 'name': 'distal', 'type': 'Point3DWithDiam'}, None), + MemberSpec_('name', 'xs:string', 0, 1, {'use': u'optional'}), + MemberSpec_('parent', 'SegmentParent', 0, 1, {u'type': u'SegmentParent', u'name': u'parent', u'minOccurs': u'0'}, None), + MemberSpec_('proximal', 'Point3DWithDiam', 0, 1, {u'type': u'Point3DWithDiam', u'name': u'proximal', u'minOccurs': u'0'}, None), + MemberSpec_('distal', 'Point3DWithDiam', 0, 0, {u'type': u'Point3DWithDiam', u'name': u'distal', u'minOccurs': u'1'}, None), ] subclass = None superclass = BaseNonNegativeIntegerId - def __init__(self, neuro_lex_id=None, id=None, name=None, parent=None, proximal=None, distal=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, name=None, parent=None, proximal=None, distal=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Segment"), self).__init__(neuro_lex_id, id, **kwargs_) + super(Segment, self).__init__(neuro_lex_id, id, **kwargs_) self.name = _cast(None, name) - self.name_nsprefix_ = None self.parent = parent - self.parent_nsprefix_ = None self.proximal = proximal - self.proximal_nsprefix_ = None self.distal = distal - self.distal_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16441,29 +12302,9 @@ def factory(*args_, **kwargs_): return subclass(*args_, **kwargs_) if Segment.subclass: return Segment.subclass(*args_, **kwargs_) - else: - return Segment(*args_, **kwargs_) - factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_parent(self): - return self.parent - def set_parent(self, parent): - self.parent = parent - def get_proximal(self): - return self.proximal - def set_proximal(self, proximal): - self.proximal = proximal - def get_distal(self): - return self.distal - def set_distal(self, distal): - self.distal = distal - def get_name(self): - return self.name - def set_name(self, name): - self.name = name + else: + return Segment(*args_, **kwargs_) + factory = staticmethod(factory) def hasContent_(self): if ( self.parent is not None or @@ -16482,10 +12323,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Segment': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16503,30 +12342,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('name') outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Segment', fromsubclass_=False, pretty_print=True): - super(Segment, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Segment, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.parent is not None: - namespaceprefix_ = self.parent_nsprefix_ + ':' if (UseCapturedNS_ and self.parent_nsprefix_) else '' self.parent.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parent', pretty_print=pretty_print) if self.proximal is not None: - namespaceprefix_ = self.proximal_nsprefix_ + ':' if (UseCapturedNS_ and self.proximal_nsprefix_) else '' self.proximal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='proximal', pretty_print=pretty_print) if self.distal is not None: - namespaceprefix_ = self.distal_nsprefix_ + ':' if (UseCapturedNS_ and self.distal_nsprefix_) else '' self.distal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='distal', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('name', node) @@ -16534,20 +12366,20 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('name') self.name = value super(Segment, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'parent': obj_ = SegmentParent.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.parent = obj_ obj_.original_tagname_ = 'parent' elif nodeName_ == 'proximal': obj_ = Point3DWithDiam.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.proximal = obj_ obj_.original_tagname_ = 'proximal' elif nodeName_ == 'distal': obj_ = Point3DWithDiam.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.distal = obj_ obj_.original_tagname_ = 'distal' super(Segment, self).buildChildren(child_, node, nodeName_, True) @@ -16627,33 +12459,26 @@ def surface_area(self): class Morphology(Standalone): - """Standalone element which is usually inside a single cell, but could be - outside and - referenced by id.""" - __hash__ = GeneratedsSuper.__hash__ + """Standalone element which is usually inside a single cell, but could + be outside and referenced by id.""" member_data_items_ = [ - MemberSpec_('segments', 'Segment', 1, 0, {'maxOccurs': 'unbounded', 'name': 'segment', 'type': 'Segment'}, None), - MemberSpec_('segment_groups', 'SegmentGroup', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'segmentGroup', 'type': 'SegmentGroup'}, None), + MemberSpec_('segments', 'Segment', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'Segment', u'name': u'segment'}, None), + MemberSpec_('segment_groups', 'SegmentGroup', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SegmentGroup', u'name': u'segmentGroup', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, segments=None, segment_groups=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, segments=None, segment_groups=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Morphology"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(Morphology, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if segments is None: self.segments = [] else: self.segments = segments - self.segments_nsprefix_ = None if segment_groups is None: self.segment_groups = [] else: self.segment_groups = segment_groups - self.segment_groups_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16665,30 +12490,6 @@ def factory(*args_, **kwargs_): else: return Morphology(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_segment(self): - return self.segments - def set_segment(self, segments): - self.segments = segments - def add_segment(self, value): - self.segments.append(value) - def insert_segment_at(self, index, value): - self.segments.insert(index, value) - def replace_segment_at(self, index, value): - self.segments[index] = value - def get_segmentGroup(self): - return self.segment_groups - def set_segmentGroup(self, segment_groups): - self.segment_groups = segment_groups - def add_segmentGroup(self, value): - self.segment_groups.append(value) - def insert_segmentGroup_at(self, index, value): - self.segment_groups.insert(index, value) - def replace_segmentGroup_at(self, index, value): - self.segment_groups[index] = value def hasContent_(self): if ( self.segments or @@ -16706,10 +12507,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Morphology': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16724,39 +12523,33 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='M def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Morphology'): super(Morphology, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Morphology') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Morphology', fromsubclass_=False, pretty_print=True): - super(Morphology, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Morphology, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for segment_ in self.segments: - namespaceprefix_ = self.segments_nsprefix_ + ':' if (UseCapturedNS_ and self.segments_nsprefix_) else '' segment_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segment', pretty_print=pretty_print) for segmentGroup_ in self.segment_groups: - namespaceprefix_ = self.segment_groups_nsprefix_ + ':' if (UseCapturedNS_ and self.segment_groups_nsprefix_) else '' segmentGroup_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='segmentGroup', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Morphology, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'segment': obj_ = Segment.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.segments.append(obj_) obj_.original_tagname_ = 'segment' elif nodeName_ == 'segmentGroup': obj_ = SegmentGroup.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.segment_groups.append(obj_) obj_.original_tagname_ = 'segmentGroup' super(Morphology, self).buildChildren(child_, node, nodeName_, True) @@ -16767,18 +12560,14 @@ def num_segments(self): class BaseCell(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -16791,12 +12580,6 @@ def factory(*args_, **kwargs_): else: return BaseCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseCell, self).hasContent_() @@ -16812,10 +12595,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16832,23 +12613,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCell', fromsubclass_=False, pretty_print=True): - super(BaseCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -16856,25 +12629,21 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseCell, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCell class BaseSynapse(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -16887,12 +12656,6 @@ def factory(*args_, **kwargs_): else: return BaseSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseSynapse, self).hasContent_() @@ -16908,10 +12671,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -16928,23 +12689,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseSynapse', fromsubclass_=False, pretty_print=True): - super(BaseSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -16952,7 +12705,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseSynapse @@ -16960,30 +12713,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class FixedFactorConcentrationModel(Standalone): """Should not be required, as it's present on the species element!""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('rho', 'Nml2Quantity_rhoFactor', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('rho', 'Nml2Quantity_rhoFactor', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, rho=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, rho=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("FixedFactorConcentrationModel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(FixedFactorConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.ion = _cast(None, ion) - self.ion_nsprefix_ = None self.resting_conc = _cast(None, resting_conc) - self.resting_conc_nsprefix_ = None self.decay_constant = _cast(None, decay_constant) - self.decay_constant_nsprefix_ = None self.rho = _cast(None, rho) - self.rho_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -16995,70 +12740,34 @@ def factory(*args_, **kwargs_): else: return FixedFactorConcentrationModel(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion - def get_restingConc(self): - return self.resting_conc - def set_restingConc(self, resting_conc): - self.resting_conc = resting_conc - def get_decayConstant(self): - return self.decay_constant - def set_decayConstant(self, decay_constant): - self.decay_constant = decay_constant - def get_rho(self): - return self.rho - def set_rho(self, rho): - self.rho = rho def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_rhoFactor(self, value): # Validate type Nml2Quantity_rhoFactor, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_rhoFactor_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_rhoFactor_patterns_, )) - validate_Nml2Quantity_rhoFactor_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m_per_A_per_s|mol_per_cm_per_uA_per_ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_rhoFactor_patterns_, )) + validate_Nml2Quantity_rhoFactor_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m_per_A_per_s|mol_per_cm_per_uA_per_ms)$']] def hasContent_(self): if ( super(FixedFactorConcentrationModel, self).hasContent_() @@ -17074,10 +12783,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'FixedFactorConcentrationModel': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17093,28 +12800,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FixedFactorConcentrationModel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FixedFactorConcentrationModel') if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) if self.resting_conc is not None and 'resting_conc' not in already_processed: already_processed.add('resting_conc') - outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.resting_conc), input_name='restingConc')), )) + outfile.write(' restingConc=%s' % (quote_attrib(self.resting_conc), )) if self.decay_constant is not None and 'decay_constant' not in already_processed: already_processed.add('decay_constant') - outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decay_constant), input_name='decayConstant')), )) + outfile.write(' decayConstant=%s' % (quote_attrib(self.decay_constant), )) if self.rho is not None and 'rho' not in already_processed: already_processed.add('rho') - outfile.write(' rho=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.rho), input_name='rho')), )) + outfile.write(' rho=%s' % (quote_attrib(self.rho), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FixedFactorConcentrationModel', fromsubclass_=False, pretty_print=True): - super(FixedFactorConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(FixedFactorConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ion', node) @@ -17138,7 +12841,7 @@ def buildAttributes(self, node, attrs, already_processed): self.rho = value self.validate_Nml2Quantity_rhoFactor(self.rho) # validate type Nml2Quantity_rhoFactor super(FixedFactorConcentrationModel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(FixedFactorConcentrationModel, self).buildChildren(child_, node, nodeName_, True) pass # end class FixedFactorConcentrationModel @@ -17146,30 +12849,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class DecayingPoolConcentrationModel(Standalone): """Should not be required, as it's present on the species element!""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('ion', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': 'required'}), - MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('shell_thickness', 'Nml2Quantity_length', 0, 0, {'use': 'required'}), + MemberSpec_('ion', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('resting_conc', 'Nml2Quantity_concentration', 0, 0, {'use': u'required'}), + MemberSpec_('decay_constant', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('shell_thickness', 'Nml2Quantity_length', 0, 0, {'use': u'required'}), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("DecayingPoolConcentrationModel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(DecayingPoolConcentrationModel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.ion = _cast(None, ion) - self.ion_nsprefix_ = None self.resting_conc = _cast(None, resting_conc) - self.resting_conc_nsprefix_ = None self.decay_constant = _cast(None, decay_constant) - self.decay_constant_nsprefix_ = None self.shell_thickness = _cast(None, shell_thickness) - self.shell_thickness_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -17182,72 +12877,34 @@ def factory(*args_, **kwargs_): else: return DecayingPoolConcentrationModel(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_ion(self): - return self.ion - def set_ion(self, ion): - self.ion = ion - def get_restingConc(self): - return self.resting_conc - def set_restingConc(self, resting_conc): - self.resting_conc = resting_conc - def get_decayConstant(self): - return self.decay_constant - def set_decayConstant(self, decay_constant): - self.decay_constant = decay_constant - def get_shellThickness(self): - return self.shell_thickness - def set_shellThickness(self, shell_thickness): - self.shell_thickness = shell_thickness - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_concentration(self, value): # Validate type Nml2Quantity_concentration, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_concentration_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_concentration_patterns_, )) - validate_Nml2Quantity_concentration_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_concentration_patterns_, )) + validate_Nml2Quantity_concentration_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(mol_per_m3|mol_per_cm3|M|mM)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_length(self, value): # Validate type Nml2Quantity_length, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_length_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_length_patterns_, )) - validate_Nml2Quantity_length_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m|cm|um))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_length_patterns_, )) + validate_Nml2Quantity_length_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(m|cm|um)$']] def hasContent_(self): if ( super(DecayingPoolConcentrationModel, self).hasContent_() @@ -17263,10 +12920,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'DecayingPoolConcentrationModel': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17282,36 +12937,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(DecayingPoolConcentrationModel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DecayingPoolConcentrationModel') if self.ion is not None and 'ion' not in already_processed: already_processed.add('ion') - outfile.write(' ion=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ion), input_name='ion')), )) + outfile.write(' ion=%s' % (quote_attrib(self.ion), )) if self.resting_conc is not None and 'resting_conc' not in already_processed: already_processed.add('resting_conc') - outfile.write(' restingConc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.resting_conc), input_name='restingConc')), )) + outfile.write(' restingConc=%s' % (quote_attrib(self.resting_conc), )) if self.decay_constant is not None and 'decay_constant' not in already_processed: already_processed.add('decay_constant') - outfile.write(' decayConstant=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.decay_constant), input_name='decayConstant')), )) + outfile.write(' decayConstant=%s' % (quote_attrib(self.decay_constant), )) if self.shell_thickness is not None and 'shell_thickness' not in already_processed: already_processed.add('shell_thickness') - outfile.write(' shellThickness=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.shell_thickness), input_name='shellThickness')), )) + outfile.write(' shellThickness=%s' % (quote_attrib(self.shell_thickness), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DecayingPoolConcentrationModel', fromsubclass_=False, pretty_print=True): - super(DecayingPoolConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(DecayingPoolConcentrationModel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('ion', node) @@ -17339,41 +12986,32 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(DecayingPoolConcentrationModel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(DecayingPoolConcentrationModel, self).buildChildren(child_, node, nodeName_, True) pass # end class DecayingPoolConcentrationModel class GateFractionalSubgate(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('fractional_conductance', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('fractional_conductance', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, fractional_conductance=None, notes=None, q10_settings=None, steady_state=None, time_course=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, fractional_conductance=None, notes=None, q10_settings=None, steady_state=None, time_course=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateFractionalSubgate"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateFractionalSubgate, self).__init__(neuro_lex_id, id, **kwargs_) self.fractional_conductance = _cast(None, fractional_conductance) - self.fractional_conductance_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17385,51 +13023,17 @@ def factory(*args_, **kwargs_): else: return GateFractionalSubgate(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_fractionalConductance(self): - return self.fractional_conductance - def set_fractionalConductance(self, fractional_conductance): - self.fractional_conductance = fractional_conductance def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( self.notes is not None or @@ -17449,10 +13053,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateFractionalSubgate': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17468,36 +13070,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateFractionalSubgate, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateFractionalSubgate') if self.fractional_conductance is not None and 'fractional_conductance' not in already_processed: already_processed.add('fractional_conductance') - outfile.write(' fractionalConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.fractional_conductance), input_name='fractionalConductance')), )) + outfile.write(' fractionalConductance=%s' % (quote_attrib(self.fractional_conductance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateFractionalSubgate', fromsubclass_=False, pretty_print=True): - super(GateFractionalSubgate, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateFractionalSubgate, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('fractionalConductance', node) @@ -17506,28 +13100,26 @@ def buildAttributes(self, node, attrs, already_processed): self.fractional_conductance = value self.validate_Nml2Quantity_none(self.fractional_conductance) # validate type Nml2Quantity_none super(GateFractionalSubgate, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(GateFractionalSubgate, self).buildChildren(child_, node, nodeName_, True) @@ -17535,34 +13127,26 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateFractional(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'GateFractionalSubgate', u'name': u'subGate', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, sub_gates=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, sub_gates=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateFractional"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateFractional, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None if sub_gates is None: self.sub_gates = [] else: self.sub_gates = sub_gates - self.sub_gates_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17574,49 +13158,13 @@ def factory(*args_, **kwargs_): else: return GateFractional(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_subGate(self): - return self.sub_gates - def set_subGate(self, sub_gates): - self.sub_gates = sub_gates - def add_subGate(self, value): - self.sub_gates.append(value) - def insert_subGate_at(self, index, value): - self.sub_gates.insert(index, value) - def replace_subGate_at(self, index, value): - self.sub_gates[index] = value - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -17636,10 +13184,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateFractional': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17655,60 +13201,54 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateFractional, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateFractional') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateFractional', fromsubclass_=False, pretty_print=True): - super(GateFractional, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateFractional, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) for subGate_ in self.sub_gates: - namespaceprefix_ = self.sub_gates_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_gates_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateFractional, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sub_gates.append(obj_) obj_.original_tagname_ = 'subGate' super(GateFractional, self).buildChildren(child_, node, nodeName_, True) @@ -17716,28 +13256,21 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHInstantaneous(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, steady_state=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, steady_state=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHInstantaneous"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHInstantaneous, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17749,39 +13282,13 @@ def factory(*args_, **kwargs_): else: return GateHHInstantaneous(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -17800,10 +13307,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHInstantaneous': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17819,52 +13324,47 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHInstantaneous, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHInstantaneous') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHInstantaneous', fromsubclass_=False, pretty_print=True): - super(GateHHInstantaneous, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHInstantaneous, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHInstantaneous, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHInstantaneous, self).buildChildren(child_, node, nodeName_, True) @@ -17872,37 +13372,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHRatesInf(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, steady_state=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, steady_state=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHRatesInf"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHRatesInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.forward_rate = forward_rate - self.forward_rate_nsprefix_ = None self.reverse_rate = reverse_rate - self.reverse_rate_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -17914,51 +13404,13 @@ def factory(*args_, **kwargs_): else: return GateHHRatesInf(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_forwardRate(self): - return self.forward_rate - def set_forwardRate(self, forward_rate): - self.forward_rate = forward_rate - def get_reverseRate(self): - return self.reverse_rate - def set_reverseRate(self, reverse_rate): - self.reverse_rate = reverse_rate - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -17980,10 +13432,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHRatesInf': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -17999,76 +13449,68 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesInf', fromsubclass_=False, pretty_print=True): - super(GateHHRatesInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHRatesInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.forward_rate is not None: - namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) if self.reverse_rate is not None: - namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesInf, self).buildChildren(child_, node, nodeName_, True) @@ -18076,37 +13518,27 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHRatesTau(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHRatesTau"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHRatesTau, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.forward_rate = forward_rate - self.forward_rate_nsprefix_ = None self.reverse_rate = reverse_rate - self.reverse_rate_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18118,51 +13550,13 @@ def factory(*args_, **kwargs_): else: return GateHHRatesTau(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_forwardRate(self): - return self.forward_rate - def set_forwardRate(self, forward_rate): - self.forward_rate = forward_rate - def get_reverseRate(self): - return self.reverse_rate - def set_reverseRate(self, reverse_rate): - self.reverse_rate = reverse_rate - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -18184,10 +13578,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHRatesTau': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18203,76 +13595,68 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesTau, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesTau') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesTau', fromsubclass_=False, pretty_print=True): - super(GateHHRatesTau, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHRatesTau, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.forward_rate is not None: - namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) if self.reverse_rate is not None: - namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesTau, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(GateHHRatesTau, self).buildChildren(child_, node, nodeName_, True) @@ -18280,40 +13664,29 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHRatesTauInf(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHRatesTauInf"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHRatesTauInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.forward_rate = forward_rate - self.forward_rate_nsprefix_ = None self.reverse_rate = reverse_rate - self.reverse_rate_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18325,55 +13698,13 @@ def factory(*args_, **kwargs_): else: return GateHHRatesTauInf(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_forwardRate(self): - return self.forward_rate - def set_forwardRate(self, forward_rate): - self.forward_rate = forward_rate - def get_reverseRate(self): - return self.reverse_rate - def set_reverseRate(self, reverse_rate): - self.reverse_rate = reverse_rate - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -18396,10 +13727,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHRatesTauInf': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18415,84 +13744,75 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRatesTauInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRatesTauInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRatesTauInf', fromsubclass_=False, pretty_print=True): - super(GateHHRatesTauInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHRatesTauInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.forward_rate is not None: - namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) if self.reverse_rate is not None: - namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRatesTauInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHRatesTauInf, self).buildChildren(child_, node, nodeName_, True) @@ -18500,34 +13820,25 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHTauInf(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {'minOccurs': '1', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'minOccurs': '1', 'name': 'steadyState', 'type': 'HHVariable'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'1'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, time_course=None, steady_state=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, time_course=None, steady_state=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHTauInf"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHTauInf, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18539,47 +13850,13 @@ def factory(*args_, **kwargs_): else: return GateHHTauInf(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -18600,10 +13877,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHTauInf': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18619,68 +13894,61 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHTauInf, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHTauInf') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHTauInf', fromsubclass_=False, pretty_print=True): - super(GateHHTauInf, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHTauInf, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHTauInf, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' super(GateHHTauInf, self).buildChildren(child_, node, nodeName_, True) @@ -18688,34 +13956,25 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHRates(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 0, {'minOccurs': '1', 'name': 'reverseRate', 'type': 'HHRate'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'1'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 0, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'1'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHRates"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHRates, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.forward_rate = forward_rate - self.forward_rate_nsprefix_ = None self.reverse_rate = reverse_rate - self.reverse_rate_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18727,47 +13986,13 @@ def factory(*args_, **kwargs_): else: return GateHHRates(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_forwardRate(self): - return self.forward_rate - def set_forwardRate(self, forward_rate): - self.forward_rate = forward_rate - def get_reverseRate(self): - return self.reverse_rate - def set_reverseRate(self, reverse_rate): - self.reverse_rate = reverse_rate - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -18788,10 +14013,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHRates': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -18807,68 +14030,61 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHRates, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHRates') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHRates', fromsubclass_=False, pretty_print=True): - super(GateHHRates, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHRates, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.forward_rate is not None: - namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) if self.reverse_rate is not None: - namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateHHRates, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' super(GateHHRates, self).buildChildren(child_, node, nodeName_, True) @@ -18876,52 +14092,39 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateHHUndetermined(Base): - """Note all sub elements for gateHHrates, gateHHratesTau, gateFractional - etc. allowed here. Which are valid should be constrained by what type - is set""" - __hash__ = GeneratedsSuper.__hash__ + """Note all sub elements for gateHHrates, gateHHratesTau, + gateFractional etc. allowed here. Which are valid should be + constrained by what type is set""" member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('type', 'gateTypes', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('forward_rate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'forwardRate', 'type': 'HHRate'}, None), - MemberSpec_('reverse_rate', 'HHRate', 0, 1, {'minOccurs': '0', 'name': 'reverseRate', 'type': 'HHRate'}, None), - MemberSpec_('time_course', 'HHTime', 0, 1, {'minOccurs': '0', 'name': 'timeCourse', 'type': 'HHTime'}, None), - MemberSpec_('steady_state', 'HHVariable', 0, 1, {'minOccurs': '0', 'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'subGate', 'type': 'GateFractionalSubgate'}, None), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('type', 'gateTypes', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('forward_rate', 'HHRate', 0, 1, {u'type': u'HHRate', u'name': u'forwardRate', u'minOccurs': u'0'}, None), + MemberSpec_('reverse_rate', 'HHRate', 0, 1, {u'type': u'HHRate', u'name': u'reverseRate', u'minOccurs': u'0'}, None), + MemberSpec_('time_course', 'HHTime', 0, 1, {u'type': u'HHTime', u'name': u'timeCourse', u'minOccurs': u'0'}, None), + MemberSpec_('steady_state', 'HHVariable', 0, 1, {u'type': u'HHVariable', u'name': u'steadyState', u'minOccurs': u'0'}, None), + MemberSpec_('sub_gates', 'GateFractionalSubgate', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateFractionalSubgate', u'name': u'subGate', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, type=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, sub_gates=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, type=None, notes=None, q10_settings=None, forward_rate=None, reverse_rate=None, time_course=None, steady_state=None, sub_gates=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateHHUndetermined"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateHHUndetermined, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None self.forward_rate = forward_rate - self.forward_rate_nsprefix_ = None self.reverse_rate = reverse_rate - self.reverse_rate_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None if sub_gates is None: self.sub_gates = [] else: self.sub_gates = sub_gates - self.sub_gates_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -18933,83 +14136,26 @@ def factory(*args_, **kwargs_): else: return GateHHUndetermined(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_forwardRate(self): - return self.forward_rate - def set_forwardRate(self, forward_rate): - self.forward_rate = forward_rate - def get_reverseRate(self): - return self.reverse_rate - def set_reverseRate(self, reverse_rate): - self.reverse_rate = reverse_rate - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_subGate(self): - return self.sub_gates - def set_subGate(self, sub_gates): - self.sub_gates = sub_gates - def add_subGate(self, value): - self.sub_gates.append(value) - def insert_subGate_at(self, index, value): - self.sub_gates.insert(index, value) - def replace_subGate_at(self, index, value): - self.sub_gates[index] = value - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances - def get_type(self): - return self.type - def set_type(self, type): - self.type = type def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_gateTypes(self, value): # Validate type gateTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['gateHHrates', 'gateHHratesTau', 'gateHHtauInf', 'gateHHratesInf', 'gateHHratesTauInf', 'gateHHInstantaneous', 'gateKS', 'gateFractional'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on gateTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on gateTypes' % {"value" : value.encode("utf-8")} ) def hasContent_(self): if ( self.notes is not None or @@ -19032,10 +14178,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateHHUndetermined': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19051,54 +14195,46 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateHHUndetermined, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateHHUndetermined') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateHHUndetermined', fromsubclass_=False, pretty_print=True): - super(GateHHUndetermined, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateHHUndetermined, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) if self.forward_rate is not None: - namespaceprefix_ = self.forward_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_rate_nsprefix_) else '' self.forward_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardRate', pretty_print=pretty_print) if self.reverse_rate is not None: - namespaceprefix_ = self.reverse_rate_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_rate_nsprefix_) else '' self.reverse_rate.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseRate', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) for subGate_ in self.sub_gates: - namespaceprefix_ = self.sub_gates_nsprefix_ + ':' if (UseCapturedNS_ and self.sub_gates_nsprefix_) else '' subGate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subGate', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger @@ -19108,43 +14244,41 @@ def buildAttributes(self, node, attrs, already_processed): self.type = value self.validate_gateTypes(self.type) # validate type gateTypes super(GateHHUndetermined, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'forwardRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_rate = obj_ obj_.original_tagname_ = 'forwardRate' elif nodeName_ == 'reverseRate': obj_ = HHRate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_rate = obj_ obj_.original_tagname_ = 'reverseRate' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' elif nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'subGate': obj_ = GateFractionalSubgate.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sub_gates.append(obj_) obj_.original_tagname_ = 'subGate' super(GateHHUndetermined, self).buildChildren(child_, node, nodeName_, True) @@ -19152,58 +14286,46 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GateKS(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': 'required'}), - MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {'minOccurs': '0', 'name': 'notes', 'type': 'xs:string'}, None), - MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {'minOccurs': '0', 'name': 'q10Settings', 'type': 'Q10Settings'}, None), - MemberSpec_('closed_states', 'ClosedState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'closedState', 'type': 'ClosedState'}, None), - MemberSpec_('open_states', 'OpenState', 1, 0, {'maxOccurs': 'unbounded', 'minOccurs': '1', 'name': 'openState', 'type': 'OpenState'}, None), - MemberSpec_('forward_transition', 'ForwardTransition', 1, 0, {'name': 'forwardTransition', 'type': 'ForwardTransition'}, 2), - MemberSpec_('reverse_transition', 'ReverseTransition', 1, 0, {'name': 'reverseTransition', 'type': 'ReverseTransition'}, 2), - MemberSpec_('tau_inf_transition', 'TauInfTransition', 1, 0, {'name': 'tauInfTransition', 'type': 'TauInfTransition'}, 2), + MemberSpec_('instances', 'PositiveInteger', 0, 0, {'use': u'required'}), + MemberSpec_('notes', ['Notes', 'xs:string'], 0, 1, {u'type': u'xs:string', u'name': u'notes', u'minOccurs': u'0'}, None), + MemberSpec_('q10_settings', 'Q10Settings', 0, 1, {u'type': u'Q10Settings', u'name': u'q10Settings', u'minOccurs': u'0'}, None), + MemberSpec_('closed_states', 'ClosedState', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'ClosedState', u'name': u'closedState', u'minOccurs': u'1'}, None), + MemberSpec_('open_states', 'OpenState', 1, 0, {u'maxOccurs': u'unbounded', u'type': u'OpenState', u'name': u'openState', u'minOccurs': u'1'}, None), + MemberSpec_('forward_transition', 'ForwardTransition', 1, 0, {u'type': u'ForwardTransition', u'name': u'forwardTransition'}, 2), + MemberSpec_('reverse_transition', 'ReverseTransition', 1, 0, {u'type': u'ReverseTransition', u'name': u'reverseTransition'}, 2), + MemberSpec_('tau_inf_transition', 'TauInfTransition', 1, 0, {u'type': u'TauInfTransition', u'name': u'tauInfTransition'}, 2), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, closed_states=None, open_states=None, forward_transition=None, reverse_transition=None, tau_inf_transition=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, instances=None, notes=None, q10_settings=None, closed_states=None, open_states=None, forward_transition=None, reverse_transition=None, tau_inf_transition=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GateKS"), self).__init__(neuro_lex_id, id, **kwargs_) + super(GateKS, self).__init__(neuro_lex_id, id, **kwargs_) self.instances = _cast(int, instances) - self.instances_nsprefix_ = None self.notes = notes self.validate_Notes(self.notes) - self.notes_nsprefix_ = None self.q10_settings = q10_settings - self.q10_settings_nsprefix_ = None if closed_states is None: self.closed_states = [] else: self.closed_states = closed_states - self.closed_states_nsprefix_ = None if open_states is None: self.open_states = [] else: self.open_states = open_states - self.open_states_nsprefix_ = None if forward_transition is None: self.forward_transition = [] else: self.forward_transition = forward_transition - self.forward_transition_nsprefix_ = None if reverse_transition is None: self.reverse_transition = [] else: self.reverse_transition = reverse_transition - self.reverse_transition_nsprefix_ = None if tau_inf_transition is None: self.tau_inf_transition = [] else: self.tau_inf_transition = tau_inf_transition - self.tau_inf_transition_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19215,89 +14337,13 @@ def factory(*args_, **kwargs_): else: return GateKS(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_notes(self): - return self.notes - def set_notes(self, notes): - self.notes = notes - def get_q10Settings(self): - return self.q10_settings - def set_q10Settings(self, q10_settings): - self.q10_settings = q10_settings - def get_closedState(self): - return self.closed_states - def set_closedState(self, closed_states): - self.closed_states = closed_states - def add_closedState(self, value): - self.closed_states.append(value) - def insert_closedState_at(self, index, value): - self.closed_states.insert(index, value) - def replace_closedState_at(self, index, value): - self.closed_states[index] = value - def get_openState(self): - return self.open_states - def set_openState(self, open_states): - self.open_states = open_states - def add_openState(self, value): - self.open_states.append(value) - def insert_openState_at(self, index, value): - self.open_states.insert(index, value) - def replace_openState_at(self, index, value): - self.open_states[index] = value - def get_forwardTransition(self): - return self.forward_transition - def set_forwardTransition(self, forward_transition): - self.forward_transition = forward_transition - def add_forwardTransition(self, value): - self.forward_transition.append(value) - def insert_forwardTransition_at(self, index, value): - self.forward_transition.insert(index, value) - def replace_forwardTransition_at(self, index, value): - self.forward_transition[index] = value - def get_reverseTransition(self): - return self.reverse_transition - def set_reverseTransition(self, reverse_transition): - self.reverse_transition = reverse_transition - def add_reverseTransition(self, value): - self.reverse_transition.append(value) - def insert_reverseTransition_at(self, index, value): - self.reverse_transition.insert(index, value) - def replace_reverseTransition_at(self, index, value): - self.reverse_transition[index] = value - def get_tauInfTransition(self): - return self.tau_inf_transition - def set_tauInfTransition(self, tau_inf_transition): - self.tau_inf_transition = tau_inf_transition - def add_tauInfTransition(self, value): - self.tau_inf_transition.append(value) - def insert_tauInfTransition_at(self, index, value): - self.tau_inf_transition.insert(index, value) - def replace_tauInfTransition_at(self, index, value): - self.tau_inf_transition[index] = value - def get_instances(self): - return self.instances - def set_instances(self, instances): - self.instances = instances def validate_Notes(self, value): - result = True # Validate type Notes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass - return result def validate_PositiveInteger(self, value): # Validate type PositiveInteger, a restriction on xs:positiveInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def hasContent_(self): if ( @@ -19321,10 +14367,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GateKS': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19340,92 +14384,82 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GateKS, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GateKS') if self.instances is not None and 'instances' not in already_processed: already_processed.add('instances') - outfile.write(' instances="%s"' % self.gds_format_integer(self.instances, input_name='instances')) + outfile.write(' instances=%s' % (quote_attrib(self.instances), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GateKS', fromsubclass_=False, pretty_print=True): - super(GateKS, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(GateKS, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.notes is not None: - namespaceprefix_ = self.notes_nsprefix_ + ':' if (UseCapturedNS_ and self.notes_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%snotes>%s%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.notes), input_name='notes')), namespaceprefix_ , eol_)) if self.q10_settings is not None: - namespaceprefix_ = self.q10_settings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_settings_nsprefix_) else '' self.q10_settings.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10Settings', pretty_print=pretty_print) for closedState_ in self.closed_states: - namespaceprefix_ = self.closed_states_nsprefix_ + ':' if (UseCapturedNS_ and self.closed_states_nsprefix_) else '' closedState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='closedState', pretty_print=pretty_print) for openState_ in self.open_states: - namespaceprefix_ = self.open_states_nsprefix_ + ':' if (UseCapturedNS_ and self.open_states_nsprefix_) else '' openState_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='openState', pretty_print=pretty_print) for forwardTransition_ in self.forward_transition: - namespaceprefix_ = self.forward_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.forward_transition_nsprefix_) else '' forwardTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forwardTransition', pretty_print=pretty_print) for reverseTransition_ in self.reverse_transition: - namespaceprefix_ = self.reverse_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.reverse_transition_nsprefix_) else '' reverseTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reverseTransition', pretty_print=pretty_print) for tauInfTransition_ in self.tau_inf_transition: - namespaceprefix_ = self.tau_inf_transition_nsprefix_ + ':' if (UseCapturedNS_ and self.tau_inf_transition_nsprefix_) else '' tauInfTransition_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tauInfTransition', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('instances', node) if value is not None and 'instances' not in already_processed: already_processed.add('instances') - self.instances = self.gds_parse_integer(value, node, 'instances') + try: + self.instances = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.instances <= 0: raise_parse_error(node, 'Invalid PositiveInteger') self.validate_PositiveInteger(self.instances) # validate type PositiveInteger super(GateKS, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'notes': - value_ = child_.text - value_ = self.gds_parse_string(value_, node, 'notes') - value_ = self.gds_validate_string(value_, node, 'notes') - self.notes = value_ - self.notes_nsprefix_ = child_.prefix + notes_ = child_.text + notes_ = self.gds_validate_string(notes_, node, 'notes') + self.notes = notes_ # validate type Notes self.validate_Notes(self.notes) elif nodeName_ == 'q10Settings': obj_ = Q10Settings.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_settings = obj_ obj_.original_tagname_ = 'q10Settings' elif nodeName_ == 'closedState': obj_ = ClosedState.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.closed_states.append(obj_) obj_.original_tagname_ = 'closedState' elif nodeName_ == 'openState': obj_ = OpenState.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.open_states.append(obj_) obj_.original_tagname_ = 'openState' elif nodeName_ == 'forwardTransition': obj_ = ForwardTransition.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.forward_transition.append(obj_) obj_.original_tagname_ = 'forwardTransition' elif nodeName_ == 'reverseTransition': obj_ = ReverseTransition.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.reverse_transition.append(obj_) obj_.original_tagname_ = 'reverseTransition' elif nodeName_ == 'tauInfTransition': obj_ = TauInfTransition.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.tau_inf_transition.append(obj_) obj_.original_tagname_ = 'tauInfTransition' super(GateKS, self).buildChildren(child_, node, nodeName_, True) @@ -19433,30 +14467,22 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class TauInfTransition(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('steady_state', 'HHVariable', 0, 0, {'name': 'steadyState', 'type': 'HHVariable'}, None), - MemberSpec_('time_course', 'HHTime', 0, 0, {'name': 'timeCourse', 'type': 'HHTime'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('steady_state', 'HHVariable', 0, 0, {u'type': u'HHVariable', u'name': u'steadyState'}, None), + MemberSpec_('time_course', 'HHTime', 0, 0, {u'type': u'HHTime', u'name': u'timeCourse'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, steady_state=None, time_course=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, steady_state=None, time_course=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("TauInfTransition"), self).__init__(neuro_lex_id, id, **kwargs_) + super(TauInfTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) - self.from__nsprefix_ = None self.to = _cast(None, to) - self.to_nsprefix_ = None self.steady_state = steady_state - self.steady_state_nsprefix_ = None self.time_course = time_course - self.time_course_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19468,37 +14494,13 @@ def factory(*args_, **kwargs_): else: return TauInfTransition(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_steadyState(self): - return self.steady_state - def set_steadyState(self, steady_state): - self.steady_state = steady_state - def get_timeCourse(self): - return self.time_course - def set_timeCourse(self, time_course): - self.time_course = time_course - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.steady_state is not None or @@ -19516,10 +14518,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='T eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'TauInfTransition': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19535,32 +14535,26 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(TauInfTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='TauInfTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) + outfile.write(' from=%s' % (quote_attrib(self.from_), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) + outfile.write(' to=%s' % (quote_attrib(self.to), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='TauInfTransition', fromsubclass_=False, pretty_print=True): - super(TauInfTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(TauInfTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.steady_state is not None: - namespaceprefix_ = self.steady_state_nsprefix_ + ':' if (UseCapturedNS_ and self.steady_state_nsprefix_) else '' self.steady_state.export(outfile, level, namespaceprefix_, namespacedef_='', name_='steadyState', pretty_print=pretty_print) if self.time_course is not None: - namespaceprefix_ = self.time_course_nsprefix_ + ':' if (UseCapturedNS_ and self.time_course_nsprefix_) else '' self.time_course.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timeCourse', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -19574,15 +14568,15 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(TauInfTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'steadyState': obj_ = HHVariable.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.steady_state = obj_ obj_.original_tagname_ = 'steadyState' elif nodeName_ == 'timeCourse': obj_ = HHTime.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.time_course = obj_ obj_.original_tagname_ = 'timeCourse' super(TauInfTransition, self).buildChildren(child_, node, nodeName_, True) @@ -19590,25 +14584,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ReverseTransition(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ReverseTransition"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ReverseTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) - self.from__nsprefix_ = None self.to = _cast(None, to) - self.to_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -19624,33 +14612,13 @@ def factory(*args_, **kwargs_): else: return ReverseTransition(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -19667,10 +14635,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='R eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ReverseTransition': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19686,31 +14652,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ReverseTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ReverseTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) + outfile.write(' from=%s' % (quote_attrib(self.from_), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) + outfile.write(' to=%s' % (quote_attrib(self.to), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ReverseTransition', fromsubclass_=False, pretty_print=True): - super(ReverseTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ReverseTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -19724,33 +14683,28 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(ReverseTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'ReverseTransition') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'ReverseTransition') + if obj_ is not None: + self.add_anytypeobjs_(obj_) super(ReverseTransition, self).buildChildren(child_, node, nodeName_, True) # end class ReverseTransition class ForwardTransition(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('from_', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('to', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('__ANY__', '__ANY__', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'processContents': 'skip'}, None), + MemberSpec_('from_', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('to', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('__ANY__', '__ANY__', 1, 1, {u'maxOccurs': u'unbounded', u'processContents': u'skip', u'minOccurs': u'0'}, None), ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, from_=None, to=None, anytypeobjs_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ForwardTransition"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ForwardTransition, self).__init__(neuro_lex_id, id, **kwargs_) self.from_ = _cast(None, from_) - self.from__nsprefix_ = None self.to = _cast(None, to) - self.to_nsprefix_ = None if anytypeobjs_ is None: self.anytypeobjs_ = [] else: @@ -19766,33 +14720,13 @@ def factory(*args_, **kwargs_): else: return ForwardTransition(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_anytypeobjs_(self): return self.anytypeobjs_ - def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_ - def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value) - def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value - def get_from(self): - return self.from_ - def set_from(self, from_): - self.from_ = from_ - def get_to(self): - return self.to - def set_to(self, to): - self.to = to def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.anytypeobjs_ or @@ -19809,10 +14743,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ForwardTransition': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19828,31 +14760,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ForwardTransition, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ForwardTransition') if self.from_ is not None and 'from_' not in already_processed: already_processed.add('from_') - outfile.write(' from=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.from_), input_name='from')), )) + outfile.write(' from=%s' % (quote_attrib(self.from_), )) if self.to is not None and 'to' not in already_processed: already_processed.add('to') - outfile.write(' to=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.to), input_name='to')), )) + outfile.write(' to=%s' % (quote_attrib(self.to), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ForwardTransition', fromsubclass_=False, pretty_print=True): - super(ForwardTransition, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ForwardTransition, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' - if not fromsubclass_: - for obj_ in self.anytypeobjs_: - showIndent(outfile, level, pretty_print) - outfile.write(obj_) - outfile.write('\n') - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node - already_processed = set() - self.ns_prefix_ = node.prefix + for obj_ in self.anytypeobjs_: + obj_.export(outfile, level, namespaceprefix_, pretty_print=pretty_print) + def build(self, node): + already_processed = set() self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('from', node) @@ -19866,26 +14791,23 @@ def buildAttributes(self, node, attrs, already_processed): self.to = value self.validate_NmlId(self.to) # validate type NmlId super(ForwardTransition, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): - content_ = self.gds_build_any(child_, 'ForwardTransition') - self.add_anytypeobjs_(content_) + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): + obj_ = self.gds_build_any(child_, 'ForwardTransition') + if obj_ is not None: + self.add_anytypeobjs_(obj_) super(ForwardTransition, self).buildChildren(child_, node, nodeName_, True) # end class ForwardTransition class OpenState(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("OpenState"), self).__init__(neuro_lex_id, id, **kwargs_) + super(OpenState, self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19897,10 +14819,6 @@ def factory(*args_, **kwargs_): else: return OpenState(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(OpenState, self).hasContent_() @@ -19916,10 +14834,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='O eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'OpenState': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -19933,40 +14849,32 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='O def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='OpenState'): super(OpenState, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='OpenState') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='OpenState', fromsubclass_=False, pretty_print=True): - super(OpenState, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(OpenState, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(OpenState, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(OpenState, self).buildChildren(child_, node, nodeName_, True) pass # end class OpenState class ClosedState(Base): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = Base - def __init__(self, neuro_lex_id=None, id=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ClosedState"), self).__init__(neuro_lex_id, id, **kwargs_) + super(ClosedState, self).__init__(neuro_lex_id, id, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -19978,10 +14886,6 @@ def factory(*args_, **kwargs_): else: return ClosedState(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ClosedState, self).hasContent_() @@ -19997,10 +14901,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ClosedState': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20014,22 +14916,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ClosedState'): super(ClosedState, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ClosedState') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ClosedState', fromsubclass_=False, pretty_print=True): - super(ClosedState, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ClosedState, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ClosedState, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ClosedState, self).buildChildren(child_, node, nodeName_, True) pass # end class ClosedState @@ -20037,30 +14935,23 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IonChannelKS(Standalone): """Kinetic scheme based ion channel.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), - MemberSpec_('gate_kses', 'GateKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateKS', 'type': 'GateKS'}, None), + MemberSpec_('species', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': u'optional'}), + MemberSpec_('gate_kses', 'GateKS', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateKS', u'name': u'gateKS', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, species=None, conductance=None, gate_kses=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, species=None, conductance=None, gate_kses=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IonChannelKS"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(IonChannelKS, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.species = _cast(None, species) - self.species_nsprefix_ = None self.conductance = _cast(None, conductance) - self.conductance_nsprefix_ = None if gate_kses is None: self.gate_kses = [] else: self.gate_kses = gate_kses - self.gate_kses_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20072,50 +14963,20 @@ def factory(*args_, **kwargs_): else: return IonChannelKS(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_gateKS(self): - return self.gate_kses - def set_gateKS(self, gate_kses): - self.gate_kses = gate_kses - def add_gateKS(self, value): - self.gate_kses.append(value) - def insert_gateKS_at(self, index, value): - self.gate_kses.insert(index, value) - def replace_gateKS_at(self, index, value): - self.gate_kses[index] = value - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def get_conductance(self): - return self.conductance - def set_conductance(self, conductance): - self.conductance = conductance def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def hasContent_(self): if ( self.gate_kses or @@ -20132,10 +14993,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IonChannelKS': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20151,29 +15010,24 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IonChannelKS, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelKS') if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) + outfile.write(' species=%s' % (quote_attrib(self.species), )) if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) + outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelKS', fromsubclass_=False, pretty_print=True): - super(IonChannelKS, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(IonChannelKS, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for gateKS_ in self.gate_kses: - namespaceprefix_ = self.gate_kses_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_kses_nsprefix_) else '' gateKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateKS', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('species', node) @@ -20187,10 +15041,10 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(IonChannelKS, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'gateKS': obj_ = GateKS.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_kses.append(obj_) obj_.original_tagname_ = 'gateKS' super(IonChannelKS, self).buildChildren(child_, node, nodeName_, True) @@ -20198,24 +15052,19 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IonChannelScalable(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('q10_conductance_scalings', 'Q10ConductanceScaling', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'q10ConductanceScaling', 'type': 'Q10ConductanceScaling'}, None), + MemberSpec_('q10_conductance_scalings', 'Q10ConductanceScaling', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Q10ConductanceScaling', u'name': u'q10ConductanceScaling', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IonChannelScalable"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(IonChannelScalable, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) if q10_conductance_scalings is None: self.q10_conductance_scalings = [] else: self.q10_conductance_scalings = q10_conductance_scalings - self.q10_conductance_scalings_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -20228,22 +15077,6 @@ def factory(*args_, **kwargs_): else: return IonChannelScalable(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_q10ConductanceScaling(self): - return self.q10_conductance_scalings - def set_q10ConductanceScaling(self, q10_conductance_scalings): - self.q10_conductance_scalings = q10_conductance_scalings - def add_q10ConductanceScaling(self, value): - self.q10_conductance_scalings.append(value) - def insert_q10ConductanceScaling_at(self, index, value): - self.q10_conductance_scalings.insert(index, value) - def replace_q10ConductanceScaling_at(self, index, value): - self.q10_conductance_scalings[index] = value - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( self.q10_conductance_scalings or @@ -20260,10 +15093,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IonChannelScalable': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -20280,30 +15111,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelScalable', fromsubclass_=False, pretty_print=True): - super(IonChannelScalable, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(IonChannelScalable, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for q10ConductanceScaling_ in self.q10_conductance_scalings: - namespaceprefix_ = self.q10_conductance_scalings_nsprefix_ + ':' if (UseCapturedNS_ and self.q10_conductance_scalings_nsprefix_) else '' q10ConductanceScaling_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='q10ConductanceScaling', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -20311,10 +15133,10 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IonChannelScalable, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'q10ConductanceScaling': obj_ = Q10ConductanceScaling.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.q10_conductance_scalings.append(obj_) obj_.original_tagname_ = 'q10ConductanceScaling' super(IonChannelScalable, self).buildChildren(child_, node, nodeName_, True) @@ -20322,420 +15144,349 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class NeuroMLDocument(Standalone): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('includes', 'IncludeType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'include', 'type': 'IncludeType'}, None), - MemberSpec_('extracellular_properties', 'ExtracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'extracellularProperties', 'type': 'ExtracellularProperties'}, None), - MemberSpec_('intracellular_properties', 'IntracellularProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'intracellularProperties', 'type': 'IntracellularProperties'}, None), - MemberSpec_('morphology', 'Morphology', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), - MemberSpec_('ion_channel', 'IonChannel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannel', 'type': 'IonChannel'}, None), - MemberSpec_('ion_channel_hhs', 'IonChannelHH', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelHH', 'type': 'IonChannelHH'}, None), - MemberSpec_('ion_channel_v_shifts', 'IonChannelVShift', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelVShift', 'type': 'IonChannelVShift'}, None), - MemberSpec_('ion_channel_kses', 'IonChannelKS', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ionChannelKS', 'type': 'IonChannelKS'}, None), - MemberSpec_('decaying_pool_concentration_models', 'DecayingPoolConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'decayingPoolConcentrationModel', 'type': 'DecayingPoolConcentrationModel'}, None), - MemberSpec_('fixed_factor_concentration_models', 'FixedFactorConcentrationModel', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fixedFactorConcentrationModel', 'type': 'FixedFactorConcentrationModel'}, None), - MemberSpec_('alpha_current_synapses', 'AlphaCurrentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrentSynapse', 'type': 'AlphaCurrentSynapse'}, None), - MemberSpec_('alpha_synapses', 'AlphaSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaSynapse', 'type': 'AlphaSynapse'}, None), - MemberSpec_('exp_one_synapses', 'ExpOneSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expOneSynapse', 'type': 'ExpOneSynapse'}, None), - MemberSpec_('exp_two_synapses', 'ExpTwoSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expTwoSynapse', 'type': 'ExpTwoSynapse'}, None), - MemberSpec_('exp_three_synapses', 'ExpThreeSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expThreeSynapse', 'type': 'ExpThreeSynapse'}, None), - MemberSpec_('blocking_plastic_synapses', 'BlockingPlasticSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'blockingPlasticSynapse', 'type': 'BlockingPlasticSynapse'}, None), - MemberSpec_('double_synapses', 'DoubleSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'doubleSynapse', 'type': 'DoubleSynapse'}, None), - MemberSpec_('gap_junctions', 'GapJunction', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gapJunction', 'type': 'GapJunction'}, None), - MemberSpec_('silent_synapses', 'SilentSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'silentSynapse', 'type': 'SilentSynapse'}, None), - MemberSpec_('linear_graded_synapses', 'LinearGradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'linearGradedSynapse', 'type': 'LinearGradedSynapse'}, None), - MemberSpec_('graded_synapses', 'GradedSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gradedSynapse', 'type': 'GradedSynapse'}, None), - MemberSpec_('biophysical_properties', 'BiophysicalProperties', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), - MemberSpec_('cells', 'Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell', 'type': 'Cell'}, None), - MemberSpec_('cell2_ca_poolses', 'Cell2CaPools', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'cell2CaPools', 'type': 'Cell2CaPools'}, None), - MemberSpec_('base_cells', 'BaseCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'baseCell', 'type': 'BaseCell'}, None), - MemberSpec_('iaf_tau_cells', 'IafTauCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauCell', 'type': 'IafTauCell'}, None), - MemberSpec_('iaf_tau_ref_cells', 'IafTauRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafTauRefCell', 'type': 'IafTauRefCell'}, None), - MemberSpec_('iaf_cells', 'IafCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafCell', 'type': 'IafCell'}, None), - MemberSpec_('iaf_ref_cells', 'IafRefCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'iafRefCell', 'type': 'IafRefCell'}, None), - MemberSpec_('izhikevich_cells', 'IzhikevichCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevichCell', 'type': 'IzhikevichCell'}, None), - MemberSpec_('izhikevich2007_cells', 'Izhikevich2007Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'izhikevich2007Cell', 'type': 'Izhikevich2007Cell'}, None), - MemberSpec_('ad_ex_ia_f_cells', 'AdExIaFCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'adExIaFCell', 'type': 'AdExIaFCell'}, None), - MemberSpec_('fitz_hugh_nagumo_cells', 'FitzHughNagumoCell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumoCell', 'type': 'FitzHughNagumoCell'}, None), - MemberSpec_('fitz_hugh_nagumo1969_cells', 'FitzHughNagumo1969Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'fitzHughNagumo1969Cell', 'type': 'FitzHughNagumo1969Cell'}, None), - MemberSpec_('pinsky_rinzel_ca3_cells', 'PinskyRinzelCA3Cell', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pinskyRinzelCA3Cell', 'type': 'PinskyRinzelCA3Cell'}, None), - MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGenerator', 'type': 'PulseGenerator'}, None), - MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'pulseGeneratorDL', 'type': 'PulseGeneratorDL'}, None), - MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGenerator', 'type': 'SineGenerator'}, None), - MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'sineGeneratorDL', 'type': 'SineGeneratorDL'}, None), - MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGenerator', 'type': 'RampGenerator'}, None), - MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'rampGeneratorDL', 'type': 'RampGeneratorDL'}, None), - MemberSpec_('compound_inputs', 'CompoundInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInput', 'type': 'CompoundInput'}, None), - MemberSpec_('compound_input_dls', 'CompoundInputDL', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'compoundInputDL', 'type': 'CompoundInputDL'}, None), - MemberSpec_('voltage_clamps', 'VoltageClamp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClamp', 'type': 'VoltageClamp'}, None), - MemberSpec_('voltage_clamp_triples', 'VoltageClampTriple', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'voltageClampTriple', 'type': 'VoltageClampTriple'}, None), - MemberSpec_('spike_arrays', 'SpikeArray', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeArray', 'type': 'SpikeArray'}, None), - MemberSpec_('timed_synaptic_inputs', 'TimedSynapticInput', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'timedSynapticInput', 'type': 'TimedSynapticInput'}, None), - MemberSpec_('spike_generators', 'SpikeGenerator', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGenerator', 'type': 'SpikeGenerator'}, None), - MemberSpec_('spike_generator_randoms', 'SpikeGeneratorRandom', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRandom', 'type': 'SpikeGeneratorRandom'}, None), - MemberSpec_('spike_generator_poissons', 'SpikeGeneratorPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorPoisson', 'type': 'SpikeGeneratorPoisson'}, None), - MemberSpec_('spike_generator_ref_poissons', 'SpikeGeneratorRefPoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'spikeGeneratorRefPoisson', 'type': 'SpikeGeneratorRefPoisson'}, None), - MemberSpec_('poisson_firing_synapses', 'PoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'poissonFiringSynapse', 'type': 'PoissonFiringSynapse'}, None), - MemberSpec_('transient_poisson_firing_synapses', 'TransientPoissonFiringSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'transientPoissonFiringSynapse', 'type': 'TransientPoissonFiringSynapse'}, None), - MemberSpec_('IF_curr_alpha', 'IF_curr_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_alpha', 'type': 'IF_curr_alpha'}, None), - MemberSpec_('IF_curr_exp', 'IF_curr_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_curr_exp', 'type': 'IF_curr_exp'}, None), - MemberSpec_('IF_cond_alpha', 'IF_cond_alpha', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_cond_alpha', 'type': 'IF_cond_alpha'}, None), - MemberSpec_('IF_cond_exp', 'IF_cond_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'IF_cond_exp', 'type': 'IF_cond_exp'}, None), - MemberSpec_('EIF_cond_exp_isfa_ista', 'EIF_cond_exp_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_exp_isfa_ista', 'type': 'EIF_cond_exp_isfa_ista'}, None), - MemberSpec_('EIF_cond_alpha_isfa_ista', 'EIF_cond_alpha_isfa_ista', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'EIF_cond_alpha_isfa_ista', 'type': 'EIF_cond_alpha_isfa_ista'}, None), - MemberSpec_('HH_cond_exp', 'HH_cond_exp', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'HH_cond_exp', 'type': 'HH_cond_exp'}, None), - MemberSpec_('exp_cond_synapses', 'ExpCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCondSynapse', 'type': 'ExpCondSynapse'}, None), - MemberSpec_('alpha_cond_synapses', 'AlphaCondSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCondSynapse', 'type': 'AlphaCondSynapse'}, None), - MemberSpec_('exp_curr_synapses', 'ExpCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'expCurrSynapse', 'type': 'ExpCurrSynapse'}, None), - MemberSpec_('alpha_curr_synapses', 'AlphaCurrSynapse', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'alphaCurrSynapse', 'type': 'AlphaCurrSynapse'}, None), - MemberSpec_('SpikeSourcePoisson', 'SpikeSourcePoisson', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'SpikeSourcePoisson', 'type': 'SpikeSourcePoisson'}, None), - MemberSpec_('networks', 'Network', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'network', 'type': 'Network'}, None), - MemberSpec_('ComponentType', 'ComponentType', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'ComponentType', 'type': 'ComponentType'}, None), + MemberSpec_('includes', 'IncludeType', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IncludeType', u'name': u'include', u'minOccurs': u'0'}, None), + MemberSpec_('extracellular_properties', 'ExtracellularProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExtracellularProperties', u'name': u'extracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('intracellular_properties', 'IntracellularProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IntracellularProperties', u'name': u'intracellularProperties', u'minOccurs': u'0'}, None), + MemberSpec_('morphology', 'Morphology', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Morphology', u'name': u'morphology', u'minOccurs': u'0'}, None), + MemberSpec_('ion_channel', 'IonChannel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannel', u'name': u'ionChannel', u'minOccurs': u'0'}, None), + MemberSpec_('ion_channel_hhs', 'IonChannelHH', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelHH', u'name': u'ionChannelHH', u'minOccurs': u'0'}, None), + MemberSpec_('ion_channel_v_shifts', 'IonChannelVShift', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelVShift', u'name': u'ionChannelVShift', u'minOccurs': u'0'}, None), + MemberSpec_('ion_channel_kses', 'IonChannelKS', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IonChannelKS', u'name': u'ionChannelKS', u'minOccurs': u'0'}, None), + MemberSpec_('decaying_pool_concentration_models', 'DecayingPoolConcentrationModel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DecayingPoolConcentrationModel', u'name': u'decayingPoolConcentrationModel', u'minOccurs': u'0'}, None), + MemberSpec_('fixed_factor_concentration_models', 'FixedFactorConcentrationModel', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FixedFactorConcentrationModel', u'name': u'fixedFactorConcentrationModel', u'minOccurs': u'0'}, None), + MemberSpec_('alpha_current_synapses', 'AlphaCurrentSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCurrentSynapse', u'name': u'alphaCurrentSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('alpha_synapses', 'AlphaSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaSynapse', u'name': u'alphaSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('exp_one_synapses', 'ExpOneSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpOneSynapse', u'name': u'expOneSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('exp_two_synapses', 'ExpTwoSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpTwoSynapse', u'name': u'expTwoSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('exp_three_synapses', 'ExpThreeSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpThreeSynapse', u'name': u'expThreeSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('blocking_plastic_synapses', 'BlockingPlasticSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BlockingPlasticSynapse', u'name': u'blockingPlasticSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('double_synapses', 'DoubleSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'DoubleSynapse', u'name': u'doubleSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('gap_junctions', 'GapJunction', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GapJunction', u'name': u'gapJunction', u'minOccurs': u'0'}, None), + MemberSpec_('silent_synapses', 'SilentSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SilentSynapse', u'name': u'silentSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('linear_graded_synapses', 'LinearGradedSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'LinearGradedSynapse', u'name': u'linearGradedSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('graded_synapses', 'GradedSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GradedSynapse', u'name': u'gradedSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('biophysical_properties', 'BiophysicalProperties', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BiophysicalProperties', u'name': u'biophysicalProperties', u'minOccurs': u'0'}, None), + MemberSpec_('cells', 'Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Cell', u'name': u'cell', u'minOccurs': u'0'}, None), + MemberSpec_('cell2_ca_poolses', 'Cell2CaPools', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Cell2CaPools', u'name': u'cell2CaPools', u'minOccurs': u'0'}, None), + MemberSpec_('base_cells', 'BaseCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'BaseCell', u'name': u'baseCell', u'minOccurs': u'0'}, None), + MemberSpec_('iaf_tau_cells', 'IafTauCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafTauCell', u'name': u'iafTauCell', u'minOccurs': u'0'}, None), + MemberSpec_('iaf_tau_ref_cells', 'IafTauRefCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafTauRefCell', u'name': u'iafTauRefCell', u'minOccurs': u'0'}, None), + MemberSpec_('iaf_cells', 'IafCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafCell', u'name': u'iafCell', u'minOccurs': u'0'}, None), + MemberSpec_('iaf_ref_cells', 'IafRefCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IafRefCell', u'name': u'iafRefCell', u'minOccurs': u'0'}, None), + MemberSpec_('izhikevich_cells', 'IzhikevichCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IzhikevichCell', u'name': u'izhikevichCell', u'minOccurs': u'0'}, None), + MemberSpec_('izhikevich2007_cells', 'Izhikevich2007Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Izhikevich2007Cell', u'name': u'izhikevich2007Cell', u'minOccurs': u'0'}, None), + MemberSpec_('ad_ex_ia_f_cells', 'AdExIaFCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AdExIaFCell', u'name': u'adExIaFCell', u'minOccurs': u'0'}, None), + MemberSpec_('fitz_hugh_nagumo_cells', 'FitzHughNagumoCell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FitzHughNagumoCell', u'name': u'fitzHughNagumoCell', u'minOccurs': u'0'}, None), + MemberSpec_('fitz_hugh_nagumo1969_cells', 'FitzHughNagumo1969Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'FitzHughNagumo1969Cell', u'name': u'fitzHughNagumo1969Cell', u'minOccurs': u'0'}, None), + MemberSpec_('pinsky_rinzel_ca3_cells', 'PinskyRinzelCA3Cell', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PinskyRinzelCA3Cell', u'name': u'pinskyRinzelCA3Cell', u'minOccurs': u'0'}, None), + MemberSpec_('pulse_generators', 'PulseGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGenerator', u'name': u'pulseGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('pulse_generator_dls', 'PulseGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PulseGeneratorDL', u'name': u'pulseGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('sine_generators', 'SineGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGenerator', u'name': u'sineGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('sine_generator_dls', 'SineGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SineGeneratorDL', u'name': u'sineGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('ramp_generators', 'RampGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGenerator', u'name': u'rampGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('ramp_generator_dls', 'RampGeneratorDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'RampGeneratorDL', u'name': u'rampGeneratorDL', u'minOccurs': u'0'}, None), + MemberSpec_('compound_inputs', 'CompoundInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CompoundInput', u'name': u'compoundInput', u'minOccurs': u'0'}, None), + MemberSpec_('compound_input_dls', 'CompoundInputDL', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'CompoundInputDL', u'name': u'compoundInputDL', u'minOccurs': u'0'}, None), + MemberSpec_('voltage_clamps', 'VoltageClamp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VoltageClamp', u'name': u'voltageClamp', u'minOccurs': u'0'}, None), + MemberSpec_('voltage_clamp_triples', 'VoltageClampTriple', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'VoltageClampTriple', u'name': u'voltageClampTriple', u'minOccurs': u'0'}, None), + MemberSpec_('spike_arrays', 'SpikeArray', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeArray', u'name': u'spikeArray', u'minOccurs': u'0'}, None), + MemberSpec_('timed_synaptic_inputs', 'TimedSynapticInput', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TimedSynapticInput', u'name': u'timedSynapticInput', u'minOccurs': u'0'}, None), + MemberSpec_('spike_generators', 'SpikeGenerator', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGenerator', u'name': u'spikeGenerator', u'minOccurs': u'0'}, None), + MemberSpec_('spike_generator_randoms', 'SpikeGeneratorRandom', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorRandom', u'name': u'spikeGeneratorRandom', u'minOccurs': u'0'}, None), + MemberSpec_('spike_generator_poissons', 'SpikeGeneratorPoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorPoisson', u'name': u'spikeGeneratorPoisson', u'minOccurs': u'0'}, None), + MemberSpec_('spike_generator_ref_poissons', 'SpikeGeneratorRefPoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeGeneratorRefPoisson', u'name': u'spikeGeneratorRefPoisson', u'minOccurs': u'0'}, None), + MemberSpec_('poisson_firing_synapses', 'PoissonFiringSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'PoissonFiringSynapse', u'name': u'poissonFiringSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('transient_poisson_firing_synapses', 'TransientPoissonFiringSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'TransientPoissonFiringSynapse', u'name': u'transientPoissonFiringSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('IF_curr_alpha', 'IF_curr_alpha', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_curr_alpha', u'name': u'IF_curr_alpha', u'minOccurs': u'0'}, None), + MemberSpec_('IF_curr_exp', 'IF_curr_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_curr_exp', u'name': u'IF_curr_exp', u'minOccurs': u'0'}, None), + MemberSpec_('IF_cond_alpha', 'IF_cond_alpha', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_cond_alpha', u'name': u'IF_cond_alpha', u'minOccurs': u'0'}, None), + MemberSpec_('IF_cond_exp', 'IF_cond_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'IF_cond_exp', u'name': u'IF_cond_exp', u'minOccurs': u'0'}, None), + MemberSpec_('EIF_cond_exp_isfa_ista', 'EIF_cond_exp_isfa_ista', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'EIF_cond_exp_isfa_ista', u'name': u'EIF_cond_exp_isfa_ista', u'minOccurs': u'0'}, None), + MemberSpec_('EIF_cond_alpha_isfa_ista', 'EIF_cond_alpha_isfa_ista', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'EIF_cond_alpha_isfa_ista', u'name': u'EIF_cond_alpha_isfa_ista', u'minOccurs': u'0'}, None), + MemberSpec_('HH_cond_exp', 'HH_cond_exp', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'HH_cond_exp', u'name': u'HH_cond_exp', u'minOccurs': u'0'}, None), + MemberSpec_('exp_cond_synapses', 'ExpCondSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpCondSynapse', u'name': u'expCondSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('alpha_cond_synapses', 'AlphaCondSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCondSynapse', u'name': u'alphaCondSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('exp_curr_synapses', 'ExpCurrSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ExpCurrSynapse', u'name': u'expCurrSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('alpha_curr_synapses', 'AlphaCurrSynapse', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'AlphaCurrSynapse', u'name': u'alphaCurrSynapse', u'minOccurs': u'0'}, None), + MemberSpec_('SpikeSourcePoisson', 'SpikeSourcePoisson', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'SpikeSourcePoisson', u'name': u'SpikeSourcePoisson', u'minOccurs': u'0'}, None), + MemberSpec_('networks', 'Network', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Network', u'name': u'network', u'minOccurs': u'0'}, None), + MemberSpec_('ComponentType', 'ComponentType', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ComponentType', u'name': u'ComponentType', u'minOccurs': u'0'}, None), ] subclass = None superclass = Standalone - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, includes=None, extracellular_properties=None, intracellular_properties=None, morphology=None, ion_channel=None, ion_channel_hhs=None, ion_channel_v_shifts=None, ion_channel_kses=None, decaying_pool_concentration_models=None, fixed_factor_concentration_models=None, alpha_current_synapses=None, alpha_synapses=None, exp_one_synapses=None, exp_two_synapses=None, exp_three_synapses=None, blocking_plastic_synapses=None, double_synapses=None, gap_junctions=None, silent_synapses=None, linear_graded_synapses=None, graded_synapses=None, biophysical_properties=None, cells=None, cell2_ca_poolses=None, base_cells=None, iaf_tau_cells=None, iaf_tau_ref_cells=None, iaf_cells=None, iaf_ref_cells=None, izhikevich_cells=None, izhikevich2007_cells=None, ad_ex_ia_f_cells=None, fitz_hugh_nagumo_cells=None, fitz_hugh_nagumo1969_cells=None, pinsky_rinzel_ca3_cells=None, pulse_generators=None, pulse_generator_dls=None, sine_generators=None, sine_generator_dls=None, ramp_generators=None, ramp_generator_dls=None, compound_inputs=None, compound_input_dls=None, voltage_clamps=None, voltage_clamp_triples=None, spike_arrays=None, timed_synaptic_inputs=None, spike_generators=None, spike_generator_randoms=None, spike_generator_poissons=None, spike_generator_ref_poissons=None, poisson_firing_synapses=None, transient_poisson_firing_synapses=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, exp_cond_synapses=None, alpha_cond_synapses=None, exp_curr_synapses=None, alpha_curr_synapses=None, SpikeSourcePoisson=None, networks=None, ComponentType=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, includes=None, extracellular_properties=None, intracellular_properties=None, morphology=None, ion_channel=None, ion_channel_hhs=None, ion_channel_v_shifts=None, ion_channel_kses=None, decaying_pool_concentration_models=None, fixed_factor_concentration_models=None, alpha_current_synapses=None, alpha_synapses=None, exp_one_synapses=None, exp_two_synapses=None, exp_three_synapses=None, blocking_plastic_synapses=None, double_synapses=None, gap_junctions=None, silent_synapses=None, linear_graded_synapses=None, graded_synapses=None, biophysical_properties=None, cells=None, cell2_ca_poolses=None, base_cells=None, iaf_tau_cells=None, iaf_tau_ref_cells=None, iaf_cells=None, iaf_ref_cells=None, izhikevich_cells=None, izhikevich2007_cells=None, ad_ex_ia_f_cells=None, fitz_hugh_nagumo_cells=None, fitz_hugh_nagumo1969_cells=None, pinsky_rinzel_ca3_cells=None, pulse_generators=None, pulse_generator_dls=None, sine_generators=None, sine_generator_dls=None, ramp_generators=None, ramp_generator_dls=None, compound_inputs=None, compound_input_dls=None, voltage_clamps=None, voltage_clamp_triples=None, spike_arrays=None, timed_synaptic_inputs=None, spike_generators=None, spike_generator_randoms=None, spike_generator_poissons=None, spike_generator_ref_poissons=None, poisson_firing_synapses=None, transient_poisson_firing_synapses=None, IF_curr_alpha=None, IF_curr_exp=None, IF_cond_alpha=None, IF_cond_exp=None, EIF_cond_exp_isfa_ista=None, EIF_cond_alpha_isfa_ista=None, HH_cond_exp=None, exp_cond_synapses=None, alpha_cond_synapses=None, exp_curr_synapses=None, alpha_curr_synapses=None, SpikeSourcePoisson=None, networks=None, ComponentType=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("NeuroMLDocument"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(NeuroMLDocument, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) if includes is None: self.includes = [] else: self.includes = includes - self.includes_nsprefix_ = None if extracellular_properties is None: self.extracellular_properties = [] else: self.extracellular_properties = extracellular_properties - self.extracellular_properties_nsprefix_ = None if intracellular_properties is None: self.intracellular_properties = [] else: self.intracellular_properties = intracellular_properties - self.intracellular_properties_nsprefix_ = None if morphology is None: self.morphology = [] else: self.morphology = morphology - self.morphology_nsprefix_ = None if ion_channel is None: self.ion_channel = [] else: self.ion_channel = ion_channel - self.ion_channel_nsprefix_ = None if ion_channel_hhs is None: self.ion_channel_hhs = [] else: self.ion_channel_hhs = ion_channel_hhs - self.ion_channel_hhs_nsprefix_ = None if ion_channel_v_shifts is None: self.ion_channel_v_shifts = [] else: self.ion_channel_v_shifts = ion_channel_v_shifts - self.ion_channel_v_shifts_nsprefix_ = None if ion_channel_kses is None: self.ion_channel_kses = [] else: self.ion_channel_kses = ion_channel_kses - self.ion_channel_kses_nsprefix_ = None if decaying_pool_concentration_models is None: self.decaying_pool_concentration_models = [] else: self.decaying_pool_concentration_models = decaying_pool_concentration_models - self.decaying_pool_concentration_models_nsprefix_ = None if fixed_factor_concentration_models is None: self.fixed_factor_concentration_models = [] else: self.fixed_factor_concentration_models = fixed_factor_concentration_models - self.fixed_factor_concentration_models_nsprefix_ = None if alpha_current_synapses is None: self.alpha_current_synapses = [] else: self.alpha_current_synapses = alpha_current_synapses - self.alpha_current_synapses_nsprefix_ = None if alpha_synapses is None: self.alpha_synapses = [] else: self.alpha_synapses = alpha_synapses - self.alpha_synapses_nsprefix_ = None if exp_one_synapses is None: self.exp_one_synapses = [] else: self.exp_one_synapses = exp_one_synapses - self.exp_one_synapses_nsprefix_ = None if exp_two_synapses is None: self.exp_two_synapses = [] else: self.exp_two_synapses = exp_two_synapses - self.exp_two_synapses_nsprefix_ = None if exp_three_synapses is None: self.exp_three_synapses = [] else: self.exp_three_synapses = exp_three_synapses - self.exp_three_synapses_nsprefix_ = None if blocking_plastic_synapses is None: self.blocking_plastic_synapses = [] else: self.blocking_plastic_synapses = blocking_plastic_synapses - self.blocking_plastic_synapses_nsprefix_ = None if double_synapses is None: self.double_synapses = [] else: self.double_synapses = double_synapses - self.double_synapses_nsprefix_ = None if gap_junctions is None: self.gap_junctions = [] else: self.gap_junctions = gap_junctions - self.gap_junctions_nsprefix_ = None if silent_synapses is None: self.silent_synapses = [] else: self.silent_synapses = silent_synapses - self.silent_synapses_nsprefix_ = None if linear_graded_synapses is None: self.linear_graded_synapses = [] else: self.linear_graded_synapses = linear_graded_synapses - self.linear_graded_synapses_nsprefix_ = None if graded_synapses is None: self.graded_synapses = [] else: self.graded_synapses = graded_synapses - self.graded_synapses_nsprefix_ = None if biophysical_properties is None: self.biophysical_properties = [] else: self.biophysical_properties = biophysical_properties - self.biophysical_properties_nsprefix_ = None if cells is None: self.cells = [] else: self.cells = cells - self.cells_nsprefix_ = None if cell2_ca_poolses is None: self.cell2_ca_poolses = [] else: self.cell2_ca_poolses = cell2_ca_poolses - self.cell2_ca_poolses_nsprefix_ = None if base_cells is None: self.base_cells = [] else: self.base_cells = base_cells - self.base_cells_nsprefix_ = None if iaf_tau_cells is None: self.iaf_tau_cells = [] else: self.iaf_tau_cells = iaf_tau_cells - self.iaf_tau_cells_nsprefix_ = None if iaf_tau_ref_cells is None: self.iaf_tau_ref_cells = [] else: self.iaf_tau_ref_cells = iaf_tau_ref_cells - self.iaf_tau_ref_cells_nsprefix_ = None if iaf_cells is None: self.iaf_cells = [] else: self.iaf_cells = iaf_cells - self.iaf_cells_nsprefix_ = None if iaf_ref_cells is None: self.iaf_ref_cells = [] else: self.iaf_ref_cells = iaf_ref_cells - self.iaf_ref_cells_nsprefix_ = None if izhikevich_cells is None: self.izhikevich_cells = [] else: self.izhikevich_cells = izhikevich_cells - self.izhikevich_cells_nsprefix_ = None if izhikevich2007_cells is None: self.izhikevich2007_cells = [] else: self.izhikevich2007_cells = izhikevich2007_cells - self.izhikevich2007_cells_nsprefix_ = None if ad_ex_ia_f_cells is None: self.ad_ex_ia_f_cells = [] else: self.ad_ex_ia_f_cells = ad_ex_ia_f_cells - self.ad_ex_ia_f_cells_nsprefix_ = None if fitz_hugh_nagumo_cells is None: self.fitz_hugh_nagumo_cells = [] else: self.fitz_hugh_nagumo_cells = fitz_hugh_nagumo_cells - self.fitz_hugh_nagumo_cells_nsprefix_ = None if fitz_hugh_nagumo1969_cells is None: self.fitz_hugh_nagumo1969_cells = [] else: self.fitz_hugh_nagumo1969_cells = fitz_hugh_nagumo1969_cells - self.fitz_hugh_nagumo1969_cells_nsprefix_ = None if pinsky_rinzel_ca3_cells is None: self.pinsky_rinzel_ca3_cells = [] else: self.pinsky_rinzel_ca3_cells = pinsky_rinzel_ca3_cells - self.pinsky_rinzel_ca3_cells_nsprefix_ = None if pulse_generators is None: self.pulse_generators = [] else: self.pulse_generators = pulse_generators - self.pulse_generators_nsprefix_ = None if pulse_generator_dls is None: self.pulse_generator_dls = [] else: self.pulse_generator_dls = pulse_generator_dls - self.pulse_generator_dls_nsprefix_ = None if sine_generators is None: self.sine_generators = [] else: self.sine_generators = sine_generators - self.sine_generators_nsprefix_ = None if sine_generator_dls is None: self.sine_generator_dls = [] else: self.sine_generator_dls = sine_generator_dls - self.sine_generator_dls_nsprefix_ = None if ramp_generators is None: self.ramp_generators = [] else: self.ramp_generators = ramp_generators - self.ramp_generators_nsprefix_ = None if ramp_generator_dls is None: self.ramp_generator_dls = [] else: self.ramp_generator_dls = ramp_generator_dls - self.ramp_generator_dls_nsprefix_ = None if compound_inputs is None: self.compound_inputs = [] else: self.compound_inputs = compound_inputs - self.compound_inputs_nsprefix_ = None if compound_input_dls is None: self.compound_input_dls = [] else: self.compound_input_dls = compound_input_dls - self.compound_input_dls_nsprefix_ = None if voltage_clamps is None: self.voltage_clamps = [] else: self.voltage_clamps = voltage_clamps - self.voltage_clamps_nsprefix_ = None if voltage_clamp_triples is None: self.voltage_clamp_triples = [] else: self.voltage_clamp_triples = voltage_clamp_triples - self.voltage_clamp_triples_nsprefix_ = None if spike_arrays is None: self.spike_arrays = [] else: self.spike_arrays = spike_arrays - self.spike_arrays_nsprefix_ = None if timed_synaptic_inputs is None: self.timed_synaptic_inputs = [] else: self.timed_synaptic_inputs = timed_synaptic_inputs - self.timed_synaptic_inputs_nsprefix_ = None if spike_generators is None: self.spike_generators = [] else: self.spike_generators = spike_generators - self.spike_generators_nsprefix_ = None if spike_generator_randoms is None: self.spike_generator_randoms = [] else: self.spike_generator_randoms = spike_generator_randoms - self.spike_generator_randoms_nsprefix_ = None if spike_generator_poissons is None: self.spike_generator_poissons = [] else: self.spike_generator_poissons = spike_generator_poissons - self.spike_generator_poissons_nsprefix_ = None if spike_generator_ref_poissons is None: self.spike_generator_ref_poissons = [] else: self.spike_generator_ref_poissons = spike_generator_ref_poissons - self.spike_generator_ref_poissons_nsprefix_ = None if poisson_firing_synapses is None: self.poisson_firing_synapses = [] else: self.poisson_firing_synapses = poisson_firing_synapses - self.poisson_firing_synapses_nsprefix_ = None if transient_poisson_firing_synapses is None: self.transient_poisson_firing_synapses = [] else: self.transient_poisson_firing_synapses = transient_poisson_firing_synapses - self.transient_poisson_firing_synapses_nsprefix_ = None if IF_curr_alpha is None: self.IF_curr_alpha = [] else: self.IF_curr_alpha = IF_curr_alpha - self.IF_curr_alpha_nsprefix_ = None if IF_curr_exp is None: self.IF_curr_exp = [] else: self.IF_curr_exp = IF_curr_exp - self.IF_curr_exp_nsprefix_ = None if IF_cond_alpha is None: self.IF_cond_alpha = [] else: self.IF_cond_alpha = IF_cond_alpha - self.IF_cond_alpha_nsprefix_ = None if IF_cond_exp is None: self.IF_cond_exp = [] else: self.IF_cond_exp = IF_cond_exp - self.IF_cond_exp_nsprefix_ = None if EIF_cond_exp_isfa_ista is None: self.EIF_cond_exp_isfa_ista = [] else: self.EIF_cond_exp_isfa_ista = EIF_cond_exp_isfa_ista - self.EIF_cond_exp_isfa_ista_nsprefix_ = None if EIF_cond_alpha_isfa_ista is None: self.EIF_cond_alpha_isfa_ista = [] else: self.EIF_cond_alpha_isfa_ista = EIF_cond_alpha_isfa_ista - self.EIF_cond_alpha_isfa_ista_nsprefix_ = None if HH_cond_exp is None: self.HH_cond_exp = [] else: self.HH_cond_exp = HH_cond_exp - self.HH_cond_exp_nsprefix_ = None if exp_cond_synapses is None: self.exp_cond_synapses = [] else: self.exp_cond_synapses = exp_cond_synapses - self.exp_cond_synapses_nsprefix_ = None if alpha_cond_synapses is None: self.alpha_cond_synapses = [] else: self.alpha_cond_synapses = alpha_cond_synapses - self.alpha_cond_synapses_nsprefix_ = None if exp_curr_synapses is None: self.exp_curr_synapses = [] else: self.exp_curr_synapses = exp_curr_synapses - self.exp_curr_synapses_nsprefix_ = None if alpha_curr_synapses is None: self.alpha_curr_synapses = [] else: self.alpha_curr_synapses = alpha_curr_synapses - self.alpha_curr_synapses_nsprefix_ = None if SpikeSourcePoisson is None: self.SpikeSourcePoisson = [] else: self.SpikeSourcePoisson = SpikeSourcePoisson - self.SpikeSourcePoisson_nsprefix_ = None if networks is None: self.networks = [] else: self.networks = networks - self.networks_nsprefix_ = None if ComponentType is None: self.ComponentType = [] else: self.ComponentType = ComponentType - self.ComponentType_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -20747,680 +15498,6 @@ def factory(*args_, **kwargs_): else: return NeuroMLDocument(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_include(self): - return self.includes - def set_include(self, includes): - self.includes = includes - def add_include(self, value): - self.includes.append(value) - def insert_include_at(self, index, value): - self.includes.insert(index, value) - def replace_include_at(self, index, value): - self.includes[index] = value - def get_extracellularProperties(self): - return self.extracellular_properties - def set_extracellularProperties(self, extracellular_properties): - self.extracellular_properties = extracellular_properties - def add_extracellularProperties(self, value): - self.extracellular_properties.append(value) - def insert_extracellularProperties_at(self, index, value): - self.extracellular_properties.insert(index, value) - def replace_extracellularProperties_at(self, index, value): - self.extracellular_properties[index] = value - def get_intracellularProperties(self): - return self.intracellular_properties - def set_intracellularProperties(self, intracellular_properties): - self.intracellular_properties = intracellular_properties - def add_intracellularProperties(self, value): - self.intracellular_properties.append(value) - def insert_intracellularProperties_at(self, index, value): - self.intracellular_properties.insert(index, value) - def replace_intracellularProperties_at(self, index, value): - self.intracellular_properties[index] = value - def get_morphology(self): - return self.morphology - def set_morphology(self, morphology): - self.morphology = morphology - def add_morphology(self, value): - self.morphology.append(value) - def insert_morphology_at(self, index, value): - self.morphology.insert(index, value) - def replace_morphology_at(self, index, value): - self.morphology[index] = value - def get_ionChannel(self): - return self.ion_channel - def set_ionChannel(self, ion_channel): - self.ion_channel = ion_channel - def add_ionChannel(self, value): - self.ion_channel.append(value) - def insert_ionChannel_at(self, index, value): - self.ion_channel.insert(index, value) - def replace_ionChannel_at(self, index, value): - self.ion_channel[index] = value - def get_ionChannelHH(self): - return self.ion_channel_hhs - def set_ionChannelHH(self, ion_channel_hhs): - self.ion_channel_hhs = ion_channel_hhs - def add_ionChannelHH(self, value): - self.ion_channel_hhs.append(value) - def insert_ionChannelHH_at(self, index, value): - self.ion_channel_hhs.insert(index, value) - def replace_ionChannelHH_at(self, index, value): - self.ion_channel_hhs[index] = value - def get_ionChannelVShift(self): - return self.ion_channel_v_shifts - def set_ionChannelVShift(self, ion_channel_v_shifts): - self.ion_channel_v_shifts = ion_channel_v_shifts - def add_ionChannelVShift(self, value): - self.ion_channel_v_shifts.append(value) - def insert_ionChannelVShift_at(self, index, value): - self.ion_channel_v_shifts.insert(index, value) - def replace_ionChannelVShift_at(self, index, value): - self.ion_channel_v_shifts[index] = value - def get_ionChannelKS(self): - return self.ion_channel_kses - def set_ionChannelKS(self, ion_channel_kses): - self.ion_channel_kses = ion_channel_kses - def add_ionChannelKS(self, value): - self.ion_channel_kses.append(value) - def insert_ionChannelKS_at(self, index, value): - self.ion_channel_kses.insert(index, value) - def replace_ionChannelKS_at(self, index, value): - self.ion_channel_kses[index] = value - def get_decayingPoolConcentrationModel(self): - return self.decaying_pool_concentration_models - def set_decayingPoolConcentrationModel(self, decaying_pool_concentration_models): - self.decaying_pool_concentration_models = decaying_pool_concentration_models - def add_decayingPoolConcentrationModel(self, value): - self.decaying_pool_concentration_models.append(value) - def insert_decayingPoolConcentrationModel_at(self, index, value): - self.decaying_pool_concentration_models.insert(index, value) - def replace_decayingPoolConcentrationModel_at(self, index, value): - self.decaying_pool_concentration_models[index] = value - def get_fixedFactorConcentrationModel(self): - return self.fixed_factor_concentration_models - def set_fixedFactorConcentrationModel(self, fixed_factor_concentration_models): - self.fixed_factor_concentration_models = fixed_factor_concentration_models - def add_fixedFactorConcentrationModel(self, value): - self.fixed_factor_concentration_models.append(value) - def insert_fixedFactorConcentrationModel_at(self, index, value): - self.fixed_factor_concentration_models.insert(index, value) - def replace_fixedFactorConcentrationModel_at(self, index, value): - self.fixed_factor_concentration_models[index] = value - def get_alphaCurrentSynapse(self): - return self.alpha_current_synapses - def set_alphaCurrentSynapse(self, alpha_current_synapses): - self.alpha_current_synapses = alpha_current_synapses - def add_alphaCurrentSynapse(self, value): - self.alpha_current_synapses.append(value) - def insert_alphaCurrentSynapse_at(self, index, value): - self.alpha_current_synapses.insert(index, value) - def replace_alphaCurrentSynapse_at(self, index, value): - self.alpha_current_synapses[index] = value - def get_alphaSynapse(self): - return self.alpha_synapses - def set_alphaSynapse(self, alpha_synapses): - self.alpha_synapses = alpha_synapses - def add_alphaSynapse(self, value): - self.alpha_synapses.append(value) - def insert_alphaSynapse_at(self, index, value): - self.alpha_synapses.insert(index, value) - def replace_alphaSynapse_at(self, index, value): - self.alpha_synapses[index] = value - def get_expOneSynapse(self): - return self.exp_one_synapses - def set_expOneSynapse(self, exp_one_synapses): - self.exp_one_synapses = exp_one_synapses - def add_expOneSynapse(self, value): - self.exp_one_synapses.append(value) - def insert_expOneSynapse_at(self, index, value): - self.exp_one_synapses.insert(index, value) - def replace_expOneSynapse_at(self, index, value): - self.exp_one_synapses[index] = value - def get_expTwoSynapse(self): - return self.exp_two_synapses - def set_expTwoSynapse(self, exp_two_synapses): - self.exp_two_synapses = exp_two_synapses - def add_expTwoSynapse(self, value): - self.exp_two_synapses.append(value) - def insert_expTwoSynapse_at(self, index, value): - self.exp_two_synapses.insert(index, value) - def replace_expTwoSynapse_at(self, index, value): - self.exp_two_synapses[index] = value - def get_expThreeSynapse(self): - return self.exp_three_synapses - def set_expThreeSynapse(self, exp_three_synapses): - self.exp_three_synapses = exp_three_synapses - def add_expThreeSynapse(self, value): - self.exp_three_synapses.append(value) - def insert_expThreeSynapse_at(self, index, value): - self.exp_three_synapses.insert(index, value) - def replace_expThreeSynapse_at(self, index, value): - self.exp_three_synapses[index] = value - def get_blockingPlasticSynapse(self): - return self.blocking_plastic_synapses - def set_blockingPlasticSynapse(self, blocking_plastic_synapses): - self.blocking_plastic_synapses = blocking_plastic_synapses - def add_blockingPlasticSynapse(self, value): - self.blocking_plastic_synapses.append(value) - def insert_blockingPlasticSynapse_at(self, index, value): - self.blocking_plastic_synapses.insert(index, value) - def replace_blockingPlasticSynapse_at(self, index, value): - self.blocking_plastic_synapses[index] = value - def get_doubleSynapse(self): - return self.double_synapses - def set_doubleSynapse(self, double_synapses): - self.double_synapses = double_synapses - def add_doubleSynapse(self, value): - self.double_synapses.append(value) - def insert_doubleSynapse_at(self, index, value): - self.double_synapses.insert(index, value) - def replace_doubleSynapse_at(self, index, value): - self.double_synapses[index] = value - def get_gapJunction(self): - return self.gap_junctions - def set_gapJunction(self, gap_junctions): - self.gap_junctions = gap_junctions - def add_gapJunction(self, value): - self.gap_junctions.append(value) - def insert_gapJunction_at(self, index, value): - self.gap_junctions.insert(index, value) - def replace_gapJunction_at(self, index, value): - self.gap_junctions[index] = value - def get_silentSynapse(self): - return self.silent_synapses - def set_silentSynapse(self, silent_synapses): - self.silent_synapses = silent_synapses - def add_silentSynapse(self, value): - self.silent_synapses.append(value) - def insert_silentSynapse_at(self, index, value): - self.silent_synapses.insert(index, value) - def replace_silentSynapse_at(self, index, value): - self.silent_synapses[index] = value - def get_linearGradedSynapse(self): - return self.linear_graded_synapses - def set_linearGradedSynapse(self, linear_graded_synapses): - self.linear_graded_synapses = linear_graded_synapses - def add_linearGradedSynapse(self, value): - self.linear_graded_synapses.append(value) - def insert_linearGradedSynapse_at(self, index, value): - self.linear_graded_synapses.insert(index, value) - def replace_linearGradedSynapse_at(self, index, value): - self.linear_graded_synapses[index] = value - def get_gradedSynapse(self): - return self.graded_synapses - def set_gradedSynapse(self, graded_synapses): - self.graded_synapses = graded_synapses - def add_gradedSynapse(self, value): - self.graded_synapses.append(value) - def insert_gradedSynapse_at(self, index, value): - self.graded_synapses.insert(index, value) - def replace_gradedSynapse_at(self, index, value): - self.graded_synapses[index] = value - def get_biophysicalProperties(self): - return self.biophysical_properties - def set_biophysicalProperties(self, biophysical_properties): - self.biophysical_properties = biophysical_properties - def add_biophysicalProperties(self, value): - self.biophysical_properties.append(value) - def insert_biophysicalProperties_at(self, index, value): - self.biophysical_properties.insert(index, value) - def replace_biophysicalProperties_at(self, index, value): - self.biophysical_properties[index] = value - def get_cell(self): - return self.cells - def set_cell(self, cells): - self.cells = cells - def add_cell(self, value): - self.cells.append(value) - def insert_cell_at(self, index, value): - self.cells.insert(index, value) - def replace_cell_at(self, index, value): - self.cells[index] = value - def get_cell2CaPools(self): - return self.cell2_ca_poolses - def set_cell2CaPools(self, cell2_ca_poolses): - self.cell2_ca_poolses = cell2_ca_poolses - def add_cell2CaPools(self, value): - self.cell2_ca_poolses.append(value) - def insert_cell2CaPools_at(self, index, value): - self.cell2_ca_poolses.insert(index, value) - def replace_cell2CaPools_at(self, index, value): - self.cell2_ca_poolses[index] = value - def get_baseCell(self): - return self.base_cells - def set_baseCell(self, base_cells): - self.base_cells = base_cells - def add_baseCell(self, value): - self.base_cells.append(value) - def insert_baseCell_at(self, index, value): - self.base_cells.insert(index, value) - def replace_baseCell_at(self, index, value): - self.base_cells[index] = value - def get_iafTauCell(self): - return self.iaf_tau_cells - def set_iafTauCell(self, iaf_tau_cells): - self.iaf_tau_cells = iaf_tau_cells - def add_iafTauCell(self, value): - self.iaf_tau_cells.append(value) - def insert_iafTauCell_at(self, index, value): - self.iaf_tau_cells.insert(index, value) - def replace_iafTauCell_at(self, index, value): - self.iaf_tau_cells[index] = value - def get_iafTauRefCell(self): - return self.iaf_tau_ref_cells - def set_iafTauRefCell(self, iaf_tau_ref_cells): - self.iaf_tau_ref_cells = iaf_tau_ref_cells - def add_iafTauRefCell(self, value): - self.iaf_tau_ref_cells.append(value) - def insert_iafTauRefCell_at(self, index, value): - self.iaf_tau_ref_cells.insert(index, value) - def replace_iafTauRefCell_at(self, index, value): - self.iaf_tau_ref_cells[index] = value - def get_iafCell(self): - return self.iaf_cells - def set_iafCell(self, iaf_cells): - self.iaf_cells = iaf_cells - def add_iafCell(self, value): - self.iaf_cells.append(value) - def insert_iafCell_at(self, index, value): - self.iaf_cells.insert(index, value) - def replace_iafCell_at(self, index, value): - self.iaf_cells[index] = value - def get_iafRefCell(self): - return self.iaf_ref_cells - def set_iafRefCell(self, iaf_ref_cells): - self.iaf_ref_cells = iaf_ref_cells - def add_iafRefCell(self, value): - self.iaf_ref_cells.append(value) - def insert_iafRefCell_at(self, index, value): - self.iaf_ref_cells.insert(index, value) - def replace_iafRefCell_at(self, index, value): - self.iaf_ref_cells[index] = value - def get_izhikevichCell(self): - return self.izhikevich_cells - def set_izhikevichCell(self, izhikevich_cells): - self.izhikevich_cells = izhikevich_cells - def add_izhikevichCell(self, value): - self.izhikevich_cells.append(value) - def insert_izhikevichCell_at(self, index, value): - self.izhikevich_cells.insert(index, value) - def replace_izhikevichCell_at(self, index, value): - self.izhikevich_cells[index] = value - def get_izhikevich2007Cell(self): - return self.izhikevich2007_cells - def set_izhikevich2007Cell(self, izhikevich2007_cells): - self.izhikevich2007_cells = izhikevich2007_cells - def add_izhikevich2007Cell(self, value): - self.izhikevich2007_cells.append(value) - def insert_izhikevich2007Cell_at(self, index, value): - self.izhikevich2007_cells.insert(index, value) - def replace_izhikevich2007Cell_at(self, index, value): - self.izhikevich2007_cells[index] = value - def get_adExIaFCell(self): - return self.ad_ex_ia_f_cells - def set_adExIaFCell(self, ad_ex_ia_f_cells): - self.ad_ex_ia_f_cells = ad_ex_ia_f_cells - def add_adExIaFCell(self, value): - self.ad_ex_ia_f_cells.append(value) - def insert_adExIaFCell_at(self, index, value): - self.ad_ex_ia_f_cells.insert(index, value) - def replace_adExIaFCell_at(self, index, value): - self.ad_ex_ia_f_cells[index] = value - def get_fitzHughNagumoCell(self): - return self.fitz_hugh_nagumo_cells - def set_fitzHughNagumoCell(self, fitz_hugh_nagumo_cells): - self.fitz_hugh_nagumo_cells = fitz_hugh_nagumo_cells - def add_fitzHughNagumoCell(self, value): - self.fitz_hugh_nagumo_cells.append(value) - def insert_fitzHughNagumoCell_at(self, index, value): - self.fitz_hugh_nagumo_cells.insert(index, value) - def replace_fitzHughNagumoCell_at(self, index, value): - self.fitz_hugh_nagumo_cells[index] = value - def get_fitzHughNagumo1969Cell(self): - return self.fitz_hugh_nagumo1969_cells - def set_fitzHughNagumo1969Cell(self, fitz_hugh_nagumo1969_cells): - self.fitz_hugh_nagumo1969_cells = fitz_hugh_nagumo1969_cells - def add_fitzHughNagumo1969Cell(self, value): - self.fitz_hugh_nagumo1969_cells.append(value) - def insert_fitzHughNagumo1969Cell_at(self, index, value): - self.fitz_hugh_nagumo1969_cells.insert(index, value) - def replace_fitzHughNagumo1969Cell_at(self, index, value): - self.fitz_hugh_nagumo1969_cells[index] = value - def get_pinskyRinzelCA3Cell(self): - return self.pinsky_rinzel_ca3_cells - def set_pinskyRinzelCA3Cell(self, pinsky_rinzel_ca3_cells): - self.pinsky_rinzel_ca3_cells = pinsky_rinzel_ca3_cells - def add_pinskyRinzelCA3Cell(self, value): - self.pinsky_rinzel_ca3_cells.append(value) - def insert_pinskyRinzelCA3Cell_at(self, index, value): - self.pinsky_rinzel_ca3_cells.insert(index, value) - def replace_pinskyRinzelCA3Cell_at(self, index, value): - self.pinsky_rinzel_ca3_cells[index] = value - def get_pulseGenerator(self): - return self.pulse_generators - def set_pulseGenerator(self, pulse_generators): - self.pulse_generators = pulse_generators - def add_pulseGenerator(self, value): - self.pulse_generators.append(value) - def insert_pulseGenerator_at(self, index, value): - self.pulse_generators.insert(index, value) - def replace_pulseGenerator_at(self, index, value): - self.pulse_generators[index] = value - def get_pulseGeneratorDL(self): - return self.pulse_generator_dls - def set_pulseGeneratorDL(self, pulse_generator_dls): - self.pulse_generator_dls = pulse_generator_dls - def add_pulseGeneratorDL(self, value): - self.pulse_generator_dls.append(value) - def insert_pulseGeneratorDL_at(self, index, value): - self.pulse_generator_dls.insert(index, value) - def replace_pulseGeneratorDL_at(self, index, value): - self.pulse_generator_dls[index] = value - def get_sineGenerator(self): - return self.sine_generators - def set_sineGenerator(self, sine_generators): - self.sine_generators = sine_generators - def add_sineGenerator(self, value): - self.sine_generators.append(value) - def insert_sineGenerator_at(self, index, value): - self.sine_generators.insert(index, value) - def replace_sineGenerator_at(self, index, value): - self.sine_generators[index] = value - def get_sineGeneratorDL(self): - return self.sine_generator_dls - def set_sineGeneratorDL(self, sine_generator_dls): - self.sine_generator_dls = sine_generator_dls - def add_sineGeneratorDL(self, value): - self.sine_generator_dls.append(value) - def insert_sineGeneratorDL_at(self, index, value): - self.sine_generator_dls.insert(index, value) - def replace_sineGeneratorDL_at(self, index, value): - self.sine_generator_dls[index] = value - def get_rampGenerator(self): - return self.ramp_generators - def set_rampGenerator(self, ramp_generators): - self.ramp_generators = ramp_generators - def add_rampGenerator(self, value): - self.ramp_generators.append(value) - def insert_rampGenerator_at(self, index, value): - self.ramp_generators.insert(index, value) - def replace_rampGenerator_at(self, index, value): - self.ramp_generators[index] = value - def get_rampGeneratorDL(self): - return self.ramp_generator_dls - def set_rampGeneratorDL(self, ramp_generator_dls): - self.ramp_generator_dls = ramp_generator_dls - def add_rampGeneratorDL(self, value): - self.ramp_generator_dls.append(value) - def insert_rampGeneratorDL_at(self, index, value): - self.ramp_generator_dls.insert(index, value) - def replace_rampGeneratorDL_at(self, index, value): - self.ramp_generator_dls[index] = value - def get_compoundInput(self): - return self.compound_inputs - def set_compoundInput(self, compound_inputs): - self.compound_inputs = compound_inputs - def add_compoundInput(self, value): - self.compound_inputs.append(value) - def insert_compoundInput_at(self, index, value): - self.compound_inputs.insert(index, value) - def replace_compoundInput_at(self, index, value): - self.compound_inputs[index] = value - def get_compoundInputDL(self): - return self.compound_input_dls - def set_compoundInputDL(self, compound_input_dls): - self.compound_input_dls = compound_input_dls - def add_compoundInputDL(self, value): - self.compound_input_dls.append(value) - def insert_compoundInputDL_at(self, index, value): - self.compound_input_dls.insert(index, value) - def replace_compoundInputDL_at(self, index, value): - self.compound_input_dls[index] = value - def get_voltageClamp(self): - return self.voltage_clamps - def set_voltageClamp(self, voltage_clamps): - self.voltage_clamps = voltage_clamps - def add_voltageClamp(self, value): - self.voltage_clamps.append(value) - def insert_voltageClamp_at(self, index, value): - self.voltage_clamps.insert(index, value) - def replace_voltageClamp_at(self, index, value): - self.voltage_clamps[index] = value - def get_voltageClampTriple(self): - return self.voltage_clamp_triples - def set_voltageClampTriple(self, voltage_clamp_triples): - self.voltage_clamp_triples = voltage_clamp_triples - def add_voltageClampTriple(self, value): - self.voltage_clamp_triples.append(value) - def insert_voltageClampTriple_at(self, index, value): - self.voltage_clamp_triples.insert(index, value) - def replace_voltageClampTriple_at(self, index, value): - self.voltage_clamp_triples[index] = value - def get_spikeArray(self): - return self.spike_arrays - def set_spikeArray(self, spike_arrays): - self.spike_arrays = spike_arrays - def add_spikeArray(self, value): - self.spike_arrays.append(value) - def insert_spikeArray_at(self, index, value): - self.spike_arrays.insert(index, value) - def replace_spikeArray_at(self, index, value): - self.spike_arrays[index] = value - def get_timedSynapticInput(self): - return self.timed_synaptic_inputs - def set_timedSynapticInput(self, timed_synaptic_inputs): - self.timed_synaptic_inputs = timed_synaptic_inputs - def add_timedSynapticInput(self, value): - self.timed_synaptic_inputs.append(value) - def insert_timedSynapticInput_at(self, index, value): - self.timed_synaptic_inputs.insert(index, value) - def replace_timedSynapticInput_at(self, index, value): - self.timed_synaptic_inputs[index] = value - def get_spikeGenerator(self): - return self.spike_generators - def set_spikeGenerator(self, spike_generators): - self.spike_generators = spike_generators - def add_spikeGenerator(self, value): - self.spike_generators.append(value) - def insert_spikeGenerator_at(self, index, value): - self.spike_generators.insert(index, value) - def replace_spikeGenerator_at(self, index, value): - self.spike_generators[index] = value - def get_spikeGeneratorRandom(self): - return self.spike_generator_randoms - def set_spikeGeneratorRandom(self, spike_generator_randoms): - self.spike_generator_randoms = spike_generator_randoms - def add_spikeGeneratorRandom(self, value): - self.spike_generator_randoms.append(value) - def insert_spikeGeneratorRandom_at(self, index, value): - self.spike_generator_randoms.insert(index, value) - def replace_spikeGeneratorRandom_at(self, index, value): - self.spike_generator_randoms[index] = value - def get_spikeGeneratorPoisson(self): - return self.spike_generator_poissons - def set_spikeGeneratorPoisson(self, spike_generator_poissons): - self.spike_generator_poissons = spike_generator_poissons - def add_spikeGeneratorPoisson(self, value): - self.spike_generator_poissons.append(value) - def insert_spikeGeneratorPoisson_at(self, index, value): - self.spike_generator_poissons.insert(index, value) - def replace_spikeGeneratorPoisson_at(self, index, value): - self.spike_generator_poissons[index] = value - def get_spikeGeneratorRefPoisson(self): - return self.spike_generator_ref_poissons - def set_spikeGeneratorRefPoisson(self, spike_generator_ref_poissons): - self.spike_generator_ref_poissons = spike_generator_ref_poissons - def add_spikeGeneratorRefPoisson(self, value): - self.spike_generator_ref_poissons.append(value) - def insert_spikeGeneratorRefPoisson_at(self, index, value): - self.spike_generator_ref_poissons.insert(index, value) - def replace_spikeGeneratorRefPoisson_at(self, index, value): - self.spike_generator_ref_poissons[index] = value - def get_poissonFiringSynapse(self): - return self.poisson_firing_synapses - def set_poissonFiringSynapse(self, poisson_firing_synapses): - self.poisson_firing_synapses = poisson_firing_synapses - def add_poissonFiringSynapse(self, value): - self.poisson_firing_synapses.append(value) - def insert_poissonFiringSynapse_at(self, index, value): - self.poisson_firing_synapses.insert(index, value) - def replace_poissonFiringSynapse_at(self, index, value): - self.poisson_firing_synapses[index] = value - def get_transientPoissonFiringSynapse(self): - return self.transient_poisson_firing_synapses - def set_transientPoissonFiringSynapse(self, transient_poisson_firing_synapses): - self.transient_poisson_firing_synapses = transient_poisson_firing_synapses - def add_transientPoissonFiringSynapse(self, value): - self.transient_poisson_firing_synapses.append(value) - def insert_transientPoissonFiringSynapse_at(self, index, value): - self.transient_poisson_firing_synapses.insert(index, value) - def replace_transientPoissonFiringSynapse_at(self, index, value): - self.transient_poisson_firing_synapses[index] = value - def get_IF_curr_alpha(self): - return self.IF_curr_alpha - def set_IF_curr_alpha(self, IF_curr_alpha): - self.IF_curr_alpha = IF_curr_alpha - def add_IF_curr_alpha(self, value): - self.IF_curr_alpha.append(value) - def insert_IF_curr_alpha_at(self, index, value): - self.IF_curr_alpha.insert(index, value) - def replace_IF_curr_alpha_at(self, index, value): - self.IF_curr_alpha[index] = value - def get_IF_curr_exp(self): - return self.IF_curr_exp - def set_IF_curr_exp(self, IF_curr_exp): - self.IF_curr_exp = IF_curr_exp - def add_IF_curr_exp(self, value): - self.IF_curr_exp.append(value) - def insert_IF_curr_exp_at(self, index, value): - self.IF_curr_exp.insert(index, value) - def replace_IF_curr_exp_at(self, index, value): - self.IF_curr_exp[index] = value - def get_IF_cond_alpha(self): - return self.IF_cond_alpha - def set_IF_cond_alpha(self, IF_cond_alpha): - self.IF_cond_alpha = IF_cond_alpha - def add_IF_cond_alpha(self, value): - self.IF_cond_alpha.append(value) - def insert_IF_cond_alpha_at(self, index, value): - self.IF_cond_alpha.insert(index, value) - def replace_IF_cond_alpha_at(self, index, value): - self.IF_cond_alpha[index] = value - def get_IF_cond_exp(self): - return self.IF_cond_exp - def set_IF_cond_exp(self, IF_cond_exp): - self.IF_cond_exp = IF_cond_exp - def add_IF_cond_exp(self, value): - self.IF_cond_exp.append(value) - def insert_IF_cond_exp_at(self, index, value): - self.IF_cond_exp.insert(index, value) - def replace_IF_cond_exp_at(self, index, value): - self.IF_cond_exp[index] = value - def get_EIF_cond_exp_isfa_ista(self): - return self.EIF_cond_exp_isfa_ista - def set_EIF_cond_exp_isfa_ista(self, EIF_cond_exp_isfa_ista): - self.EIF_cond_exp_isfa_ista = EIF_cond_exp_isfa_ista - def add_EIF_cond_exp_isfa_ista(self, value): - self.EIF_cond_exp_isfa_ista.append(value) - def insert_EIF_cond_exp_isfa_ista_at(self, index, value): - self.EIF_cond_exp_isfa_ista.insert(index, value) - def replace_EIF_cond_exp_isfa_ista_at(self, index, value): - self.EIF_cond_exp_isfa_ista[index] = value - def get_EIF_cond_alpha_isfa_ista(self): - return self.EIF_cond_alpha_isfa_ista - def set_EIF_cond_alpha_isfa_ista(self, EIF_cond_alpha_isfa_ista): - self.EIF_cond_alpha_isfa_ista = EIF_cond_alpha_isfa_ista - def add_EIF_cond_alpha_isfa_ista(self, value): - self.EIF_cond_alpha_isfa_ista.append(value) - def insert_EIF_cond_alpha_isfa_ista_at(self, index, value): - self.EIF_cond_alpha_isfa_ista.insert(index, value) - def replace_EIF_cond_alpha_isfa_ista_at(self, index, value): - self.EIF_cond_alpha_isfa_ista[index] = value - def get_HH_cond_exp(self): - return self.HH_cond_exp - def set_HH_cond_exp(self, HH_cond_exp): - self.HH_cond_exp = HH_cond_exp - def add_HH_cond_exp(self, value): - self.HH_cond_exp.append(value) - def insert_HH_cond_exp_at(self, index, value): - self.HH_cond_exp.insert(index, value) - def replace_HH_cond_exp_at(self, index, value): - self.HH_cond_exp[index] = value - def get_expCondSynapse(self): - return self.exp_cond_synapses - def set_expCondSynapse(self, exp_cond_synapses): - self.exp_cond_synapses = exp_cond_synapses - def add_expCondSynapse(self, value): - self.exp_cond_synapses.append(value) - def insert_expCondSynapse_at(self, index, value): - self.exp_cond_synapses.insert(index, value) - def replace_expCondSynapse_at(self, index, value): - self.exp_cond_synapses[index] = value - def get_alphaCondSynapse(self): - return self.alpha_cond_synapses - def set_alphaCondSynapse(self, alpha_cond_synapses): - self.alpha_cond_synapses = alpha_cond_synapses - def add_alphaCondSynapse(self, value): - self.alpha_cond_synapses.append(value) - def insert_alphaCondSynapse_at(self, index, value): - self.alpha_cond_synapses.insert(index, value) - def replace_alphaCondSynapse_at(self, index, value): - self.alpha_cond_synapses[index] = value - def get_expCurrSynapse(self): - return self.exp_curr_synapses - def set_expCurrSynapse(self, exp_curr_synapses): - self.exp_curr_synapses = exp_curr_synapses - def add_expCurrSynapse(self, value): - self.exp_curr_synapses.append(value) - def insert_expCurrSynapse_at(self, index, value): - self.exp_curr_synapses.insert(index, value) - def replace_expCurrSynapse_at(self, index, value): - self.exp_curr_synapses[index] = value - def get_alphaCurrSynapse(self): - return self.alpha_curr_synapses - def set_alphaCurrSynapse(self, alpha_curr_synapses): - self.alpha_curr_synapses = alpha_curr_synapses - def add_alphaCurrSynapse(self, value): - self.alpha_curr_synapses.append(value) - def insert_alphaCurrSynapse_at(self, index, value): - self.alpha_curr_synapses.insert(index, value) - def replace_alphaCurrSynapse_at(self, index, value): - self.alpha_curr_synapses[index] = value - def get_SpikeSourcePoisson(self): - return self.SpikeSourcePoisson - def set_SpikeSourcePoisson(self, SpikeSourcePoisson): - self.SpikeSourcePoisson = SpikeSourcePoisson - def add_SpikeSourcePoisson(self, value): - self.SpikeSourcePoisson.append(value) - def insert_SpikeSourcePoisson_at(self, index, value): - self.SpikeSourcePoisson.insert(index, value) - def replace_SpikeSourcePoisson_at(self, index, value): - self.SpikeSourcePoisson[index] = value - def get_network(self): - return self.networks - def set_network(self, networks): - self.networks = networks - def add_network(self, value): - self.networks.append(value) - def insert_network_at(self, index, value): - self.networks.insert(index, value) - def replace_network_at(self, index, value): - self.networks[index] = value - def get_ComponentType(self): - return self.ComponentType - def set_ComponentType(self, ComponentType): - self.ComponentType = ComponentType - def add_ComponentType(self, value): - self.ComponentType.append(value) - def insert_ComponentType_at(self, index, value): - self.ComponentType.insert(index, value) - def replace_ComponentType_at(self, index, value): - self.ComponentType[index] = value def hasContent_(self): if ( self.includes or @@ -21503,10 +15580,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'NeuroMLDocument': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -21521,569 +15596,498 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='N def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='NeuroMLDocument'): super(NeuroMLDocument, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='NeuroMLDocument') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='NeuroMLDocument', fromsubclass_=False, pretty_print=True): - super(NeuroMLDocument, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(NeuroMLDocument, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for include_ in self.includes: - namespaceprefix_ = self.includes_nsprefix_ + ':' if (UseCapturedNS_ and self.includes_nsprefix_) else '' include_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='include', pretty_print=pretty_print) for extracellularProperties_ in self.extracellular_properties: - namespaceprefix_ = self.extracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.extracellular_properties_nsprefix_) else '' extracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='extracellularProperties', pretty_print=pretty_print) for intracellularProperties_ in self.intracellular_properties: - namespaceprefix_ = self.intracellular_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.intracellular_properties_nsprefix_) else '' intracellularProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='intracellularProperties', pretty_print=pretty_print) for morphology_ in self.morphology: - namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' morphology_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) for ionChannel_ in self.ion_channel: - namespaceprefix_ = self.ion_channel_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_nsprefix_) else '' ionChannel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannel', pretty_print=pretty_print) for ionChannelHH_ in self.ion_channel_hhs: - namespaceprefix_ = self.ion_channel_hhs_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_hhs_nsprefix_) else '' ionChannelHH_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelHH', pretty_print=pretty_print) for ionChannelVShift_ in self.ion_channel_v_shifts: - namespaceprefix_ = self.ion_channel_v_shifts_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_v_shifts_nsprefix_) else '' ionChannelVShift_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelVShift', pretty_print=pretty_print) for ionChannelKS_ in self.ion_channel_kses: - namespaceprefix_ = self.ion_channel_kses_nsprefix_ + ':' if (UseCapturedNS_ and self.ion_channel_kses_nsprefix_) else '' ionChannelKS_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ionChannelKS', pretty_print=pretty_print) for decayingPoolConcentrationModel_ in self.decaying_pool_concentration_models: - namespaceprefix_ = self.decaying_pool_concentration_models_nsprefix_ + ':' if (UseCapturedNS_ and self.decaying_pool_concentration_models_nsprefix_) else '' decayingPoolConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='decayingPoolConcentrationModel', pretty_print=pretty_print) for fixedFactorConcentrationModel_ in self.fixed_factor_concentration_models: - namespaceprefix_ = self.fixed_factor_concentration_models_nsprefix_ + ':' if (UseCapturedNS_ and self.fixed_factor_concentration_models_nsprefix_) else '' fixedFactorConcentrationModel_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fixedFactorConcentrationModel', pretty_print=pretty_print) for alphaCurrentSynapse_ in self.alpha_current_synapses: - namespaceprefix_ = self.alpha_current_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_current_synapses_nsprefix_) else '' alphaCurrentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrentSynapse', pretty_print=pretty_print) for alphaSynapse_ in self.alpha_synapses: - namespaceprefix_ = self.alpha_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_synapses_nsprefix_) else '' alphaSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaSynapse', pretty_print=pretty_print) for expOneSynapse_ in self.exp_one_synapses: - namespaceprefix_ = self.exp_one_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_one_synapses_nsprefix_) else '' expOneSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expOneSynapse', pretty_print=pretty_print) for expTwoSynapse_ in self.exp_two_synapses: - namespaceprefix_ = self.exp_two_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_two_synapses_nsprefix_) else '' expTwoSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expTwoSynapse', pretty_print=pretty_print) for expThreeSynapse_ in self.exp_three_synapses: - namespaceprefix_ = self.exp_three_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_three_synapses_nsprefix_) else '' expThreeSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expThreeSynapse', pretty_print=pretty_print) for blockingPlasticSynapse_ in self.blocking_plastic_synapses: - namespaceprefix_ = self.blocking_plastic_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.blocking_plastic_synapses_nsprefix_) else '' blockingPlasticSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockingPlasticSynapse', pretty_print=pretty_print) for doubleSynapse_ in self.double_synapses: - namespaceprefix_ = self.double_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.double_synapses_nsprefix_) else '' doubleSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='doubleSynapse', pretty_print=pretty_print) for gapJunction_ in self.gap_junctions: - namespaceprefix_ = self.gap_junctions_nsprefix_ + ':' if (UseCapturedNS_ and self.gap_junctions_nsprefix_) else '' gapJunction_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gapJunction', pretty_print=pretty_print) for silentSynapse_ in self.silent_synapses: - namespaceprefix_ = self.silent_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.silent_synapses_nsprefix_) else '' silentSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='silentSynapse', pretty_print=pretty_print) for linearGradedSynapse_ in self.linear_graded_synapses: - namespaceprefix_ = self.linear_graded_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.linear_graded_synapses_nsprefix_) else '' linearGradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linearGradedSynapse', pretty_print=pretty_print) for gradedSynapse_ in self.graded_synapses: - namespaceprefix_ = self.graded_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.graded_synapses_nsprefix_) else '' gradedSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gradedSynapse', pretty_print=pretty_print) for biophysicalProperties_ in self.biophysical_properties: - namespaceprefix_ = self.biophysical_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties_nsprefix_) else '' biophysicalProperties_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) for cell_ in self.cells: - namespaceprefix_ = self.cells_nsprefix_ + ':' if (UseCapturedNS_ and self.cells_nsprefix_) else '' cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell', pretty_print=pretty_print) for cell2CaPools_ in self.cell2_ca_poolses: - namespaceprefix_ = self.cell2_ca_poolses_nsprefix_ + ':' if (UseCapturedNS_ and self.cell2_ca_poolses_nsprefix_) else '' cell2CaPools_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cell2CaPools', pretty_print=pretty_print) for baseCell_ in self.base_cells: - namespaceprefix_ = self.base_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.base_cells_nsprefix_) else '' baseCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='baseCell', pretty_print=pretty_print) for iafTauCell_ in self.iaf_tau_cells: - namespaceprefix_ = self.iaf_tau_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_tau_cells_nsprefix_) else '' iafTauCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauCell', pretty_print=pretty_print) for iafTauRefCell_ in self.iaf_tau_ref_cells: - namespaceprefix_ = self.iaf_tau_ref_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_tau_ref_cells_nsprefix_) else '' iafTauRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafTauRefCell', pretty_print=pretty_print) for iafCell_ in self.iaf_cells: - namespaceprefix_ = self.iaf_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_cells_nsprefix_) else '' iafCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafCell', pretty_print=pretty_print) for iafRefCell_ in self.iaf_ref_cells: - namespaceprefix_ = self.iaf_ref_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.iaf_ref_cells_nsprefix_) else '' iafRefCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='iafRefCell', pretty_print=pretty_print) for izhikevichCell_ in self.izhikevich_cells: - namespaceprefix_ = self.izhikevich_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich_cells_nsprefix_) else '' izhikevichCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevichCell', pretty_print=pretty_print) for izhikevich2007Cell_ in self.izhikevich2007_cells: - namespaceprefix_ = self.izhikevich2007_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.izhikevich2007_cells_nsprefix_) else '' izhikevich2007Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='izhikevich2007Cell', pretty_print=pretty_print) for adExIaFCell_ in self.ad_ex_ia_f_cells: - namespaceprefix_ = self.ad_ex_ia_f_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.ad_ex_ia_f_cells_nsprefix_) else '' adExIaFCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='adExIaFCell', pretty_print=pretty_print) for fitzHughNagumoCell_ in self.fitz_hugh_nagumo_cells: - namespaceprefix_ = self.fitz_hugh_nagumo_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.fitz_hugh_nagumo_cells_nsprefix_) else '' fitzHughNagumoCell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumoCell', pretty_print=pretty_print) for fitzHughNagumo1969Cell_ in self.fitz_hugh_nagumo1969_cells: - namespaceprefix_ = self.fitz_hugh_nagumo1969_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.fitz_hugh_nagumo1969_cells_nsprefix_) else '' fitzHughNagumo1969Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='fitzHughNagumo1969Cell', pretty_print=pretty_print) for pinskyRinzelCA3Cell_ in self.pinsky_rinzel_ca3_cells: - namespaceprefix_ = self.pinsky_rinzel_ca3_cells_nsprefix_ + ':' if (UseCapturedNS_ and self.pinsky_rinzel_ca3_cells_nsprefix_) else '' pinskyRinzelCA3Cell_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pinskyRinzelCA3Cell', pretty_print=pretty_print) for pulseGenerator_ in self.pulse_generators: - namespaceprefix_ = self.pulse_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generators_nsprefix_) else '' pulseGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGenerator', pretty_print=pretty_print) for pulseGeneratorDL_ in self.pulse_generator_dls: - namespaceprefix_ = self.pulse_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.pulse_generator_dls_nsprefix_) else '' pulseGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='pulseGeneratorDL', pretty_print=pretty_print) for sineGenerator_ in self.sine_generators: - namespaceprefix_ = self.sine_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generators_nsprefix_) else '' sineGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGenerator', pretty_print=pretty_print) for sineGeneratorDL_ in self.sine_generator_dls: - namespaceprefix_ = self.sine_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.sine_generator_dls_nsprefix_) else '' sineGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sineGeneratorDL', pretty_print=pretty_print) for rampGenerator_ in self.ramp_generators: - namespaceprefix_ = self.ramp_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generators_nsprefix_) else '' rampGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGenerator', pretty_print=pretty_print) for rampGeneratorDL_ in self.ramp_generator_dls: - namespaceprefix_ = self.ramp_generator_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.ramp_generator_dls_nsprefix_) else '' rampGeneratorDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='rampGeneratorDL', pretty_print=pretty_print) for compoundInput_ in self.compound_inputs: - namespaceprefix_ = self.compound_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.compound_inputs_nsprefix_) else '' compoundInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInput', pretty_print=pretty_print) for compoundInputDL_ in self.compound_input_dls: - namespaceprefix_ = self.compound_input_dls_nsprefix_ + ':' if (UseCapturedNS_ and self.compound_input_dls_nsprefix_) else '' compoundInputDL_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compoundInputDL', pretty_print=pretty_print) for voltageClamp_ in self.voltage_clamps: - namespaceprefix_ = self.voltage_clamps_nsprefix_ + ':' if (UseCapturedNS_ and self.voltage_clamps_nsprefix_) else '' voltageClamp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClamp', pretty_print=pretty_print) for voltageClampTriple_ in self.voltage_clamp_triples: - namespaceprefix_ = self.voltage_clamp_triples_nsprefix_ + ':' if (UseCapturedNS_ and self.voltage_clamp_triples_nsprefix_) else '' voltageClampTriple_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='voltageClampTriple', pretty_print=pretty_print) for spikeArray_ in self.spike_arrays: - namespaceprefix_ = self.spike_arrays_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_arrays_nsprefix_) else '' spikeArray_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeArray', pretty_print=pretty_print) for timedSynapticInput_ in self.timed_synaptic_inputs: - namespaceprefix_ = self.timed_synaptic_inputs_nsprefix_ + ':' if (UseCapturedNS_ and self.timed_synaptic_inputs_nsprefix_) else '' timedSynapticInput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='timedSynapticInput', pretty_print=pretty_print) for spikeGenerator_ in self.spike_generators: - namespaceprefix_ = self.spike_generators_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generators_nsprefix_) else '' spikeGenerator_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGenerator', pretty_print=pretty_print) for spikeGeneratorRandom_ in self.spike_generator_randoms: - namespaceprefix_ = self.spike_generator_randoms_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_randoms_nsprefix_) else '' spikeGeneratorRandom_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRandom', pretty_print=pretty_print) for spikeGeneratorPoisson_ in self.spike_generator_poissons: - namespaceprefix_ = self.spike_generator_poissons_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_poissons_nsprefix_) else '' spikeGeneratorPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorPoisson', pretty_print=pretty_print) for spikeGeneratorRefPoisson_ in self.spike_generator_ref_poissons: - namespaceprefix_ = self.spike_generator_ref_poissons_nsprefix_ + ':' if (UseCapturedNS_ and self.spike_generator_ref_poissons_nsprefix_) else '' spikeGeneratorRefPoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='spikeGeneratorRefPoisson', pretty_print=pretty_print) for poissonFiringSynapse_ in self.poisson_firing_synapses: - namespaceprefix_ = self.poisson_firing_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.poisson_firing_synapses_nsprefix_) else '' poissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='poissonFiringSynapse', pretty_print=pretty_print) for transientPoissonFiringSynapse_ in self.transient_poisson_firing_synapses: - namespaceprefix_ = self.transient_poisson_firing_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.transient_poisson_firing_synapses_nsprefix_) else '' transientPoissonFiringSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='transientPoissonFiringSynapse', pretty_print=pretty_print) for IF_curr_alpha_ in self.IF_curr_alpha: - namespaceprefix_ = self.IF_curr_alpha_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_curr_alpha_nsprefix_) else '' IF_curr_alpha_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_curr_alpha', pretty_print=pretty_print) for IF_curr_exp_ in self.IF_curr_exp: - namespaceprefix_ = self.IF_curr_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_curr_exp_nsprefix_) else '' IF_curr_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_curr_exp', pretty_print=pretty_print) for IF_cond_alpha_ in self.IF_cond_alpha: - namespaceprefix_ = self.IF_cond_alpha_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_cond_alpha_nsprefix_) else '' IF_cond_alpha_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_cond_alpha', pretty_print=pretty_print) for IF_cond_exp_ in self.IF_cond_exp: - namespaceprefix_ = self.IF_cond_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.IF_cond_exp_nsprefix_) else '' IF_cond_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='IF_cond_exp', pretty_print=pretty_print) for EIF_cond_exp_isfa_ista_ in self.EIF_cond_exp_isfa_ista: - namespaceprefix_ = self.EIF_cond_exp_isfa_ista_nsprefix_ + ':' if (UseCapturedNS_ and self.EIF_cond_exp_isfa_ista_nsprefix_) else '' EIF_cond_exp_isfa_ista_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EIF_cond_exp_isfa_ista', pretty_print=pretty_print) for EIF_cond_alpha_isfa_ista_ in self.EIF_cond_alpha_isfa_ista: - namespaceprefix_ = self.EIF_cond_alpha_isfa_ista_nsprefix_ + ':' if (UseCapturedNS_ and self.EIF_cond_alpha_isfa_ista_nsprefix_) else '' EIF_cond_alpha_isfa_ista_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='EIF_cond_alpha_isfa_ista', pretty_print=pretty_print) for HH_cond_exp_ in self.HH_cond_exp: - namespaceprefix_ = self.HH_cond_exp_nsprefix_ + ':' if (UseCapturedNS_ and self.HH_cond_exp_nsprefix_) else '' HH_cond_exp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='HH_cond_exp', pretty_print=pretty_print) for expCondSynapse_ in self.exp_cond_synapses: - namespaceprefix_ = self.exp_cond_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_cond_synapses_nsprefix_) else '' expCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCondSynapse', pretty_print=pretty_print) for alphaCondSynapse_ in self.alpha_cond_synapses: - namespaceprefix_ = self.alpha_cond_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_cond_synapses_nsprefix_) else '' alphaCondSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCondSynapse', pretty_print=pretty_print) for expCurrSynapse_ in self.exp_curr_synapses: - namespaceprefix_ = self.exp_curr_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.exp_curr_synapses_nsprefix_) else '' expCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='expCurrSynapse', pretty_print=pretty_print) for alphaCurrSynapse_ in self.alpha_curr_synapses: - namespaceprefix_ = self.alpha_curr_synapses_nsprefix_ + ':' if (UseCapturedNS_ and self.alpha_curr_synapses_nsprefix_) else '' alphaCurrSynapse_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='alphaCurrSynapse', pretty_print=pretty_print) for SpikeSourcePoisson_ in self.SpikeSourcePoisson: - namespaceprefix_ = self.SpikeSourcePoisson_nsprefix_ + ':' if (UseCapturedNS_ and self.SpikeSourcePoisson_nsprefix_) else '' SpikeSourcePoisson_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='SpikeSourcePoisson', pretty_print=pretty_print) for network_ in self.networks: - namespaceprefix_ = self.networks_nsprefix_ + ':' if (UseCapturedNS_ and self.networks_nsprefix_) else '' network_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='network', pretty_print=pretty_print) for ComponentType_ in self.ComponentType: - namespaceprefix_ = self.ComponentType_nsprefix_ + ':' if (UseCapturedNS_ and self.ComponentType_nsprefix_) else '' ComponentType_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ComponentType', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(NeuroMLDocument, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'include': obj_ = IncludeType.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.includes.append(obj_) obj_.original_tagname_ = 'include' elif nodeName_ == 'extracellularProperties': obj_ = ExtracellularProperties.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.extracellular_properties.append(obj_) obj_.original_tagname_ = 'extracellularProperties' elif nodeName_ == 'intracellularProperties': class_obj_ = self.get_class_obj_(child_, IntracellularProperties) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.intracellular_properties.append(obj_) obj_.original_tagname_ = 'intracellularProperties' elif nodeName_ == 'morphology': obj_ = Morphology.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.morphology.append(obj_) obj_.original_tagname_ = 'morphology' elif nodeName_ == 'ionChannel': class_obj_ = self.get_class_obj_(child_, IonChannel) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ion_channel.append(obj_) obj_.original_tagname_ = 'ionChannel' elif nodeName_ == 'ionChannelHH': obj_ = IonChannelHH.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ion_channel_hhs.append(obj_) obj_.original_tagname_ = 'ionChannelHH' elif nodeName_ == 'ionChannelVShift': obj_ = IonChannelVShift.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ion_channel_v_shifts.append(obj_) obj_.original_tagname_ = 'ionChannelVShift' elif nodeName_ == 'ionChannelKS': obj_ = IonChannelKS.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ion_channel_kses.append(obj_) obj_.original_tagname_ = 'ionChannelKS' elif nodeName_ == 'decayingPoolConcentrationModel': class_obj_ = self.get_class_obj_(child_, DecayingPoolConcentrationModel) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.decaying_pool_concentration_models.append(obj_) obj_.original_tagname_ = 'decayingPoolConcentrationModel' elif nodeName_ == 'fixedFactorConcentrationModel': obj_ = FixedFactorConcentrationModel.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.fixed_factor_concentration_models.append(obj_) obj_.original_tagname_ = 'fixedFactorConcentrationModel' elif nodeName_ == 'alphaCurrentSynapse': obj_ = AlphaCurrentSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.alpha_current_synapses.append(obj_) obj_.original_tagname_ = 'alphaCurrentSynapse' elif nodeName_ == 'alphaSynapse': obj_ = AlphaSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.alpha_synapses.append(obj_) obj_.original_tagname_ = 'alphaSynapse' elif nodeName_ == 'expOneSynapse': obj_ = ExpOneSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.exp_one_synapses.append(obj_) obj_.original_tagname_ = 'expOneSynapse' elif nodeName_ == 'expTwoSynapse': class_obj_ = self.get_class_obj_(child_, ExpTwoSynapse) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.exp_two_synapses.append(obj_) obj_.original_tagname_ = 'expTwoSynapse' elif nodeName_ == 'expThreeSynapse': obj_ = ExpThreeSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.exp_three_synapses.append(obj_) obj_.original_tagname_ = 'expThreeSynapse' elif nodeName_ == 'blockingPlasticSynapse': obj_ = BlockingPlasticSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.blocking_plastic_synapses.append(obj_) obj_.original_tagname_ = 'blockingPlasticSynapse' elif nodeName_ == 'doubleSynapse': obj_ = DoubleSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.double_synapses.append(obj_) obj_.original_tagname_ = 'doubleSynapse' elif nodeName_ == 'gapJunction': obj_ = GapJunction.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gap_junctions.append(obj_) obj_.original_tagname_ = 'gapJunction' elif nodeName_ == 'silentSynapse': obj_ = SilentSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.silent_synapses.append(obj_) obj_.original_tagname_ = 'silentSynapse' elif nodeName_ == 'linearGradedSynapse': obj_ = LinearGradedSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.linear_graded_synapses.append(obj_) obj_.original_tagname_ = 'linearGradedSynapse' elif nodeName_ == 'gradedSynapse': obj_ = GradedSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.graded_synapses.append(obj_) obj_.original_tagname_ = 'gradedSynapse' elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.biophysical_properties.append(obj_) obj_.original_tagname_ = 'biophysicalProperties' elif nodeName_ == 'cell': class_obj_ = self.get_class_obj_(child_, Cell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.cells.append(obj_) obj_.original_tagname_ = 'cell' elif nodeName_ == 'cell2CaPools': obj_ = Cell2CaPools.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.cell2_ca_poolses.append(obj_) obj_.original_tagname_ = 'cell2CaPools' elif nodeName_ == 'baseCell': class_obj_ = self.get_class_obj_(child_, BaseCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.base_cells.append(obj_) obj_.original_tagname_ = 'baseCell' elif nodeName_ == 'iafTauCell': class_obj_ = self.get_class_obj_(child_, IafTauCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.iaf_tau_cells.append(obj_) obj_.original_tagname_ = 'iafTauCell' elif nodeName_ == 'iafTauRefCell': obj_ = IafTauRefCell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.iaf_tau_ref_cells.append(obj_) obj_.original_tagname_ = 'iafTauRefCell' elif nodeName_ == 'iafCell': class_obj_ = self.get_class_obj_(child_, IafCell) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.iaf_cells.append(obj_) obj_.original_tagname_ = 'iafCell' elif nodeName_ == 'iafRefCell': obj_ = IafRefCell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.iaf_ref_cells.append(obj_) obj_.original_tagname_ = 'iafRefCell' elif nodeName_ == 'izhikevichCell': obj_ = IzhikevichCell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.izhikevich_cells.append(obj_) obj_.original_tagname_ = 'izhikevichCell' elif nodeName_ == 'izhikevich2007Cell': obj_ = Izhikevich2007Cell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.izhikevich2007_cells.append(obj_) obj_.original_tagname_ = 'izhikevich2007Cell' elif nodeName_ == 'adExIaFCell': obj_ = AdExIaFCell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ad_ex_ia_f_cells.append(obj_) obj_.original_tagname_ = 'adExIaFCell' elif nodeName_ == 'fitzHughNagumoCell': obj_ = FitzHughNagumoCell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.fitz_hugh_nagumo_cells.append(obj_) obj_.original_tagname_ = 'fitzHughNagumoCell' elif nodeName_ == 'fitzHughNagumo1969Cell': obj_ = FitzHughNagumo1969Cell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.fitz_hugh_nagumo1969_cells.append(obj_) obj_.original_tagname_ = 'fitzHughNagumo1969Cell' elif nodeName_ == 'pinskyRinzelCA3Cell': obj_ = PinskyRinzelCA3Cell.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.pinsky_rinzel_ca3_cells.append(obj_) obj_.original_tagname_ = 'pinskyRinzelCA3Cell' elif nodeName_ == 'pulseGenerator': obj_ = PulseGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.pulse_generators.append(obj_) obj_.original_tagname_ = 'pulseGenerator' elif nodeName_ == 'pulseGeneratorDL': obj_ = PulseGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.pulse_generator_dls.append(obj_) obj_.original_tagname_ = 'pulseGeneratorDL' elif nodeName_ == 'sineGenerator': obj_ = SineGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sine_generators.append(obj_) obj_.original_tagname_ = 'sineGenerator' elif nodeName_ == 'sineGeneratorDL': obj_ = SineGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.sine_generator_dls.append(obj_) obj_.original_tagname_ = 'sineGeneratorDL' elif nodeName_ == 'rampGenerator': obj_ = RampGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ramp_generators.append(obj_) obj_.original_tagname_ = 'rampGenerator' elif nodeName_ == 'rampGeneratorDL': obj_ = RampGeneratorDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ramp_generator_dls.append(obj_) obj_.original_tagname_ = 'rampGeneratorDL' elif nodeName_ == 'compoundInput': obj_ = CompoundInput.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.compound_inputs.append(obj_) obj_.original_tagname_ = 'compoundInput' elif nodeName_ == 'compoundInputDL': obj_ = CompoundInputDL.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.compound_input_dls.append(obj_) obj_.original_tagname_ = 'compoundInputDL' elif nodeName_ == 'voltageClamp': obj_ = VoltageClamp.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.voltage_clamps.append(obj_) obj_.original_tagname_ = 'voltageClamp' elif nodeName_ == 'voltageClampTriple': obj_ = VoltageClampTriple.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.voltage_clamp_triples.append(obj_) obj_.original_tagname_ = 'voltageClampTriple' elif nodeName_ == 'spikeArray': obj_ = SpikeArray.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_arrays.append(obj_) obj_.original_tagname_ = 'spikeArray' elif nodeName_ == 'timedSynapticInput': obj_ = TimedSynapticInput.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.timed_synaptic_inputs.append(obj_) obj_.original_tagname_ = 'timedSynapticInput' elif nodeName_ == 'spikeGenerator': obj_ = SpikeGenerator.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_generators.append(obj_) obj_.original_tagname_ = 'spikeGenerator' elif nodeName_ == 'spikeGeneratorRandom': obj_ = SpikeGeneratorRandom.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_generator_randoms.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRandom' elif nodeName_ == 'spikeGeneratorPoisson': class_obj_ = self.get_class_obj_(child_, SpikeGeneratorPoisson) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_generator_poissons.append(obj_) obj_.original_tagname_ = 'spikeGeneratorPoisson' elif nodeName_ == 'spikeGeneratorRefPoisson': obj_ = SpikeGeneratorRefPoisson.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.spike_generator_ref_poissons.append(obj_) obj_.original_tagname_ = 'spikeGeneratorRefPoisson' elif nodeName_ == 'poissonFiringSynapse': obj_ = PoissonFiringSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.poisson_firing_synapses.append(obj_) obj_.original_tagname_ = 'poissonFiringSynapse' elif nodeName_ == 'transientPoissonFiringSynapse': obj_ = TransientPoissonFiringSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.transient_poisson_firing_synapses.append(obj_) obj_.original_tagname_ = 'transientPoissonFiringSynapse' elif nodeName_ == 'IF_curr_alpha': obj_ = IF_curr_alpha.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.IF_curr_alpha.append(obj_) obj_.original_tagname_ = 'IF_curr_alpha' elif nodeName_ == 'IF_curr_exp': obj_ = IF_curr_exp.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.IF_curr_exp.append(obj_) obj_.original_tagname_ = 'IF_curr_exp' elif nodeName_ == 'IF_cond_alpha': obj_ = IF_cond_alpha.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.IF_cond_alpha.append(obj_) obj_.original_tagname_ = 'IF_cond_alpha' elif nodeName_ == 'IF_cond_exp': obj_ = IF_cond_exp.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.IF_cond_exp.append(obj_) obj_.original_tagname_ = 'IF_cond_exp' elif nodeName_ == 'EIF_cond_exp_isfa_ista': class_obj_ = self.get_class_obj_(child_, EIF_cond_exp_isfa_ista) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.EIF_cond_exp_isfa_ista.append(obj_) obj_.original_tagname_ = 'EIF_cond_exp_isfa_ista' elif nodeName_ == 'EIF_cond_alpha_isfa_ista': obj_ = EIF_cond_alpha_isfa_ista.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.EIF_cond_alpha_isfa_ista.append(obj_) obj_.original_tagname_ = 'EIF_cond_alpha_isfa_ista' elif nodeName_ == 'HH_cond_exp': obj_ = HH_cond_exp.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.HH_cond_exp.append(obj_) obj_.original_tagname_ = 'HH_cond_exp' elif nodeName_ == 'expCondSynapse': obj_ = ExpCondSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.exp_cond_synapses.append(obj_) obj_.original_tagname_ = 'expCondSynapse' elif nodeName_ == 'alphaCondSynapse': obj_ = AlphaCondSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.alpha_cond_synapses.append(obj_) obj_.original_tagname_ = 'alphaCondSynapse' elif nodeName_ == 'expCurrSynapse': obj_ = ExpCurrSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.exp_curr_synapses.append(obj_) obj_.original_tagname_ = 'expCurrSynapse' elif nodeName_ == 'alphaCurrSynapse': obj_ = AlphaCurrSynapse.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.alpha_curr_synapses.append(obj_) obj_.original_tagname_ = 'alphaCurrSynapse' elif nodeName_ == 'SpikeSourcePoisson': obj_ = SpikeSourcePoisson.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.SpikeSourcePoisson.append(obj_) obj_.original_tagname_ = 'SpikeSourcePoisson' elif nodeName_ == 'network': obj_ = Network.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.networks.append(obj_) obj_.original_tagname_ = 'network' elif nodeName_ == 'ComponentType': obj_ = ComponentType.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.ComponentType.append(obj_) obj_.original_tagname_ = 'ComponentType' super(NeuroMLDocument, self).buildChildren(child_, node, nodeName_, True) @@ -22247,21 +16251,16 @@ def append(self,element): class BasePynnSynapse(BaseSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_syn', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_syn', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BasePynnSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BasePynnSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.tau_syn = _cast(float, tau_syn) - self.tau_syn_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22274,16 +16273,6 @@ def factory(*args_, **kwargs_): else: return BasePynnSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tau_syn(self): - return self.tau_syn - def set_tau_syn(self, tau_syn): - self.tau_syn = tau_syn - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BasePynnSynapse, self).hasContent_() @@ -22299,10 +16288,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BasePynnSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22322,69 +16309,54 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BasePynnSynapse', fromsubclass_=False, pretty_print=True): - super(BasePynnSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BasePynnSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau_syn', node) if value is not None and 'tau_syn' not in already_processed: already_processed.add('tau_syn') - value = self.gds_parse_float(value, node, 'tau_syn') - self.tau_syn = value + try: + self.tau_syn = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_syn): %s' % exp) value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BasePynnSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BasePynnSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BasePynnSynapse class basePyNNCell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('cm', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('i_offset', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('tau_syn_E', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('tau_syn_I', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('v_init', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('cm', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('i_offset', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_syn_E', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_syn_I', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_init', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("basePyNNCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(basePyNNCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.cm = _cast(float, cm) - self.cm_nsprefix_ = None self.i_offset = _cast(float, i_offset) - self.i_offset_nsprefix_ = None self.tau_syn_E = _cast(float, tau_syn_E) - self.tau_syn_E_nsprefix_ = None self.tau_syn_I = _cast(float, tau_syn_I) - self.tau_syn_I_nsprefix_ = None self.v_init = _cast(float, v_init) - self.v_init_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -22397,32 +16369,6 @@ def factory(*args_, **kwargs_): else: return basePyNNCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_cm(self): - return self.cm - def set_cm(self, cm): - self.cm = cm - def get_i_offset(self): - return self.i_offset - def set_i_offset(self, i_offset): - self.i_offset = i_offset - def get_tau_syn_E(self): - return self.tau_syn_E - def set_tau_syn_E(self, tau_syn_E): - self.tau_syn_E = tau_syn_E - def get_tau_syn_I(self): - return self.tau_syn_I - def set_tau_syn_I(self, tau_syn_I): - self.tau_syn_I = tau_syn_I - def get_v_init(self): - return self.v_init - def set_v_init(self, v_init): - self.v_init = v_init - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNCell, self).hasContent_() @@ -22438,10 +16384,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'basePyNNCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22473,56 +16417,58 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNCell', fromsubclass_=False, pretty_print=True): - super(basePyNNCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(basePyNNCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('cm', node) if value is not None and 'cm' not in already_processed: already_processed.add('cm') - value = self.gds_parse_float(value, node, 'cm') - self.cm = value + try: + self.cm = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (cm): %s' % exp) value = find_attr_value_('i_offset', node) if value is not None and 'i_offset' not in already_processed: already_processed.add('i_offset') - value = self.gds_parse_float(value, node, 'i_offset') - self.i_offset = value + try: + self.i_offset = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (i_offset): %s' % exp) value = find_attr_value_('tau_syn_E', node) if value is not None and 'tau_syn_E' not in already_processed: already_processed.add('tau_syn_E') - value = self.gds_parse_float(value, node, 'tau_syn_E') - self.tau_syn_E = value + try: + self.tau_syn_E = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_syn_E): %s' % exp) value = find_attr_value_('tau_syn_I', node) if value is not None and 'tau_syn_I' not in already_processed: already_processed.add('tau_syn_I') - value = self.gds_parse_float(value, node, 'tau_syn_I') - self.tau_syn_I = value + try: + self.tau_syn_I = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_syn_I): %s' % exp) value = find_attr_value_('v_init', node) if value is not None and 'v_init' not in already_processed: already_processed.add('v_init') - value = self.gds_parse_float(value, node, 'v_init') - self.v_init = value + try: + self.v_init = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_init): %s' % exp) value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(basePyNNCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNCell @@ -22531,36 +16477,29 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ContinuousProjection(BaseProjection): """Projection between two populations consisting of analog connections (e.g. graded synapses)""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('continuous_connections', 'ContinuousConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnection', 'type': 'ContinuousConnection'}, None), - MemberSpec_('continuous_connection_instances', 'ContinuousConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstance', 'type': 'ContinuousConnectionInstance'}, None), - MemberSpec_('continuous_connection_instance_ws', 'ContinuousConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'continuousConnectionInstanceW', 'type': 'ContinuousConnectionInstanceW'}, None), + MemberSpec_('continuous_connections', 'ContinuousConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnection', u'name': u'continuousConnection', u'minOccurs': u'0'}, None), + MemberSpec_('continuous_connection_instances', 'ContinuousConnectionInstance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnectionInstance', u'name': u'continuousConnectionInstance', u'minOccurs': u'0'}, None), + MemberSpec_('continuous_connection_instance_ws', 'ContinuousConnectionInstanceW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ContinuousConnectionInstanceW', u'name': u'continuousConnectionInstanceW', u'minOccurs': u'0'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, continuous_connections=None, continuous_connection_instances=None, continuous_connection_instance_ws=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, continuous_connections=None, continuous_connection_instances=None, continuous_connection_instance_ws=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ContinuousProjection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(ContinuousProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) if continuous_connections is None: self.continuous_connections = [] else: self.continuous_connections = continuous_connections - self.continuous_connections_nsprefix_ = None if continuous_connection_instances is None: self.continuous_connection_instances = [] else: self.continuous_connection_instances = continuous_connection_instances - self.continuous_connection_instances_nsprefix_ = None if continuous_connection_instance_ws is None: self.continuous_connection_instance_ws = [] else: self.continuous_connection_instance_ws = continuous_connection_instance_ws - self.continuous_connection_instance_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22572,40 +16511,6 @@ def factory(*args_, **kwargs_): else: return ContinuousProjection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_continuousConnection(self): - return self.continuous_connections - def set_continuousConnection(self, continuous_connections): - self.continuous_connections = continuous_connections - def add_continuousConnection(self, value): - self.continuous_connections.append(value) - def insert_continuousConnection_at(self, index, value): - self.continuous_connections.insert(index, value) - def replace_continuousConnection_at(self, index, value): - self.continuous_connections[index] = value - def get_continuousConnectionInstance(self): - return self.continuous_connection_instances - def set_continuousConnectionInstance(self, continuous_connection_instances): - self.continuous_connection_instances = continuous_connection_instances - def add_continuousConnectionInstance(self, value): - self.continuous_connection_instances.append(value) - def insert_continuousConnectionInstance_at(self, index, value): - self.continuous_connection_instances.insert(index, value) - def replace_continuousConnectionInstance_at(self, index, value): - self.continuous_connection_instances[index] = value - def get_continuousConnectionInstanceW(self): - return self.continuous_connection_instance_ws - def set_continuousConnectionInstanceW(self, continuous_connection_instance_ws): - self.continuous_connection_instance_ws = continuous_connection_instance_ws - def add_continuousConnectionInstanceW(self, value): - self.continuous_connection_instance_ws.append(value) - def insert_continuousConnectionInstanceW_at(self, index, value): - self.continuous_connection_instance_ws.insert(index, value) - def replace_continuousConnectionInstanceW_at(self, index, value): - self.continuous_connection_instance_ws[index] = value def hasContent_(self): if ( self.continuous_connections or @@ -22624,10 +16529,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ContinuousProjection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22642,49 +16545,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ContinuousProjection'): super(ContinuousProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContinuousProjection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousProjection', fromsubclass_=False, pretty_print=True): - super(ContinuousProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ContinuousProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for continuousConnection_ in self.continuous_connections: - namespaceprefix_ = self.continuous_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connections_nsprefix_) else '' continuousConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnection', pretty_print=pretty_print) for continuousConnectionInstance_ in self.continuous_connection_instances: - namespaceprefix_ = self.continuous_connection_instances_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connection_instances_nsprefix_) else '' continuousConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstance', pretty_print=pretty_print) for continuousConnectionInstanceW_ in self.continuous_connection_instance_ws: - namespaceprefix_ = self.continuous_connection_instance_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.continuous_connection_instance_ws_nsprefix_) else '' continuousConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='continuousConnectionInstanceW', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ContinuousProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'continuousConnection': class_obj_ = self.get_class_obj_(child_, ContinuousConnection) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.continuous_connections.append(obj_) obj_.original_tagname_ = 'continuousConnection' elif nodeName_ == 'continuousConnectionInstance': class_obj_ = self.get_class_obj_(child_, ContinuousConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.continuous_connection_instances.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstance' elif nodeName_ == 'continuousConnectionInstanceW': obj_ = ContinuousConnectionInstanceW.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.continuous_connection_instance_ws.append(obj_) obj_.original_tagname_ = 'continuousConnectionInstanceW' super(ContinuousProjection, self).buildChildren(child_, node, nodeName_, True) @@ -22772,38 +16668,31 @@ def exportHdf5(self, h5file, h5Group): class ElectricalProjection(BaseProjection): - """Projection between two populations consisting of electrical connections - (gap junctions)""" - __hash__ = GeneratedsSuper.__hash__ + """Projection between two populations consisting of electrical + connections (gap junctions)""" member_data_items_ = [ - MemberSpec_('electrical_connections', 'ElectricalConnection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnection', 'type': 'ElectricalConnection'}, None), - MemberSpec_('electrical_connection_instances', 'ElectricalConnectionInstance', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstance', 'type': 'ElectricalConnectionInstance'}, None), - MemberSpec_('electrical_connection_instance_ws', 'ElectricalConnectionInstanceW', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'electricalConnectionInstanceW', 'type': 'ElectricalConnectionInstanceW'}, None), + MemberSpec_('electrical_connections', 'ElectricalConnection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnection', u'name': u'electricalConnection', u'minOccurs': u'0'}, None), + MemberSpec_('electrical_connection_instances', 'ElectricalConnectionInstance', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnectionInstance', u'name': u'electricalConnectionInstance', u'minOccurs': u'0'}, None), + MemberSpec_('electrical_connection_instance_ws', 'ElectricalConnectionInstanceW', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ElectricalConnectionInstanceW', u'name': u'electricalConnectionInstanceW', u'minOccurs': u'0'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, electrical_connections=None, electrical_connection_instances=None, electrical_connection_instance_ws=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, electrical_connections=None, electrical_connection_instances=None, electrical_connection_instance_ws=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ElectricalProjection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(ElectricalProjection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) if electrical_connections is None: self.electrical_connections = [] else: self.electrical_connections = electrical_connections - self.electrical_connections_nsprefix_ = None if electrical_connection_instances is None: self.electrical_connection_instances = [] else: self.electrical_connection_instances = electrical_connection_instances - self.electrical_connection_instances_nsprefix_ = None if electrical_connection_instance_ws is None: self.electrical_connection_instance_ws = [] else: self.electrical_connection_instance_ws = electrical_connection_instance_ws - self.electrical_connection_instance_ws_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -22815,40 +16704,6 @@ def factory(*args_, **kwargs_): else: return ElectricalProjection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_electricalConnection(self): - return self.electrical_connections - def set_electricalConnection(self, electrical_connections): - self.electrical_connections = electrical_connections - def add_electricalConnection(self, value): - self.electrical_connections.append(value) - def insert_electricalConnection_at(self, index, value): - self.electrical_connections.insert(index, value) - def replace_electricalConnection_at(self, index, value): - self.electrical_connections[index] = value - def get_electricalConnectionInstance(self): - return self.electrical_connection_instances - def set_electricalConnectionInstance(self, electrical_connection_instances): - self.electrical_connection_instances = electrical_connection_instances - def add_electricalConnectionInstance(self, value): - self.electrical_connection_instances.append(value) - def insert_electricalConnectionInstance_at(self, index, value): - self.electrical_connection_instances.insert(index, value) - def replace_electricalConnectionInstance_at(self, index, value): - self.electrical_connection_instances[index] = value - def get_electricalConnectionInstanceW(self): - return self.electrical_connection_instance_ws - def set_electricalConnectionInstanceW(self, electrical_connection_instance_ws): - self.electrical_connection_instance_ws = electrical_connection_instance_ws - def add_electricalConnectionInstanceW(self, value): - self.electrical_connection_instance_ws.append(value) - def insert_electricalConnectionInstanceW_at(self, index, value): - self.electrical_connection_instance_ws.insert(index, value) - def replace_electricalConnectionInstanceW_at(self, index, value): - self.electrical_connection_instance_ws[index] = value def hasContent_(self): if ( self.electrical_connections or @@ -22867,10 +16722,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ElectricalProjection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -22885,49 +16738,42 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ElectricalProjection'): super(ElectricalProjection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ElectricalProjection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalProjection', fromsubclass_=False, pretty_print=True): - super(ElectricalProjection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ElectricalProjection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for electricalConnection_ in self.electrical_connections: - namespaceprefix_ = self.electrical_connections_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connections_nsprefix_) else '' electricalConnection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnection', pretty_print=pretty_print) for electricalConnectionInstance_ in self.electrical_connection_instances: - namespaceprefix_ = self.electrical_connection_instances_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connection_instances_nsprefix_) else '' electricalConnectionInstance_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstance', pretty_print=pretty_print) for electricalConnectionInstanceW_ in self.electrical_connection_instance_ws: - namespaceprefix_ = self.electrical_connection_instance_ws_nsprefix_ + ':' if (UseCapturedNS_ and self.electrical_connection_instance_ws_nsprefix_) else '' electricalConnectionInstanceW_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='electricalConnectionInstanceW', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ElectricalProjection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'electricalConnection': class_obj_ = self.get_class_obj_(child_, ElectricalConnection) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.electrical_connections.append(obj_) obj_.original_tagname_ = 'electricalConnection' elif nodeName_ == 'electricalConnectionInstance': class_obj_ = self.get_class_obj_(child_, ElectricalConnectionInstance) obj_ = class_obj_.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.electrical_connection_instances.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstance' elif nodeName_ == 'electricalConnectionInstanceW': obj_ = ElectricalConnectionInstanceW.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.electrical_connection_instance_ws.append(obj_) obj_.original_tagname_ = 'electricalConnectionInstanceW' super(ElectricalProjection, self).buildChildren(child_, node, nodeName_, True) @@ -23010,38 +16856,28 @@ def exportHdf5(self, h5file, h5Group): class BaseConnectionNewFormat(BaseConnection): - """Base of all synaptic connections with preCell, postSegment, etc. - See BaseConnectionOldFormat""" - __hash__ = GeneratedsSuper.__hash__ + """Base of all synaptic connections with preCell, postSegment, etc. See + BaseConnectionOldFormat""" member_data_items_ = [ - MemberSpec_('pre_cell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('pre_cell', 'xs:string', 0, 0, {'use': u'required'}), MemberSpec_('pre_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('post_cell', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('post_cell', 'xs:string', 0, 0, {'use': u'required'}), MemberSpec_('post_segment', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseConnectionNewFormat"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(BaseConnectionNewFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.pre_cell = _cast(None, pre_cell) - self.pre_cell_nsprefix_ = None self.pre_segment = _cast(int, pre_segment) - self.pre_segment_nsprefix_ = None self.pre_fraction_along = _cast(float, pre_fraction_along) - self.pre_fraction_along_nsprefix_ = None self.post_cell = _cast(None, post_cell) - self.post_cell_nsprefix_ = None self.post_segment = _cast(int, post_segment) - self.post_segment_nsprefix_ = None self.post_fraction_along = _cast(float, post_fraction_along) - self.post_fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -23054,59 +16890,17 @@ def factory(*args_, **kwargs_): else: return BaseConnectionNewFormat(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_preCell(self): - return self.pre_cell - def set_preCell(self, pre_cell): - self.pre_cell = pre_cell - def get_preSegment(self): - return self.pre_segment - def set_preSegment(self, pre_segment): - self.pre_segment = pre_segment - def get_preFractionAlong(self): - return self.pre_fraction_along - def set_preFractionAlong(self, pre_fraction_along): - self.pre_fraction_along = pre_fraction_along - def get_postCell(self): - return self.post_cell - def set_postCell(self, post_cell): - self.post_cell = post_cell - def get_postSegment(self): - return self.post_segment - def set_postSegment(self, post_segment): - self.post_segment = post_segment - def get_postFractionAlong(self): - return self.post_fraction_along - def set_postFractionAlong(self, post_fraction_along): - self.post_fraction_along = post_fraction_along - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value < 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) if value > 1: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) def hasContent_(self): if ( super(BaseConnectionNewFormat, self).hasContent_() @@ -23122,10 +16916,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseConnectionNewFormat': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23143,40 +16935,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' preCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell), input_name='preCell')), )) if self.pre_segment != 0 and 'pre_segment' not in already_processed: already_processed.add('pre_segment') - outfile.write(' preSegment="%s"' % self.gds_format_integer(self.pre_segment, input_name='preSegment')) + outfile.write(' preSegment=%s' % (quote_attrib(self.pre_segment), )) if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: already_processed.add('pre_fraction_along') - outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.pre_fraction_along, input_name='preFractionAlong')) + outfile.write(' preFractionAlong=%s' % (quote_attrib(self.pre_fraction_along), )) if self.post_cell is not None and 'post_cell' not in already_processed: already_processed.add('post_cell') outfile.write(' postCell=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell), input_name='postCell')), )) if self.post_segment != 0 and 'post_segment' not in already_processed: already_processed.add('post_segment') - outfile.write(' postSegment="%s"' % self.gds_format_integer(self.post_segment, input_name='postSegment')) + outfile.write(' postSegment=%s' % (quote_attrib(self.post_segment), )) if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: already_processed.add('post_fraction_along') - outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.post_fraction_along, input_name='postFractionAlong')) + outfile.write(' postFractionAlong=%s' % (quote_attrib(self.post_fraction_along), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnectionNewFormat', fromsubclass_=False, pretty_print=True): - super(BaseConnectionNewFormat, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BaseConnectionNewFormat, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCell', node) @@ -23186,15 +16970,20 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preSegment', node) if value is not None and 'preSegment' not in already_processed: already_processed.add('preSegment') - self.pre_segment = self.gds_parse_integer(value, node, 'preSegment') + try: + self.pre_segment = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.pre_segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.pre_segment) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') - value = self.gds_parse_float(value, node, 'preFractionAlong') - self.pre_fraction_along = value + try: + self.pre_fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (preFractionAlong): %s' % exp) self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCell', node) if value is not None and 'postCell' not in already_processed: @@ -23203,22 +16992,27 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('postSegment', node) if value is not None and 'postSegment' not in already_processed: already_processed.add('postSegment') - self.post_segment = self.gds_parse_integer(value, node, 'postSegment') + try: + self.post_segment = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.post_segment < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.post_segment) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') - value = self.gds_parse_float(value, node, 'postFractionAlong') - self.post_fraction_along = value + try: + self.post_fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (postFractionAlong): %s' % exp) self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnectionNewFormat, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseConnectionNewFormat, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnectionNewFormat @@ -23226,38 +17020,28 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class BaseConnectionOldFormat(BaseConnection): """Base of all synaptic connections with preCellId, postSegmentId, etc. - Note: this is not the best name for these attributes, since Id is - superfluous, hence BaseConnectionNewFormat""" - __hash__ = GeneratedsSuper.__hash__ + Note: this is not the best name for these attributes, since Id + is superfluous, hence BaseConnectionNewFormat""" member_data_items_ = [ - MemberSpec_('pre_cell_id', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('pre_cell_id', 'xs:string', 0, 0, {'use': u'required'}), MemberSpec_('pre_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('pre_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), - MemberSpec_('post_cell_id', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('post_cell_id', 'xs:string', 0, 0, {'use': u'required'}), MemberSpec_('post_segment_id', 'NonNegativeInteger', 0, 1, {'use': 'optional'}), MemberSpec_('post_fraction_along', 'ZeroToOne', 0, 1, {'use': 'optional'}), ] subclass = None superclass = BaseConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseConnectionOldFormat"), self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) + super(BaseConnectionOldFormat, self).__init__(neuro_lex_id, id, extensiontype_, **kwargs_) self.pre_cell_id = _cast(None, pre_cell_id) - self.pre_cell_id_nsprefix_ = None self.pre_segment_id = _cast(int, pre_segment_id) - self.pre_segment_id_nsprefix_ = None self.pre_fraction_along = _cast(float, pre_fraction_along) - self.pre_fraction_along_nsprefix_ = None self.post_cell_id = _cast(None, post_cell_id) - self.post_cell_id_nsprefix_ = None self.post_segment_id = _cast(int, post_segment_id) - self.post_segment_id_nsprefix_ = None self.post_fraction_along = _cast(float, post_fraction_along) - self.post_fraction_along_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -23270,59 +17054,17 @@ def factory(*args_, **kwargs_): else: return BaseConnectionOldFormat(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_preCellId(self): - return self.pre_cell_id - def set_preCellId(self, pre_cell_id): - self.pre_cell_id = pre_cell_id - def get_preSegmentId(self): - return self.pre_segment_id - def set_preSegmentId(self, pre_segment_id): - self.pre_segment_id = pre_segment_id - def get_preFractionAlong(self): - return self.pre_fraction_along - def set_preFractionAlong(self, pre_fraction_along): - self.pre_fraction_along = pre_fraction_along - def get_postCellId(self): - return self.post_cell_id - def set_postCellId(self, post_cell_id): - self.post_cell_id = post_cell_id - def get_postSegmentId(self): - return self.post_segment_id - def set_postSegmentId(self, post_segment_id): - self.post_segment_id = post_segment_id - def get_postFractionAlong(self): - return self.post_fraction_along - def set_postFractionAlong(self, post_fraction_along): - self.post_fraction_along = post_fraction_along - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NonNegativeInteger(self, value): # Validate type NonNegativeInteger, a restriction on xs:nonNegativeInteger. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, int): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: pass def validate_ZeroToOne(self, value): # Validate type ZeroToOne, a restriction on xs:float. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, float): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (float)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if value < 0: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on ZeroToOne' % {"value" : value} ) if value > 1: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on ZeroToOne' % {"value": value, "lineno": lineno} ) - result = False + warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on ZeroToOne' % {"value" : value} ) def hasContent_(self): if ( super(BaseConnectionOldFormat, self).hasContent_() @@ -23338,10 +17080,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseConnectionOldFormat': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23359,40 +17099,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' preCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_cell_id), input_name='preCellId')), )) if self.pre_segment_id != 0 and 'pre_segment_id' not in already_processed: already_processed.add('pre_segment_id') - outfile.write(' preSegmentId="%s"' % self.gds_format_integer(self.pre_segment_id, input_name='preSegmentId')) + outfile.write(' preSegmentId=%s' % (quote_attrib(self.pre_segment_id), )) if self.pre_fraction_along != 0.5 and 'pre_fraction_along' not in already_processed: already_processed.add('pre_fraction_along') - outfile.write(' preFractionAlong="%s"' % self.gds_format_float(self.pre_fraction_along, input_name='preFractionAlong')) + outfile.write(' preFractionAlong=%s' % (quote_attrib(self.pre_fraction_along), )) if self.post_cell_id is not None and 'post_cell_id' not in already_processed: already_processed.add('post_cell_id') outfile.write(' postCellId=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_cell_id), input_name='postCellId')), )) if self.post_segment_id != 0 and 'post_segment_id' not in already_processed: already_processed.add('post_segment_id') - outfile.write(' postSegmentId="%s"' % self.gds_format_integer(self.post_segment_id, input_name='postSegmentId')) + outfile.write(' postSegmentId=%s' % (quote_attrib(self.post_segment_id), )) if self.post_fraction_along != 0.5 and 'post_fraction_along' not in already_processed: already_processed.add('post_fraction_along') - outfile.write(' postFractionAlong="%s"' % self.gds_format_float(self.post_fraction_along, input_name='postFractionAlong')) + outfile.write(' postFractionAlong=%s' % (quote_attrib(self.post_fraction_along), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConnectionOldFormat', fromsubclass_=False, pretty_print=True): - super(BaseConnectionOldFormat, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BaseConnectionOldFormat, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preCellId', node) @@ -23402,15 +17134,20 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preSegmentId', node) if value is not None and 'preSegmentId' not in already_processed: already_processed.add('preSegmentId') - self.pre_segment_id = self.gds_parse_integer(value, node, 'preSegmentId') + try: + self.pre_segment_id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.pre_segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.pre_segment_id) # validate type NonNegativeInteger value = find_attr_value_('preFractionAlong', node) if value is not None and 'preFractionAlong' not in already_processed: already_processed.add('preFractionAlong') - value = self.gds_parse_float(value, node, 'preFractionAlong') - self.pre_fraction_along = value + try: + self.pre_fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (preFractionAlong): %s' % exp) self.validate_ZeroToOne(self.pre_fraction_along) # validate type ZeroToOne value = find_attr_value_('postCellId', node) if value is not None and 'postCellId' not in already_processed: @@ -23419,22 +17156,27 @@ def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('postSegmentId', node) if value is not None and 'postSegmentId' not in already_processed: already_processed.add('postSegmentId') - self.post_segment_id = self.gds_parse_integer(value, node, 'postSegmentId') + try: + self.post_segment_id = int(value) + except ValueError as exp: + raise_parse_error(node, 'Bad integer attribute: %s' % exp) if self.post_segment_id < 0: raise_parse_error(node, 'Invalid NonNegativeInteger') self.validate_NonNegativeInteger(self.post_segment_id) # validate type NonNegativeInteger value = find_attr_value_('postFractionAlong', node) if value is not None and 'postFractionAlong' not in already_processed: already_processed.add('postFractionAlong') - value = self.gds_parse_float(value, node, 'postFractionAlong') - self.post_fraction_along = value + try: + self.post_fraction_along = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (postFractionAlong): %s' % exp) self.validate_ZeroToOne(self.post_fraction_along) # validate type ZeroToOne value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConnectionOldFormat, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseConnectionOldFormat, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConnectionOldFormat @@ -23443,33 +17185,26 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class Projection(BaseProjection): """Projection (set of synaptic connections) between two populations. Chemical/event based synaptic transmission""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('connections', 'Connection', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connection', 'type': 'Connection'}, None), - MemberSpec_('connection_wds', 'ConnectionWD', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'connectionWD', 'type': 'ConnectionWD'}, None), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('connections', 'Connection', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'Connection', u'name': u'connection', u'minOccurs': u'0'}, None), + MemberSpec_('connection_wds', 'ConnectionWD', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'ConnectionWD', u'name': u'connectionWD', u'minOccurs': u'0'}, None), ] subclass = None superclass = BaseProjection - def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, synapse=None, connections=None, connection_wds=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, presynaptic_population=None, postsynaptic_population=None, synapse=None, connections=None, connection_wds=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Projection"), self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) + super(Projection, self).__init__(neuro_lex_id, id, presynaptic_population, postsynaptic_population, **kwargs_) self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None if connections is None: self.connections = [] else: self.connections = connections - self.connections_nsprefix_ = None if connection_wds is None: self.connection_wds = [] else: self.connection_wds = connection_wds - self.connection_wds_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23481,45 +17216,13 @@ def factory(*args_, **kwargs_): else: return Projection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_connection(self): - return self.connections - def set_connection(self, connections): - self.connections = connections - def add_connection(self, value): - self.connections.append(value) - def insert_connection_at(self, index, value): - self.connections.insert(index, value) - def replace_connection_at(self, index, value): - self.connections[index] = value - def get_connectionWD(self): - return self.connection_wds - def set_connectionWD(self, connection_wds): - self.connection_wds = connection_wds - def add_connectionWD(self, value): - self.connection_wds.append(value) - def insert_connectionWD_at(self, index, value): - self.connection_wds.insert(index, value) - def replace_connectionWD_at(self, index, value): - self.connection_wds[index] = value - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( self.connections or @@ -23537,10 +17240,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Projection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23556,29 +17257,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Projection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Projection') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) + outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Projection', fromsubclass_=False, pretty_print=True): - super(Projection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Projection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for connection_ in self.connections: - namespaceprefix_ = self.connections_nsprefix_ + ':' if (UseCapturedNS_ and self.connections_nsprefix_) else '' connection_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connection', pretty_print=pretty_print) for connectionWD_ in self.connection_wds: - namespaceprefix_ = self.connection_wds_nsprefix_ + ':' if (UseCapturedNS_ and self.connection_wds_nsprefix_) else '' connectionWD_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='connectionWD', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -23587,15 +17282,15 @@ def buildAttributes(self, node, attrs, already_processed): self.synapse = value self.validate_NmlId(self.synapse) # validate type NmlId super(Projection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'connection': obj_ = Connection.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.connections.append(obj_) obj_.original_tagname_ = 'connection' elif nodeName_ == 'connectionWD': obj_ = ConnectionWD.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.connection_wds.append(obj_) obj_.original_tagname_ = 'connectionWD' super(Projection, self).buildChildren(child_, node, nodeName_, True) @@ -23696,21 +17391,16 @@ def __str__(self): class SpikeGeneratorRefPoisson(SpikeGeneratorPoisson): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('minimum_isi', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('minimum_isi', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = SpikeGeneratorPoisson - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, minimum_isi=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, average_rate=None, minimum_isi=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SpikeGeneratorRefPoisson"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) + super(SpikeGeneratorRefPoisson, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, average_rate, **kwargs_) self.minimum_isi = _cast(None, minimum_isi) - self.minimum_isi_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23722,25 +17412,13 @@ def factory(*args_, **kwargs_): else: return SpikeGeneratorRefPoisson(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_minimumISI(self): - return self.minimum_isi - def set_minimumISI(self, minimum_isi): - self.minimum_isi = minimum_isi def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(SpikeGeneratorRefPoisson, self).hasContent_() @@ -23756,10 +17434,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SpikeGeneratorRefPoisson': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23775,19 +17451,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(SpikeGeneratorRefPoisson, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SpikeGeneratorRefPoisson') if self.minimum_isi is not None and 'minimum_isi' not in already_processed: already_processed.add('minimum_isi') - outfile.write(' minimumISI=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.minimum_isi), input_name='minimumISI')), )) + outfile.write(' minimumISI=%s' % (quote_attrib(self.minimum_isi), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SpikeGeneratorRefPoisson', fromsubclass_=False, pretty_print=True): - super(SpikeGeneratorRefPoisson, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SpikeGeneratorRefPoisson, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('minimumISI', node) @@ -23796,28 +17468,23 @@ def buildAttributes(self, node, attrs, already_processed): self.minimum_isi = value self.validate_Nml2Quantity_time(self.minimum_isi) # validate type Nml2Quantity_time super(SpikeGeneratorRefPoisson, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SpikeGeneratorRefPoisson, self).buildChildren(child_, node, nodeName_, True) pass # end class SpikeGeneratorRefPoisson class ConcentrationModel_D(DecayingPoolConcentrationModel): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('type', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('type', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = DecayingPoolConcentrationModel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, type='decayingPoolConcentrationModel', gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, ion=None, resting_conc=None, decay_constant=None, shell_thickness=None, type='decayingPoolConcentrationModel', **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ConcentrationModel_D"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) + super(ConcentrationModel_D, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, ion, resting_conc, decay_constant, shell_thickness, **kwargs_) self.type = _cast(None, type) - self.type_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23829,14 +17496,6 @@ def factory(*args_, **kwargs_): else: return ConcentrationModel_D(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_type(self): - return self.type - def set_type(self, type): - self.type = type def hasContent_(self): if ( super(ConcentrationModel_D, self).hasContent_() @@ -23852,10 +17511,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ConcentrationModel_D': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23869,21 +17526,17 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ConcentrationModel_D'): super(ConcentrationModel_D, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ConcentrationModel_D') - if self.type is not None and 'type' not in already_processed: + if self.type != "decayingPoolConcentrationModel" and 'type' not in already_processed: already_processed.add('type') outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConcentrationModel_D', fromsubclass_=False, pretty_print=True): - super(ConcentrationModel_D, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ConcentrationModel_D, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('type', node) @@ -23891,25 +17544,21 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('type') self.type = value super(ConcentrationModel_D, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ConcentrationModel_D, self).buildChildren(child_, node, nodeName_, True) pass # end class ConcentrationModel_D class ChannelDensityNernstCa2(ChannelDensityNernst): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ChannelDensityNernst - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityNernstCa2"), self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) + super(ChannelDensityNernstCa2, self).__init__(neuro_lex_id, id, ion_channel, cond_density, segment_groups, segments, ion, variable_parameters, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -23921,10 +17570,6 @@ def factory(*args_, **kwargs_): else: return ChannelDensityNernstCa2(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ChannelDensityNernstCa2, self).hasContent_() @@ -23940,10 +17585,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityNernstCa2': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -23958,42 +17601,33 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ChannelDensityNernstCa2'): super(ChannelDensityNernstCa2, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityNernstCa2') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityNernstCa2', fromsubclass_=False, pretty_print=True): - super(ChannelDensityNernstCa2, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ChannelDensityNernstCa2, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ChannelDensityNernstCa2, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ChannelDensityNernstCa2, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityNernstCa2 class ChannelDensityVShift(ChannelDensity): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = ChannelDensity - def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, v_shift=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, ion_channel=None, cond_density=None, erev=None, segment_groups='all', segments=None, ion=None, variable_parameters=None, v_shift=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ChannelDensityVShift"), self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) + super(ChannelDensityVShift, self).__init__(neuro_lex_id, id, ion_channel, cond_density, erev, segment_groups, segments, ion, variable_parameters, **kwargs_) self.v_shift = _cast(None, v_shift) - self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -24005,25 +17639,13 @@ def factory(*args_, **kwargs_): else: return ChannelDensityVShift(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_vShift(self): - return self.v_shift - def set_vShift(self, v_shift): - self.v_shift = v_shift def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( super(ChannelDensityVShift, self).hasContent_() @@ -24039,10 +17661,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ChannelDensityVShift': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -24058,19 +17678,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ChannelDensityVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ChannelDensityVShift') if self.v_shift is not None and 'v_shift' not in already_processed: already_processed.add('v_shift') - outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v_shift), input_name='vShift')), )) + outfile.write(' vShift=%s' % (quote_attrib(self.v_shift), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ChannelDensityVShift', fromsubclass_=False, pretty_print=True): - super(ChannelDensityVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ChannelDensityVShift, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) @@ -24079,41 +17695,33 @@ def buildAttributes(self, node, attrs, already_processed): self.v_shift = value self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage super(ChannelDensityVShift, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ChannelDensityVShift, self).buildChildren(child_, node, nodeName_, True) pass # end class ChannelDensityVShift class Cell(BaseCell): - """Should only be used if morphology element is outside the cell. - This points to the id of the morphology - Should only be used if biophysicalProperties element is outside the cell. - This points to the id of the biophysicalProperties""" - __hash__ = GeneratedsSuper.__hash__ + """Should only be used if morphology element is outside the cell. This + points to the id of the morphology Should only be used if + biophysicalProperties element is outside the cell. This points + to the id of the biophysicalProperties""" member_data_items_ = [ - MemberSpec_('morphology_attr', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('biophysical_properties_attr', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('morphology', 'Morphology', 0, 1, {'minOccurs': '0', 'name': 'morphology', 'type': 'Morphology'}, None), - MemberSpec_('biophysical_properties', 'BiophysicalProperties', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties', 'type': 'BiophysicalProperties'}, None), + MemberSpec_('morphology_attr', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('biophysical_properties_attr', 'xs:string', 0, 1, {'use': 'optional'}), + MemberSpec_('morphology', 'Morphology', 0, 1, {u'type': u'Morphology', u'name': u'morphology', u'minOccurs': u'0'}, None), + MemberSpec_('biophysical_properties', 'BiophysicalProperties', 0, 1, {u'type': u'BiophysicalProperties', u'name': u'biophysicalProperties', u'minOccurs': u'0'}, None), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.morphology_attr = _cast(None, morphology_attr) - self.morphology_attr_nsprefix_ = None self.biophysical_properties_attr = _cast(None, biophysical_properties_attr) - self.biophysical_properties_attr_nsprefix_ = None self.morphology = morphology - self.morphology_nsprefix_ = None self.biophysical_properties = biophysical_properties - self.biophysical_properties_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -24126,39 +17734,6 @@ def factory(*args_, **kwargs_): else: return Cell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_morphology(self): - return self.morphology - def set_morphology(self, morphology): - self.morphology = morphology - def get_biophysicalProperties(self): - return self.biophysical_properties - def set_biophysicalProperties(self, biophysical_properties): - self.biophysical_properties = biophysical_properties - def get_morphology_attr(self): - return self.morphology_attr - def set_morphology_attr(self, morphology_attr): - self.morphology_attr = morphology_attr - def get_biophysical_properties_attr(self): - return self.biophysical_properties_attr - def set_biophysical_properties_attr(self, biophysical_properties_attr): - self.biophysical_properties_attr = biophysical_properties_attr - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ - def validate_NmlId(self, value): - # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - if not self.gds_validate_simple_patterns( - self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] def hasContent_(self): if ( self.morphology is not None or @@ -24176,10 +17751,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Cell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -24202,59 +17775,47 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Cell', fromsubclass_=False, pretty_print=True): - super(Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.morphology is not None: - namespaceprefix_ = self.morphology_nsprefix_ + ':' if (UseCapturedNS_ and self.morphology_nsprefix_) else '' self.morphology.export(outfile, level, namespaceprefix_, namespacedef_='', name_='morphology', pretty_print=pretty_print) if self.biophysical_properties is not None: - namespaceprefix_ = self.biophysical_properties_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties_nsprefix_) else '' self.biophysical_properties.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('morphology', node) if value is not None and 'morphology_attr' not in already_processed: already_processed.add('morphology_attr') self.morphology_attr = value - self.validate_NmlId(self.morphology_attr) # validate type NmlId value = find_attr_value_('biophysicalProperties', node) if value is not None and 'biophysical_properties_attr' not in already_processed: already_processed.add('biophysical_properties_attr') self.biophysical_properties_attr = value - self.validate_NmlId(self.biophysical_properties_attr) # validate type NmlId value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'morphology': obj_ = Morphology.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.morphology = obj_ obj_.original_tagname_ = 'morphology' elif nodeName_ == 'biophysicalProperties': obj_ = BiophysicalProperties.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.biophysical_properties = obj_ obj_.original_tagname_ = 'biophysicalProperties' super(Cell, self).buildChildren(child_, node, nodeName_, True) @@ -24555,81 +18116,56 @@ def summary(self): class PinskyRinzelCA3Cell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('i_soma', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), - MemberSpec_('i_dend', 'Nml2Quantity_currentDensity', 0, 0, {'use': 'required'}), - MemberSpec_('gc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_ls', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_ld', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_na', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_kdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_ca', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_kahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_kc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_nmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('g_ampa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': 'required'}), - MemberSpec_('e_na', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('e_ca', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('e_k', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('e_l', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('qd0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('pp', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('alphac', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('betac', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('cm', 'Nml2Quantity_specificCapacitance', 0, 0, {'use': 'required'}), + MemberSpec_('i_soma', 'Nml2Quantity_currentDensity', 0, 0, {'use': u'required'}), + MemberSpec_('i_dend', 'Nml2Quantity_currentDensity', 0, 0, {'use': u'required'}), + MemberSpec_('gc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_ls', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_ld', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_na', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_kdr', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_ca', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_kahp', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_kc', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_nmda', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('g_ampa', 'Nml2Quantity_conductanceDensity', 0, 0, {'use': u'required'}), + MemberSpec_('e_na', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('e_ca', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('e_k', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('e_l', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('qd0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('pp', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('alphac', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('betac', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('cm', 'Nml2Quantity_specificCapacitance', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, i_soma=None, i_dend=None, gc=None, g_ls=None, g_ld=None, g_na=None, g_kdr=None, g_ca=None, g_kahp=None, g_kc=None, g_nmda=None, g_ampa=None, e_na=None, e_ca=None, e_k=None, e_l=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, i_soma=None, i_dend=None, gc=None, g_ls=None, g_ld=None, g_na=None, g_kdr=None, g_ca=None, g_kahp=None, g_kc=None, g_nmda=None, g_ampa=None, e_na=None, e_ca=None, e_k=None, e_l=None, qd0=None, pp=None, alphac=None, betac=None, cm=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("PinskyRinzelCA3Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(PinskyRinzelCA3Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.i_soma = _cast(None, i_soma) - self.i_soma_nsprefix_ = None self.i_dend = _cast(None, i_dend) - self.i_dend_nsprefix_ = None self.gc = _cast(None, gc) - self.gc_nsprefix_ = None self.g_ls = _cast(None, g_ls) - self.g_ls_nsprefix_ = None self.g_ld = _cast(None, g_ld) - self.g_ld_nsprefix_ = None self.g_na = _cast(None, g_na) - self.g_na_nsprefix_ = None self.g_kdr = _cast(None, g_kdr) - self.g_kdr_nsprefix_ = None self.g_ca = _cast(None, g_ca) - self.g_ca_nsprefix_ = None self.g_kahp = _cast(None, g_kahp) - self.g_kahp_nsprefix_ = None self.g_kc = _cast(None, g_kc) - self.g_kc_nsprefix_ = None self.g_nmda = _cast(None, g_nmda) - self.g_nmda_nsprefix_ = None self.g_ampa = _cast(None, g_ampa) - self.g_ampa_nsprefix_ = None self.e_na = _cast(None, e_na) - self.e_na_nsprefix_ = None self.e_ca = _cast(None, e_ca) - self.e_ca_nsprefix_ = None self.e_k = _cast(None, e_k) - self.e_k_nsprefix_ = None self.e_l = _cast(None, e_l) - self.e_l_nsprefix_ = None self.qd0 = _cast(None, qd0) - self.qd0_nsprefix_ = None self.pp = _cast(None, pp) - self.pp_nsprefix_ = None self.alphac = _cast(None, alphac) - self.alphac_nsprefix_ = None self.betac = _cast(None, betac) - self.betac_nsprefix_ = None self.cm = _cast(None, cm) - self.cm_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -24641,149 +18177,41 @@ def factory(*args_, **kwargs_): else: return PinskyRinzelCA3Cell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_iSoma(self): - return self.i_soma - def set_iSoma(self, i_soma): - self.i_soma = i_soma - def get_iDend(self): - return self.i_dend - def set_iDend(self, i_dend): - self.i_dend = i_dend - def get_gc(self): - return self.gc - def set_gc(self, gc): - self.gc = gc - def get_gLs(self): - return self.g_ls - def set_gLs(self, g_ls): - self.g_ls = g_ls - def get_gLd(self): - return self.g_ld - def set_gLd(self, g_ld): - self.g_ld = g_ld - def get_gNa(self): - return self.g_na - def set_gNa(self, g_na): - self.g_na = g_na - def get_gKdr(self): - return self.g_kdr - def set_gKdr(self, g_kdr): - self.g_kdr = g_kdr - def get_gCa(self): - return self.g_ca - def set_gCa(self, g_ca): - self.g_ca = g_ca - def get_gKahp(self): - return self.g_kahp - def set_gKahp(self, g_kahp): - self.g_kahp = g_kahp - def get_gKC(self): - return self.g_kc - def set_gKC(self, g_kc): - self.g_kc = g_kc - def get_gNmda(self): - return self.g_nmda - def set_gNmda(self, g_nmda): - self.g_nmda = g_nmda - def get_gAmpa(self): - return self.g_ampa - def set_gAmpa(self, g_ampa): - self.g_ampa = g_ampa - def get_eNa(self): - return self.e_na - def set_eNa(self, e_na): - self.e_na = e_na - def get_eCa(self): - return self.e_ca - def set_eCa(self, e_ca): - self.e_ca = e_ca - def get_eK(self): - return self.e_k - def set_eK(self, e_k): - self.e_k = e_k - def get_eL(self): - return self.e_l - def set_eL(self, e_l): - self.e_l = e_l - def get_qd0(self): - return self.qd0 - def set_qd0(self, qd0): - self.qd0 = qd0 - def get_pp(self): - return self.pp - def set_pp(self, pp): - self.pp = pp - def get_alphac(self): - return self.alphac - def set_alphac(self, alphac): - self.alphac = alphac - def get_betac(self): - return self.betac - def set_betac(self, betac): - self.betac = betac - def get_cm(self): - return self.cm - def set_cm(self, cm): - self.cm = cm def validate_Nml2Quantity_currentDensity(self, value): # Validate type Nml2Quantity_currentDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_currentDensity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_currentDensity_patterns_, )) - validate_Nml2Quantity_currentDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A_per_m2|uA_per_cm2|mA_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_currentDensity_patterns_, )) + validate_Nml2Quantity_currentDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A_per_m2|uA_per_cm2|mA_per_cm2)$']] def validate_Nml2Quantity_conductanceDensity(self, value): # Validate type Nml2Quantity_conductanceDensity, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductanceDensity_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) - validate_Nml2Quantity_conductanceDensity_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductanceDensity_patterns_, )) + validate_Nml2Quantity_conductanceDensity_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_m2|mS_per_cm2|S_per_cm2)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def validate_Nml2Quantity_specificCapacitance(self, value): # Validate type Nml2Quantity_specificCapacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_specificCapacitance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_specificCapacitance_patterns_, )) - validate_Nml2Quantity_specificCapacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F_per_m2|uF_per_cm2))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_specificCapacitance_patterns_, )) + validate_Nml2Quantity_specificCapacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F_per_m2|uF_per_cm2)$']] def hasContent_(self): if ( super(PinskyRinzelCA3Cell, self).hasContent_() @@ -24799,10 +18227,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='P eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'PinskyRinzelCA3Cell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -24818,79 +18244,75 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(PinskyRinzelCA3Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='PinskyRinzelCA3Cell') if self.i_soma is not None and 'i_soma' not in already_processed: already_processed.add('i_soma') - outfile.write(' iSoma=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.i_soma), input_name='iSoma')), )) + outfile.write(' iSoma=%s' % (quote_attrib(self.i_soma), )) if self.i_dend is not None and 'i_dend' not in already_processed: already_processed.add('i_dend') - outfile.write(' iDend=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.i_dend), input_name='iDend')), )) + outfile.write(' iDend=%s' % (quote_attrib(self.i_dend), )) if self.gc is not None and 'gc' not in already_processed: already_processed.add('gc') - outfile.write(' gc=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gc), input_name='gc')), )) + outfile.write(' gc=%s' % (quote_attrib(self.gc), )) if self.g_ls is not None and 'g_ls' not in already_processed: already_processed.add('g_ls') - outfile.write(' gLs=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ls), input_name='gLs')), )) + outfile.write(' gLs=%s' % (quote_attrib(self.g_ls), )) if self.g_ld is not None and 'g_ld' not in already_processed: already_processed.add('g_ld') - outfile.write(' gLd=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ld), input_name='gLd')), )) + outfile.write(' gLd=%s' % (quote_attrib(self.g_ld), )) if self.g_na is not None and 'g_na' not in already_processed: already_processed.add('g_na') - outfile.write(' gNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_na), input_name='gNa')), )) + outfile.write(' gNa=%s' % (quote_attrib(self.g_na), )) if self.g_kdr is not None and 'g_kdr' not in already_processed: already_processed.add('g_kdr') - outfile.write(' gKdr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kdr), input_name='gKdr')), )) + outfile.write(' gKdr=%s' % (quote_attrib(self.g_kdr), )) if self.g_ca is not None and 'g_ca' not in already_processed: already_processed.add('g_ca') - outfile.write(' gCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ca), input_name='gCa')), )) + outfile.write(' gCa=%s' % (quote_attrib(self.g_ca), )) if self.g_kahp is not None and 'g_kahp' not in already_processed: already_processed.add('g_kahp') - outfile.write(' gKahp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kahp), input_name='gKahp')), )) + outfile.write(' gKahp=%s' % (quote_attrib(self.g_kahp), )) if self.g_kc is not None and 'g_kc' not in already_processed: already_processed.add('g_kc') - outfile.write(' gKC=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_kc), input_name='gKC')), )) + outfile.write(' gKC=%s' % (quote_attrib(self.g_kc), )) if self.g_nmda is not None and 'g_nmda' not in already_processed: already_processed.add('g_nmda') - outfile.write(' gNmda=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_nmda), input_name='gNmda')), )) + outfile.write(' gNmda=%s' % (quote_attrib(self.g_nmda), )) if self.g_ampa is not None and 'g_ampa' not in already_processed: already_processed.add('g_ampa') - outfile.write(' gAmpa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_ampa), input_name='gAmpa')), )) + outfile.write(' gAmpa=%s' % (quote_attrib(self.g_ampa), )) if self.e_na is not None and 'e_na' not in already_processed: already_processed.add('e_na') - outfile.write(' eNa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_na), input_name='eNa')), )) + outfile.write(' eNa=%s' % (quote_attrib(self.e_na), )) if self.e_ca is not None and 'e_ca' not in already_processed: already_processed.add('e_ca') - outfile.write(' eCa=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_ca), input_name='eCa')), )) + outfile.write(' eCa=%s' % (quote_attrib(self.e_ca), )) if self.e_k is not None and 'e_k' not in already_processed: already_processed.add('e_k') - outfile.write(' eK=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_k), input_name='eK')), )) + outfile.write(' eK=%s' % (quote_attrib(self.e_k), )) if self.e_l is not None and 'e_l' not in already_processed: already_processed.add('e_l') - outfile.write(' eL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.e_l), input_name='eL')), )) + outfile.write(' eL=%s' % (quote_attrib(self.e_l), )) if self.qd0 is not None and 'qd0' not in already_processed: already_processed.add('qd0') - outfile.write(' qd0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.qd0), input_name='qd0')), )) + outfile.write(' qd0=%s' % (quote_attrib(self.qd0), )) if self.pp is not None and 'pp' not in already_processed: already_processed.add('pp') - outfile.write(' pp=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pp), input_name='pp')), )) + outfile.write(' pp=%s' % (quote_attrib(self.pp), )) if self.alphac is not None and 'alphac' not in already_processed: already_processed.add('alphac') - outfile.write(' alphac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.alphac), input_name='alphac')), )) + outfile.write(' alphac=%s' % (quote_attrib(self.alphac), )) if self.betac is not None and 'betac' not in already_processed: already_processed.add('betac') - outfile.write(' betac=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.betac), input_name='betac')), )) + outfile.write(' betac=%s' % (quote_attrib(self.betac), )) if self.cm is not None and 'cm' not in already_processed: already_processed.add('cm') - outfile.write(' cm=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.cm), input_name='cm')), )) + outfile.write(' cm=%s' % (quote_attrib(self.cm), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='PinskyRinzelCA3Cell', fromsubclass_=False, pretty_print=True): - super(PinskyRinzelCA3Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(PinskyRinzelCA3Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('iSoma', node) @@ -24999,43 +18421,33 @@ def buildAttributes(self, node, attrs, already_processed): self.cm = value self.validate_Nml2Quantity_specificCapacitance(self.cm) # validate type Nml2Quantity_specificCapacitance super(PinskyRinzelCA3Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(PinskyRinzelCA3Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class PinskyRinzelCA3Cell class FitzHughNagumo1969Cell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('phi', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('V0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('W0', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('phi', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('V0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('W0', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, a=None, b=None, I=None, phi=None, V0=None, W0=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("FitzHughNagumo1969Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(FitzHughNagumo1969Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.a = _cast(None, a) - self.a_nsprefix_ = None self.b = _cast(None, b) - self.b_nsprefix_ = None self.I = _cast(None, I) - self.I_nsprefix_ = None self.phi = _cast(None, phi) - self.phi_nsprefix_ = None self.V0 = _cast(None, V0) - self.V0_nsprefix_ = None self.W0 = _cast(None, W0) - self.W0_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25047,45 +18459,13 @@ def factory(*args_, **kwargs_): else: return FitzHughNagumo1969Cell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_a(self): - return self.a - def set_a(self, a): - self.a = a - def get_b(self): - return self.b - def set_b(self, b): - self.b = b - def get_I(self): - return self.I - def set_I(self, I): - self.I = I - def get_phi(self): - return self.phi - def set_phi(self, phi): - self.phi = phi - def get_V0(self): - return self.V0 - def set_V0(self, V0): - self.V0 = V0 - def get_W0(self): - return self.W0 - def set_W0(self, W0): - self.W0 = W0 def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(FitzHughNagumo1969Cell, self).hasContent_() @@ -25101,10 +18481,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'FitzHughNagumo1969Cell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25120,34 +18498,30 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FitzHughNagumo1969Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FitzHughNagumo1969Cell') if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) + outfile.write(' a=%s' % (quote_attrib(self.a), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) + outfile.write(' b=%s' % (quote_attrib(self.b), )) if self.I is not None and 'I' not in already_processed: already_processed.add('I') - outfile.write(' I=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.I), input_name='I')), )) + outfile.write(' I=%s' % (quote_attrib(self.I), )) if self.phi is not None and 'phi' not in already_processed: already_processed.add('phi') - outfile.write(' phi=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.phi), input_name='phi')), )) + outfile.write(' phi=%s' % (quote_attrib(self.phi), )) if self.V0 is not None and 'V0' not in already_processed: already_processed.add('V0') - outfile.write(' V0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.V0), input_name='V0')), )) + outfile.write(' V0=%s' % (quote_attrib(self.V0), )) if self.W0 is not None and 'W0' not in already_processed: already_processed.add('W0') - outfile.write(' W0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.W0), input_name='W0')), )) + outfile.write(' W0=%s' % (quote_attrib(self.W0), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FitzHughNagumo1969Cell', fromsubclass_=False, pretty_print=True): - super(FitzHughNagumo1969Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(FitzHughNagumo1969Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('a', node) @@ -25181,28 +18555,23 @@ def buildAttributes(self, node, attrs, already_processed): self.W0 = value self.validate_Nml2Quantity_none(self.W0) # validate type Nml2Quantity_none super(FitzHughNagumo1969Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(FitzHughNagumo1969Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class FitzHughNagumo1969Cell class FitzHughNagumoCell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('I', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, I=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, I=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("FitzHughNagumoCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(FitzHughNagumoCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.I = _cast(None, I) - self.I_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25214,25 +18583,13 @@ def factory(*args_, **kwargs_): else: return FitzHughNagumoCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_I(self): - return self.I - def set_I(self, I): - self.I = I def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(FitzHughNagumoCell, self).hasContent_() @@ -25248,10 +18605,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='F eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'FitzHughNagumoCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25267,19 +18622,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(FitzHughNagumoCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='FitzHughNagumoCell') if self.I is not None and 'I' not in already_processed: already_processed.add('I') - outfile.write(' I=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.I), input_name='I')), )) + outfile.write(' I=%s' % (quote_attrib(self.I), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='FitzHughNagumoCell', fromsubclass_=False, pretty_print=True): - super(FitzHughNagumoCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(FitzHughNagumoCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('I', node) @@ -25288,30 +18639,25 @@ def buildAttributes(self, node, attrs, already_processed): self.I = value self.validate_Nml2Quantity_none(self.I) # validate type Nml2Quantity_none super(FitzHughNagumoCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(FitzHughNagumoCell, self).buildChildren(child_, node, nodeName_, True) pass # end class FitzHughNagumoCell class BaseCellMembPotCap(BaseCell): - """This is to prevent it conflicting with attribute c (lowercase) e.g. in - izhikevichCell2007""" - __hash__ = GeneratedsSuper.__hash__ + """This is to prevent it conflicting with attribute c (lowercase) e.g. + in izhikevichCell2007""" member_data_items_ = [ - MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': 'required'}), + MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseCellMembPotCap"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseCellMembPotCap, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.C = _cast(None, C) - self.C_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -25324,27 +18670,13 @@ def factory(*args_, **kwargs_): else: return BaseCellMembPotCap(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_C(self): - return self.C - def set_C(self, C): - self.C = C - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_capacitance(self, value): # Validate type Nml2Quantity_capacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_capacitance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_capacitance_patterns_, )) - validate_Nml2Quantity_capacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_capacitance_patterns_, )) + validate_Nml2Quantity_capacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF)$']] def hasContent_(self): if ( super(BaseCellMembPotCap, self).hasContent_() @@ -25360,10 +18692,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseCellMembPotCap': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25379,27 +18709,19 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseCellMembPotCap, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseCellMembPotCap') if self.C is not None and 'C' not in already_processed: already_processed.add('C') - outfile.write(' C=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.C), input_name='C')), )) + outfile.write(' C=%s' % (quote_attrib(self.C), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCellMembPotCap', fromsubclass_=False, pretty_print=True): - super(BaseCellMembPotCap, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseCellMembPotCap, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('C', node) @@ -25412,43 +18734,33 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCellMembPotCap, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseCellMembPotCap, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCellMembPotCap class IzhikevichCell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('c', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), - MemberSpec_('d', 'Nml2Quantity_none', 0, 0, {'use': 'required'}), + MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('a', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('b', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('c', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), + MemberSpec_('d', 'Nml2Quantity_none', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, v0=None, thresh=None, a=None, b=None, c=None, d=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IzhikevichCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(IzhikevichCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.v0 = _cast(None, v0) - self.v0_nsprefix_ = None self.thresh = _cast(None, thresh) - self.thresh_nsprefix_ = None self.a = _cast(None, a) - self.a_nsprefix_ = None self.b = _cast(None, b) - self.b_nsprefix_ = None self.c = _cast(None, c) - self.c_nsprefix_ = None self.d = _cast(None, d) - self.d_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -25460,56 +18772,20 @@ def factory(*args_, **kwargs_): else: return IzhikevichCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_v0(self): - return self.v0 - def set_v0(self, v0): - self.v0 = v0 - def get_thresh(self): - return self.thresh - def set_thresh(self, thresh): - self.thresh = thresh - def get_a(self): - return self.a - def set_a(self, a): - self.a = a - def get_b(self): - return self.b - def set_b(self, b): - self.b = b - def get_c(self): - return self.c - def set_c(self, c): - self.c = c - def get_d(self): - return self.d - def set_d(self, d): - self.d = d def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_none(self, value): # Validate type Nml2Quantity_none, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_none_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_none_patterns_, )) - validate_Nml2Quantity_none_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_none_patterns_, )) + validate_Nml2Quantity_none_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?$']] def hasContent_(self): if ( super(IzhikevichCell, self).hasContent_() @@ -25525,10 +18801,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IzhikevichCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25544,34 +18818,30 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IzhikevichCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IzhikevichCell') if self.v0 is not None and 'v0' not in already_processed: already_processed.add('v0') - outfile.write(' v0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v0), input_name='v0')), )) + outfile.write(' v0=%s' % (quote_attrib(self.v0), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) + outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) + outfile.write(' a=%s' % (quote_attrib(self.a), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) + outfile.write(' b=%s' % (quote_attrib(self.b), )) if self.c is not None and 'c' not in already_processed: already_processed.add('c') - outfile.write(' c=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.c), input_name='c')), )) + outfile.write(' c=%s' % (quote_attrib(self.c), )) if self.d is not None and 'd' not in already_processed: already_processed.add('d') - outfile.write(' d=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.d), input_name='d')), )) + outfile.write(' d=%s' % (quote_attrib(self.d), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IzhikevichCell', fromsubclass_=False, pretty_print=True): - super(IzhikevichCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IzhikevichCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v0', node) @@ -25605,40 +18875,31 @@ def buildAttributes(self, node, attrs, already_processed): self.d = value self.validate_Nml2Quantity_none(self.d) # validate type Nml2Quantity_none super(IzhikevichCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IzhikevichCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IzhikevichCell class IafCell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': 'required'}), - MemberSpec_('leak_conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('C', 'Nml2Quantity_capacitance', 0, 0, {'use': u'required'}), + MemberSpec_('leak_conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IafCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(IafCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.leak_reversal = _cast(None, leak_reversal) - self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) - self.thresh_nsprefix_ = None self.reset = _cast(None, reset) - self.reset_nsprefix_ = None self.C = _cast(None, C) - self.C_nsprefix_ = None self.leak_conductance = _cast(None, leak_conductance) - self.leak_conductance_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -25651,65 +18912,27 @@ def factory(*args_, **kwargs_): else: return IafCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_leakReversal(self): - return self.leak_reversal - def set_leakReversal(self, leak_reversal): - self.leak_reversal = leak_reversal - def get_thresh(self): - return self.thresh - def set_thresh(self, thresh): - self.thresh = thresh - def get_reset(self): - return self.reset - def set_reset(self, reset): - self.reset = reset - def get_C(self): - return self.C - def set_C(self, C): - self.C = C - def get_leakConductance(self): - return self.leak_conductance - def set_leakConductance(self, leak_conductance): - self.leak_conductance = leak_conductance - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_capacitance(self, value): # Validate type Nml2Quantity_capacitance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_capacitance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_capacitance_patterns_, )) - validate_Nml2Quantity_capacitance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_capacitance_patterns_, )) + validate_Nml2Quantity_capacitance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(F|uF|nF|pF)$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def hasContent_(self): if ( super(IafCell, self).hasContent_() @@ -25725,10 +18948,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IafCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25744,39 +18965,31 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafCell') if self.leak_reversal is not None and 'leak_reversal' not in already_processed: already_processed.add('leak_reversal') - outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_reversal), input_name='leakReversal')), )) + outfile.write(' leakReversal=%s' % (quote_attrib(self.leak_reversal), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) + outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) + outfile.write(' reset=%s' % (quote_attrib(self.reset), )) if self.C is not None and 'C' not in already_processed: already_processed.add('C') - outfile.write(' C=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.C), input_name='C')), )) + outfile.write(' C=%s' % (quote_attrib(self.C), )) if self.leak_conductance is not None and 'leak_conductance' not in already_processed: already_processed.add('leak_conductance') - outfile.write(' leakConductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_conductance), input_name='leakConductance')), )) + outfile.write(' leakConductance=%s' % (quote_attrib(self.leak_conductance), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafCell', fromsubclass_=False, pretty_print=True): - super(IafCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IafCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) @@ -25809,37 +19022,29 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IafCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IafCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafCell class IafTauCell(BaseCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('leak_reversal', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IafTauCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(IafTauCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.leak_reversal = _cast(None, leak_reversal) - self.leak_reversal_nsprefix_ = None self.thresh = _cast(None, thresh) - self.thresh_nsprefix_ = None self.reset = _cast(None, reset) - self.reset_nsprefix_ = None self.tau = _cast(None, tau) - self.tau_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -25852,50 +19057,20 @@ def factory(*args_, **kwargs_): else: return IafTauCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_leakReversal(self): - return self.leak_reversal - def set_leakReversal(self, leak_reversal): - self.leak_reversal = leak_reversal - def get_thresh(self): - return self.thresh - def set_thresh(self, thresh): - self.thresh = thresh - def get_reset(self): - return self.reset - def set_reset(self, reset): - self.reset = reset - def get_tau(self): - return self.tau - def set_tau(self, tau): - self.tau = tau - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(IafTauCell, self).hasContent_() @@ -25911,10 +19086,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IafTauCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -25930,36 +19103,28 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafTauCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafTauCell') if self.leak_reversal is not None and 'leak_reversal' not in already_processed: already_processed.add('leak_reversal') - outfile.write(' leakReversal=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.leak_reversal), input_name='leakReversal')), )) + outfile.write(' leakReversal=%s' % (quote_attrib(self.leak_reversal), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) + outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) + outfile.write(' reset=%s' % (quote_attrib(self.reset), )) if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) + outfile.write(' tau=%s' % (quote_attrib(self.tau), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafTauCell', fromsubclass_=False, pretty_print=True): - super(IafTauCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IafTauCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('leakReversal', node) @@ -25987,7 +19152,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IafTauCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IafTauCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafTauCell @@ -25996,33 +19161,24 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GradedSynapse(BaseSynapse): """Based on synapse in Methods of http://www.nature.com/neuro/journal/v7/n12/abs/nn1352.html.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('delta', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('Vth', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('k', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('delta', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('Vth', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('k', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, delta=None, Vth=None, k=None, erev=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GradedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(GradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) - self.conductance_nsprefix_ = None self.delta = _cast(None, delta) - self.delta_nsprefix_ = None self.Vth = _cast(None, Vth) - self.Vth_nsprefix_ = None self.k = _cast(None, k) - self.k_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26034,63 +19190,27 @@ def factory(*args_, **kwargs_): else: return GradedSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_conductance(self): - return self.conductance - def set_conductance(self, conductance): - self.conductance = conductance - def get_delta(self): - return self.delta - def set_delta(self, delta): - self.delta = delta - def get_Vth(self): - return self.Vth - def set_Vth(self, Vth): - self.Vth = Vth - def get_k(self): - return self.k - def set_k(self, k): - self.k = k - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def hasContent_(self): if ( super(GradedSynapse, self).hasContent_() @@ -26106,10 +19226,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GradedSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26125,31 +19243,27 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GradedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GradedSynapse') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) + outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) if self.delta is not None and 'delta' not in already_processed: already_processed.add('delta') - outfile.write(' delta=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delta), input_name='delta')), )) + outfile.write(' delta=%s' % (quote_attrib(self.delta), )) if self.Vth is not None and 'Vth' not in already_processed: already_processed.add('Vth') - outfile.write(' Vth=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Vth), input_name='Vth')), )) + outfile.write(' Vth=%s' % (quote_attrib(self.Vth), )) if self.k is not None and 'k' not in already_processed: already_processed.add('k') - outfile.write(' k=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.k), input_name='k')), )) + outfile.write(' k=%s' % (quote_attrib(self.k), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GradedSynapse', fromsubclass_=False, pretty_print=True): - super(GradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(GradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -26178,7 +19292,7 @@ def buildAttributes(self, node, attrs, already_processed): self.erev = value self.validate_Nml2Quantity_voltage(self.erev) # validate type Nml2Quantity_voltage super(GradedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(GradedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class GradedSynapse @@ -26186,21 +19300,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class LinearGradedSynapse(BaseSynapse): """Behaves just like a one way gap junction.""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("LinearGradedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(LinearGradedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) - self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26212,25 +19321,13 @@ def factory(*args_, **kwargs_): else: return LinearGradedSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_conductance(self): - return self.conductance - def set_conductance(self, conductance): - self.conductance = conductance def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def hasContent_(self): if ( super(LinearGradedSynapse, self).hasContent_() @@ -26246,10 +19343,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='L eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'LinearGradedSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26265,19 +19360,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(LinearGradedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='LinearGradedSynapse') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) + outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='LinearGradedSynapse', fromsubclass_=False, pretty_print=True): - super(LinearGradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(LinearGradedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -26286,27 +19377,23 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(LinearGradedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(LinearGradedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class LinearGradedSynapse class SilentSynapse(BaseSynapse): - """Dummy synapse which emits no current. Used as presynaptic endpoint for - analog synaptic connection (continuousConnection).""" - __hash__ = GeneratedsSuper.__hash__ + """Dummy synapse which emits no current. Used as presynaptic endpoint + for analog synaptic connection (continuousConnection).""" member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("SilentSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(SilentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26318,10 +19405,6 @@ def factory(*args_, **kwargs_): else: return SilentSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(SilentSynapse, self).hasContent_() @@ -26337,10 +19420,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'SilentSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26355,21 +19436,17 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='S def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='SilentSynapse'): super(SilentSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='SilentSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='SilentSynapse', fromsubclass_=False, pretty_print=True): - super(SilentSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(SilentSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(SilentSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(SilentSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class SilentSynapse @@ -26377,21 +19454,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class GapJunction(BaseSynapse): """Gap junction/single electrical connection""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, conductance=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("GapJunction"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(GapJunction, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.conductance = _cast(None, conductance) - self.conductance_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -26403,25 +19475,13 @@ def factory(*args_, **kwargs_): else: return GapJunction(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_conductance(self): - return self.conductance - def set_conductance(self, conductance): - self.conductance = conductance def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def hasContent_(self): if ( super(GapJunction, self).hasContent_() @@ -26437,10 +19497,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='G eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'GapJunction': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26456,19 +19514,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(GapJunction, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='GapJunction') if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) + outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='GapJunction', fromsubclass_=False, pretty_print=True): - super(GapJunction, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(GapJunction, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('conductance', node) @@ -26477,25 +19531,21 @@ def buildAttributes(self, node, attrs, already_processed): self.conductance = value self.validate_Nml2Quantity_conductance(self.conductance) # validate type Nml2Quantity_conductance super(GapJunction, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(GapJunction, self).buildChildren(child_, node, nodeName_, True) pass # end class GapJunction class BaseCurrentBasedSynapse(BaseSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseCurrentBasedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseCurrentBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26508,12 +19558,6 @@ def factory(*args_, **kwargs_): else: return BaseCurrentBasedSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseCurrentBasedSynapse, self).hasContent_() @@ -26529,10 +19573,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseCurrentBasedSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26549,23 +19591,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseCurrentBasedSynapse', fromsubclass_=False, pretty_print=True): - super(BaseCurrentBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseCurrentBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -26573,25 +19607,21 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseCurrentBasedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseCurrentBasedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseCurrentBasedSynapse class BaseVoltageDepSynapse(BaseSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BaseSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseVoltageDepSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseVoltageDepSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26604,12 +19634,6 @@ def factory(*args_, **kwargs_): else: return BaseVoltageDepSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(BaseVoltageDepSynapse, self).hasContent_() @@ -26625,10 +19649,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseVoltageDepSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26645,23 +19667,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseVoltageDepSynapse', fromsubclass_=False, pretty_print=True): - super(BaseVoltageDepSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseVoltageDepSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -26669,86 +19683,71 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseVoltageDepSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseVoltageDepSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseVoltageDepSynapse class IonChannel(IonChannelScalable): - """Note ionChannel and ionChannelHH are currently functionally identical. - This is needed since many existing examples use ionChannel, some use - ionChannelHH. - NeuroML v2beta4 should remove one of these, probably ionChannelHH.""" - __hash__ = GeneratedsSuper.__hash__ + """Note ionChannel and ionChannelHH are currently functionally + identical. This is needed since many existing examples use + ionChannel, some use ionChannelHH. NeuroML v2beta4 should remove + one of these, probably ionChannelHH.""" member_data_items_ = [ - MemberSpec_('species', 'NmlId', 0, 1, {'use': 'optional'}), - MemberSpec_('type', 'channelTypes', 0, 1, {'use': 'optional'}), - MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': 'optional'}), - MemberSpec_('gates', 'GateHHUndetermined', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gate', 'type': 'GateHHUndetermined'}, 1), - MemberSpec_('gate_hh_rates', 'GateHHRates', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHrates', 'type': 'GateHHRates'}, 1), - MemberSpec_('gate_h_hrates_taus', 'GateHHRatesTau', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTau', 'type': 'GateHHRatesTau'}, 1), - MemberSpec_('gate_hh_tau_infs', 'GateHHTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHtauInf', 'type': 'GateHHTauInf'}, 1), - MemberSpec_('gate_h_hrates_infs', 'GateHHRatesInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesInf', 'type': 'GateHHRatesInf'}, 1), - MemberSpec_('gate_h_hrates_tau_infs', 'GateHHRatesTauInf', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHratesTauInf', 'type': 'GateHHRatesTauInf'}, 1), - MemberSpec_('gate_hh_instantaneouses', 'GateHHInstantaneous', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateHHInstantaneous', 'type': 'GateHHInstantaneous'}, 1), - MemberSpec_('gate_fractionals', 'GateFractional', 1, 1, {'maxOccurs': 'unbounded', 'minOccurs': '0', 'name': 'gateFractional', 'type': 'GateFractional'}, 1), + MemberSpec_('species', 'NmlId', 0, 1, {'use': u'optional'}), + MemberSpec_('type', 'channelTypes', 0, 1, {'use': u'optional'}), + MemberSpec_('conductance', 'Nml2Quantity_conductance', 0, 1, {'use': u'optional'}), + MemberSpec_('gates', 'GateHHUndetermined', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHUndetermined', u'name': u'gate', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_hh_rates', 'GateHHRates', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRates', u'name': u'gateHHrates', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_h_hrates_taus', 'GateHHRatesTau', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesTau', u'name': u'gateHHratesTau', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_hh_tau_infs', 'GateHHTauInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHTauInf', u'name': u'gateHHtauInf', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_h_hrates_infs', 'GateHHRatesInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesInf', u'name': u'gateHHratesInf', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_h_hrates_tau_infs', 'GateHHRatesTauInf', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHRatesTauInf', u'name': u'gateHHratesTauInf', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_hh_instantaneouses', 'GateHHInstantaneous', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateHHInstantaneous', u'name': u'gateHHInstantaneous', u'minOccurs': u'0'}, 1), + MemberSpec_('gate_fractionals', 'GateFractional', 1, 1, {u'maxOccurs': u'unbounded', u'type': u'GateFractional', u'name': u'gateFractional', u'minOccurs': u'0'}, 1), ] subclass = None superclass = IonChannelScalable - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IonChannel"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) + super(IonChannel, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, extensiontype_, **kwargs_) self.species = _cast(None, species) - self.species_nsprefix_ = None self.type = _cast(None, type) - self.type_nsprefix_ = None self.conductance = _cast(None, conductance) - self.conductance_nsprefix_ = None if gates is None: self.gates = [] else: self.gates = gates - self.gates_nsprefix_ = None if gate_hh_rates is None: self.gate_hh_rates = [] else: self.gate_hh_rates = gate_hh_rates - self.gate_hh_rates_nsprefix_ = None if gate_h_hrates_taus is None: self.gate_h_hrates_taus = [] else: self.gate_h_hrates_taus = gate_h_hrates_taus - self.gate_h_hrates_taus_nsprefix_ = None if gate_hh_tau_infs is None: self.gate_hh_tau_infs = [] else: self.gate_hh_tau_infs = gate_hh_tau_infs - self.gate_hh_tau_infs_nsprefix_ = None if gate_h_hrates_infs is None: self.gate_h_hrates_infs = [] else: self.gate_h_hrates_infs = gate_h_hrates_infs - self.gate_h_hrates_infs_nsprefix_ = None if gate_h_hrates_tau_infs is None: self.gate_h_hrates_tau_infs = [] else: self.gate_h_hrates_tau_infs = gate_h_hrates_tau_infs - self.gate_h_hrates_tau_infs_nsprefix_ = None if gate_hh_instantaneouses is None: self.gate_hh_instantaneouses = [] else: self.gate_hh_instantaneouses = gate_hh_instantaneouses - self.gate_hh_instantaneouses_nsprefix_ = None if gate_fractionals is None: self.gate_fractionals = [] else: self.gate_fractionals = gate_fractionals - self.gate_fractionals_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -26761,139 +19760,32 @@ def factory(*args_, **kwargs_): else: return IonChannel(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_gate(self): - return self.gates - def set_gate(self, gates): - self.gates = gates - def add_gate(self, value): - self.gates.append(value) - def insert_gate_at(self, index, value): - self.gates.insert(index, value) - def replace_gate_at(self, index, value): - self.gates[index] = value - def get_gateHHrates(self): - return self.gate_hh_rates - def set_gateHHrates(self, gate_hh_rates): - self.gate_hh_rates = gate_hh_rates - def add_gateHHrates(self, value): - self.gate_hh_rates.append(value) - def insert_gateHHrates_at(self, index, value): - self.gate_hh_rates.insert(index, value) - def replace_gateHHrates_at(self, index, value): - self.gate_hh_rates[index] = value - def get_gateHHratesTau(self): - return self.gate_h_hrates_taus - def set_gateHHratesTau(self, gate_h_hrates_taus): - self.gate_h_hrates_taus = gate_h_hrates_taus - def add_gateHHratesTau(self, value): - self.gate_h_hrates_taus.append(value) - def insert_gateHHratesTau_at(self, index, value): - self.gate_h_hrates_taus.insert(index, value) - def replace_gateHHratesTau_at(self, index, value): - self.gate_h_hrates_taus[index] = value - def get_gateHHtauInf(self): - return self.gate_hh_tau_infs - def set_gateHHtauInf(self, gate_hh_tau_infs): - self.gate_hh_tau_infs = gate_hh_tau_infs - def add_gateHHtauInf(self, value): - self.gate_hh_tau_infs.append(value) - def insert_gateHHtauInf_at(self, index, value): - self.gate_hh_tau_infs.insert(index, value) - def replace_gateHHtauInf_at(self, index, value): - self.gate_hh_tau_infs[index] = value - def get_gateHHratesInf(self): - return self.gate_h_hrates_infs - def set_gateHHratesInf(self, gate_h_hrates_infs): - self.gate_h_hrates_infs = gate_h_hrates_infs - def add_gateHHratesInf(self, value): - self.gate_h_hrates_infs.append(value) - def insert_gateHHratesInf_at(self, index, value): - self.gate_h_hrates_infs.insert(index, value) - def replace_gateHHratesInf_at(self, index, value): - self.gate_h_hrates_infs[index] = value - def get_gateHHratesTauInf(self): - return self.gate_h_hrates_tau_infs - def set_gateHHratesTauInf(self, gate_h_hrates_tau_infs): - self.gate_h_hrates_tau_infs = gate_h_hrates_tau_infs - def add_gateHHratesTauInf(self, value): - self.gate_h_hrates_tau_infs.append(value) - def insert_gateHHratesTauInf_at(self, index, value): - self.gate_h_hrates_tau_infs.insert(index, value) - def replace_gateHHratesTauInf_at(self, index, value): - self.gate_h_hrates_tau_infs[index] = value - def get_gateHHInstantaneous(self): - return self.gate_hh_instantaneouses - def set_gateHHInstantaneous(self, gate_hh_instantaneouses): - self.gate_hh_instantaneouses = gate_hh_instantaneouses - def add_gateHHInstantaneous(self, value): - self.gate_hh_instantaneouses.append(value) - def insert_gateHHInstantaneous_at(self, index, value): - self.gate_hh_instantaneouses.insert(index, value) - def replace_gateHHInstantaneous_at(self, index, value): - self.gate_hh_instantaneouses[index] = value - def get_gateFractional(self): - return self.gate_fractionals - def set_gateFractional(self, gate_fractionals): - self.gate_fractionals = gate_fractionals - def add_gateFractional(self, value): - self.gate_fractionals.append(value) - def insert_gateFractional_at(self, index, value): - self.gate_fractionals.insert(index, value) - def replace_gateFractional_at(self, index, value): - self.gate_fractionals[index] = value - def get_species(self): - return self.species - def set_species(self, species): - self.species = species - def get_type(self): - return self.type - def set_type(self, type): - self.type = type - def get_conductance(self): - return self.conductance - def set_conductance(self, conductance): - self.conductance = conductance - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def validate_channelTypes(self, value): # Validate type channelTypes, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False - value = value + if value is not None and Validate_simpletypes_: + value = str(value) enumerations = ['ionChannelPassive', 'ionChannelHH'] - if value not in enumerations: - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on channelTypes' % {"value" : encode_str_2_3(value), "lineno": lineno} ) - result = False + enumeration_respectee = False + for enum in enumerations: + if value == enum: + enumeration_respectee = True + break + if not enumeration_respectee: + warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on channelTypes' % {"value" : value.encode("utf-8")} ) def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def hasContent_(self): if ( self.gates or @@ -26917,10 +19809,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IonChannel': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -26936,61 +19826,45 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IonChannel, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannel') if self.species is not None and 'species' not in already_processed: already_processed.add('species') - outfile.write(' species=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.species), input_name='species')), )) + outfile.write(' species=%s' % (quote_attrib(self.species), )) if self.type is not None and 'type' not in already_processed: already_processed.add('type') - outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type), input_name='type')), )) + outfile.write(' type=%s' % (quote_attrib(self.type), )) if self.conductance is not None and 'conductance' not in already_processed: already_processed.add('conductance') - outfile.write(' conductance=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.conductance), input_name='conductance')), )) + outfile.write(' conductance=%s' % (quote_attrib(self.conductance), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannel', fromsubclass_=False, pretty_print=True): - super(IonChannel, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(IonChannel, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' for gate_ in self.gates: - namespaceprefix_ = self.gates_nsprefix_ + ':' if (UseCapturedNS_ and self.gates_nsprefix_) else '' gate_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gate', pretty_print=pretty_print) for gateHHrates_ in self.gate_hh_rates: - namespaceprefix_ = self.gate_hh_rates_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_rates_nsprefix_) else '' gateHHrates_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHrates', pretty_print=pretty_print) for gateHHratesTau_ in self.gate_h_hrates_taus: - namespaceprefix_ = self.gate_h_hrates_taus_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_taus_nsprefix_) else '' gateHHratesTau_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTau', pretty_print=pretty_print) for gateHHtauInf_ in self.gate_hh_tau_infs: - namespaceprefix_ = self.gate_hh_tau_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_tau_infs_nsprefix_) else '' gateHHtauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHtauInf', pretty_print=pretty_print) for gateHHratesInf_ in self.gate_h_hrates_infs: - namespaceprefix_ = self.gate_h_hrates_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_infs_nsprefix_) else '' gateHHratesInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesInf', pretty_print=pretty_print) for gateHHratesTauInf_ in self.gate_h_hrates_tau_infs: - namespaceprefix_ = self.gate_h_hrates_tau_infs_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_h_hrates_tau_infs_nsprefix_) else '' gateHHratesTauInf_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHratesTauInf', pretty_print=pretty_print) for gateHHInstantaneous_ in self.gate_hh_instantaneouses: - namespaceprefix_ = self.gate_hh_instantaneouses_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_hh_instantaneouses_nsprefix_) else '' gateHHInstantaneous_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateHHInstantaneous', pretty_print=pretty_print) for gateFractional_ in self.gate_fractionals: - namespaceprefix_ = self.gate_fractionals_nsprefix_ + ':' if (UseCapturedNS_ and self.gate_fractionals_nsprefix_) else '' gateFractional_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='gateFractional', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('species', node) @@ -27013,45 +19887,45 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(IonChannel, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'gate': obj_ = GateHHUndetermined.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gates.append(obj_) obj_.original_tagname_ = 'gate' elif nodeName_ == 'gateHHrates': obj_ = GateHHRates.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_hh_rates.append(obj_) obj_.original_tagname_ = 'gateHHrates' elif nodeName_ == 'gateHHratesTau': obj_ = GateHHRatesTau.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_h_hrates_taus.append(obj_) obj_.original_tagname_ = 'gateHHratesTau' elif nodeName_ == 'gateHHtauInf': obj_ = GateHHTauInf.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_hh_tau_infs.append(obj_) obj_.original_tagname_ = 'gateHHtauInf' elif nodeName_ == 'gateHHratesInf': obj_ = GateHHRatesInf.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_h_hrates_infs.append(obj_) obj_.original_tagname_ = 'gateHHratesInf' elif nodeName_ == 'gateHHratesTauInf': obj_ = GateHHRatesTauInf.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_h_hrates_tau_infs.append(obj_) obj_.original_tagname_ = 'gateHHratesTauInf' elif nodeName_ == 'gateHHInstantaneous': obj_ = GateHHInstantaneous.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_hh_instantaneouses.append(obj_) obj_.original_tagname_ = 'gateHHInstantaneous' elif nodeName_ == 'gateFractional': obj_ = GateFractional.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.gate_fractionals.append(obj_) obj_.original_tagname_ = 'gateFractional' super(IonChannel, self).buildChildren(child_, node, nodeName_, True) @@ -27059,18 +19933,14 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class AlphaCurrSynapse(BasePynnSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("AlphaCurrSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(AlphaCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27082,10 +19952,6 @@ def factory(*args_, **kwargs_): else: return AlphaCurrSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(AlphaCurrSynapse, self).hasContent_() @@ -27101,10 +19967,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'AlphaCurrSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27119,39 +19983,31 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AlphaCurrSynapse'): super(AlphaCurrSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaCurrSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCurrSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(AlphaCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(AlphaCurrSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(AlphaCurrSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCurrSynapse class ExpCurrSynapse(BasePynnSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExpCurrSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(ExpCurrSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27163,10 +20019,6 @@ def factory(*args_, **kwargs_): else: return ExpCurrSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(ExpCurrSynapse, self).hasContent_() @@ -27182,10 +20034,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExpCurrSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27200,42 +20050,33 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='ExpCurrSynapse'): super(ExpCurrSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpCurrSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpCurrSynapse', fromsubclass_=False, pretty_print=True): - super(ExpCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ExpCurrSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(ExpCurrSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ExpCurrSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpCurrSynapse class AlphaCondSynapse(BasePynnSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("AlphaCondSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(AlphaCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) - self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27247,14 +20088,6 @@ def factory(*args_, **kwargs_): else: return AlphaCondSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_e_rev(self): - return self.e_rev - def set_e_rev(self, e_rev): - self.e_rev = e_rev def hasContent_(self): if ( super(AlphaCondSynapse, self).hasContent_() @@ -27270,10 +20103,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'AlphaCondSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27291,47 +20122,40 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('e_rev') outfile.write(' e_rev="%s"' % self.gds_format_float(self.e_rev, input_name='e_rev')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCondSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(AlphaCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev', node) if value is not None and 'e_rev' not in already_processed: already_processed.add('e_rev') - value = self.gds_parse_float(value, node, 'e_rev') - self.e_rev = value + try: + self.e_rev = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev): %s' % exp) super(AlphaCondSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(AlphaCondSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCondSynapse class ExpCondSynapse(BasePynnSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = BasePynnSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau_syn=None, e_rev=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExpCondSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) + super(ExpCondSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, tau_syn, **kwargs_) self.e_rev = _cast(float, e_rev) - self.e_rev_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27343,14 +20167,6 @@ def factory(*args_, **kwargs_): else: return ExpCondSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_e_rev(self): - return self.e_rev - def set_e_rev(self, e_rev): - self.e_rev = e_rev def hasContent_(self): if ( super(ExpCondSynapse, self).hasContent_() @@ -27366,10 +20182,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExpCondSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27387,71 +20201,56 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('e_rev') outfile.write(' e_rev="%s"' % self.gds_format_float(self.e_rev, input_name='e_rev')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpCondSynapse', fromsubclass_=False, pretty_print=True): - super(ExpCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ExpCondSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev', node) if value is not None and 'e_rev' not in already_processed: already_processed.add('e_rev') - value = self.gds_parse_float(value, node, 'e_rev') - self.e_rev = value + try: + self.e_rev = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev): %s' % exp) super(ExpCondSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ExpCondSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpCondSynapse class HH_cond_exp(basePyNNCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v_offset', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_K', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_Na', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_leak', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('g_leak', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('gbar_K', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('gbar_Na', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('v_offset', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_K', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_Na', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_leak', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('g_leak', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('gbar_K', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('gbar_Na', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = basePyNNCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, v_offset=None, e_rev_E=None, e_rev_I=None, e_rev_K=None, e_rev_Na=None, e_rev_leak=None, g_leak=None, gbar_K=None, gbar_Na=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("HH_cond_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) + super(HH_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, **kwargs_) self.v_offset = _cast(float, v_offset) - self.v_offset_nsprefix_ = None self.e_rev_E = _cast(float, e_rev_E) - self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) - self.e_rev_I_nsprefix_ = None self.e_rev_K = _cast(float, e_rev_K) - self.e_rev_K_nsprefix_ = None self.e_rev_Na = _cast(float, e_rev_Na) - self.e_rev_Na_nsprefix_ = None self.e_rev_leak = _cast(float, e_rev_leak) - self.e_rev_leak_nsprefix_ = None self.g_leak = _cast(float, g_leak) - self.g_leak_nsprefix_ = None self.gbar_K = _cast(float, gbar_K) - self.gbar_K_nsprefix_ = None self.gbar_Na = _cast(float, gbar_Na) - self.gbar_Na_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -27463,46 +20262,6 @@ def factory(*args_, **kwargs_): else: return HH_cond_exp(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_v_offset(self): - return self.v_offset - def set_v_offset(self, v_offset): - self.v_offset = v_offset - def get_e_rev_E(self): - return self.e_rev_E - def set_e_rev_E(self, e_rev_E): - self.e_rev_E = e_rev_E - def get_e_rev_I(self): - return self.e_rev_I - def set_e_rev_I(self, e_rev_I): - self.e_rev_I = e_rev_I - def get_e_rev_K(self): - return self.e_rev_K - def set_e_rev_K(self, e_rev_K): - self.e_rev_K = e_rev_K - def get_e_rev_Na(self): - return self.e_rev_Na - def set_e_rev_Na(self, e_rev_Na): - self.e_rev_Na = e_rev_Na - def get_e_rev_leak(self): - return self.e_rev_leak - def set_e_rev_leak(self, e_rev_leak): - self.e_rev_leak = e_rev_leak - def get_g_leak(self): - return self.g_leak - def set_g_leak(self, g_leak): - self.g_leak = g_leak - def get_gbar_K(self): - return self.gbar_K - def set_gbar_K(self, gbar_K): - self.gbar_K = gbar_K - def get_gbar_Na(self): - return self.gbar_Na - def set_gbar_Na(self, gbar_Na): - self.gbar_Na = gbar_Na def hasContent_(self): if ( super(HH_cond_exp, self).hasContent_() @@ -27518,10 +20277,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='H eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'HH_cond_exp': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27563,99 +20320,104 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('gbar_Na') outfile.write(' gbar_Na="%s"' % self.gds_format_float(self.gbar_Na, input_name='gbar_Na')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='HH_cond_exp', fromsubclass_=False, pretty_print=True): - super(HH_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(HH_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v_offset', node) if value is not None and 'v_offset' not in already_processed: already_processed.add('v_offset') - value = self.gds_parse_float(value, node, 'v_offset') - self.v_offset = value + try: + self.v_offset = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_offset): %s' % exp) value = find_attr_value_('e_rev_E', node) if value is not None and 'e_rev_E' not in already_processed: already_processed.add('e_rev_E') - value = self.gds_parse_float(value, node, 'e_rev_E') - self.e_rev_E = value + try: + self.e_rev_E = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_E): %s' % exp) value = find_attr_value_('e_rev_I', node) if value is not None and 'e_rev_I' not in already_processed: already_processed.add('e_rev_I') - value = self.gds_parse_float(value, node, 'e_rev_I') - self.e_rev_I = value + try: + self.e_rev_I = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_I): %s' % exp) value = find_attr_value_('e_rev_K', node) if value is not None and 'e_rev_K' not in already_processed: already_processed.add('e_rev_K') - value = self.gds_parse_float(value, node, 'e_rev_K') - self.e_rev_K = value + try: + self.e_rev_K = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_K): %s' % exp) value = find_attr_value_('e_rev_Na', node) if value is not None and 'e_rev_Na' not in already_processed: already_processed.add('e_rev_Na') - value = self.gds_parse_float(value, node, 'e_rev_Na') - self.e_rev_Na = value + try: + self.e_rev_Na = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_Na): %s' % exp) value = find_attr_value_('e_rev_leak', node) if value is not None and 'e_rev_leak' not in already_processed: already_processed.add('e_rev_leak') - value = self.gds_parse_float(value, node, 'e_rev_leak') - self.e_rev_leak = value + try: + self.e_rev_leak = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_leak): %s' % exp) value = find_attr_value_('g_leak', node) if value is not None and 'g_leak' not in already_processed: already_processed.add('g_leak') - value = self.gds_parse_float(value, node, 'g_leak') - self.g_leak = value + try: + self.g_leak = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (g_leak): %s' % exp) value = find_attr_value_('gbar_K', node) if value is not None and 'gbar_K' not in already_processed: already_processed.add('gbar_K') - value = self.gds_parse_float(value, node, 'gbar_K') - self.gbar_K = value + try: + self.gbar_K = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (gbar_K): %s' % exp) value = find_attr_value_('gbar_Na', node) if value is not None and 'gbar_Na' not in already_processed: already_processed.add('gbar_Na') - value = self.gds_parse_float(value, node, 'gbar_Na') - self.gbar_Na = value + try: + self.gbar_Na = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (gbar_Na): %s' % exp) super(HH_cond_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(HH_cond_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class HH_cond_exp class basePyNNIaFCell(basePyNNCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_m', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('tau_refrac', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('v_reset', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('v_rest', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('v_thresh', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('tau_m', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_refrac', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_reset', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_rest', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_thresh', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = basePyNNCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("basePyNNIaFCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) + super(basePyNNIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, extensiontype_, **kwargs_) self.tau_m = _cast(float, tau_m) - self.tau_m_nsprefix_ = None self.tau_refrac = _cast(float, tau_refrac) - self.tau_refrac_nsprefix_ = None self.v_reset = _cast(float, v_reset) - self.v_reset_nsprefix_ = None self.v_rest = _cast(float, v_rest) - self.v_rest_nsprefix_ = None self.v_thresh = _cast(float, v_thresh) - self.v_thresh_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -27668,32 +20430,6 @@ def factory(*args_, **kwargs_): else: return basePyNNIaFCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tau_m(self): - return self.tau_m - def set_tau_m(self, tau_m): - self.tau_m = tau_m - def get_tau_refrac(self): - return self.tau_refrac - def set_tau_refrac(self, tau_refrac): - self.tau_refrac = tau_refrac - def get_v_reset(self): - return self.v_reset - def set_v_reset(self, v_reset): - self.v_reset = v_reset - def get_v_rest(self): - return self.v_rest - def set_v_rest(self, v_rest): - self.v_rest = v_rest - def get_v_thresh(self): - return self.v_thresh - def set_v_thresh(self, v_thresh): - self.v_thresh = v_thresh - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNIaFCell, self).hasContent_() @@ -27709,10 +20445,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'basePyNNIaFCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27744,56 +20478,58 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNIaFCell', fromsubclass_=False, pretty_print=True): - super(basePyNNIaFCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(basePyNNIaFCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau_m', node) if value is not None and 'tau_m' not in already_processed: already_processed.add('tau_m') - value = self.gds_parse_float(value, node, 'tau_m') - self.tau_m = value + try: + self.tau_m = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_m): %s' % exp) value = find_attr_value_('tau_refrac', node) if value is not None and 'tau_refrac' not in already_processed: already_processed.add('tau_refrac') - value = self.gds_parse_float(value, node, 'tau_refrac') - self.tau_refrac = value + try: + self.tau_refrac = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_refrac): %s' % exp) value = find_attr_value_('v_reset', node) if value is not None and 'v_reset' not in already_processed: already_processed.add('v_reset') - value = self.gds_parse_float(value, node, 'v_reset') - self.v_reset = value + try: + self.v_reset = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_reset): %s' % exp) value = find_attr_value_('v_rest', node) if value is not None and 'v_rest' not in already_processed: already_processed.add('v_rest') - value = self.gds_parse_float(value, node, 'v_rest') - self.v_rest = value + try: + self.v_rest = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_rest): %s' % exp) value = find_attr_value_('v_thresh', node) if value is not None and 'v_thresh' not in already_processed: already_processed.add('v_thresh') - value = self.gds_parse_float(value, node, 'v_thresh') - self.v_thresh = value + try: + self.v_thresh = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_thresh): %s' % exp) value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNIaFCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(basePyNNIaFCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNIaFCell @@ -27801,24 +20537,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ContinuousConnection(BaseConnectionNewFormat): """Individual continuous/analog synaptic connection""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('pre_component', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('post_component', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('pre_component', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('post_component', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ContinuousConnection"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + super(ContinuousConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) self.pre_component = _cast(None, pre_component) - self.pre_component_nsprefix_ = None self.post_component = _cast(None, post_component) - self.post_component_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -27831,31 +20561,13 @@ def factory(*args_, **kwargs_): else: return ContinuousConnection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_preComponent(self): - return self.pre_component - def set_preComponent(self, pre_component): - self.pre_component = pre_component - def get_postComponent(self): - return self.post_component - def set_postComponent(self, post_component): - self.post_component = post_component - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( super(ContinuousConnection, self).hasContent_() @@ -27871,10 +20583,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ContinuousConnection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -27889,31 +20599,23 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ContinuousConnection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ContinuousConnection') if self.pre_component is not None and 'pre_component' not in already_processed: already_processed.add('pre_component') - outfile.write(' preComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.pre_component), input_name='preComponent')), )) + outfile.write(' preComponent=%s' % (quote_attrib(self.pre_component), )) if self.post_component is not None and 'post_component' not in already_processed: already_processed.add('post_component') - outfile.write(' postComponent=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.post_component), input_name='postComponent')), )) + outfile.write(' postComponent=%s' % (quote_attrib(self.post_component), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnection', fromsubclass_=False, pretty_print=True): - super(ContinuousConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ContinuousConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('preComponent', node) @@ -27931,7 +20633,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ContinuousConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ContinuousConnection, self).buildChildren(child_, node, nodeName_, True) pass @@ -27983,21 +20685,16 @@ def __str__(self): class ElectricalConnection(BaseConnectionNewFormat): """Individual electrical synaptic connection""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse', 'NmlId', 0, 0, {'use': 'required'}), + MemberSpec_('synapse', 'NmlId', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConnectionNewFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ElectricalConnection"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) + super(ElectricalConnection, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, extensiontype_, **kwargs_) self.synapse = _cast(None, synapse) - self.synapse_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -28010,27 +20707,13 @@ def factory(*args_, **kwargs_): else: return ElectricalConnection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_synapse(self): - return self.synapse - def set_synapse(self, synapse): - self.synapse = synapse - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( super(ElectricalConnection, self).hasContent_() @@ -28046,10 +20729,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ElectricalConnection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -28064,28 +20745,20 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ElectricalConnection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ElectricalConnection') if self.synapse is not None and 'synapse' not in already_processed: already_processed.add('synapse') - outfile.write(' synapse=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse), input_name='synapse')), )) + outfile.write(' synapse=%s' % (quote_attrib(self.synapse), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnection', fromsubclass_=False, pretty_print=True): - super(ElectricalConnection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ElectricalConnection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse', node) @@ -28098,7 +20771,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ElectricalConnection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ElectricalConnection, self).buildChildren(child_, node, nodeName_, True) pass @@ -28149,24 +20822,18 @@ def __str__(self): class ConnectionWD(BaseConnectionOldFormat): """Individual synaptic connection with weight and delay""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('delay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', weight=None, delay=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', weight=None, delay=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ConnectionWD"), self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + super(ConnectionWD, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) self.weight = _cast(float, weight) - self.weight_nsprefix_ = None self.delay = _cast(None, delay) - self.delay_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -28178,29 +20845,13 @@ def factory(*args_, **kwargs_): else: return ConnectionWD(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_weight(self): - return self.weight - def set_weight(self, weight): - self.weight = weight - def get_delay(self): - return self.delay - def set_delay(self, delay): - self.delay = delay def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(ConnectionWD, self).hasContent_() @@ -28216,10 +20867,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ConnectionWD': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -28237,34 +20886,32 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) if self.delay is not None and 'delay' not in already_processed: already_processed.add('delay') - outfile.write(' delay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.delay), input_name='delay')), )) + outfile.write(' delay=%s' % (quote_attrib(self.delay), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ConnectionWD', fromsubclass_=False, pretty_print=True): - super(ConnectionWD, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ConnectionWD, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - value = self.gds_parse_float(value, node, 'weight') - self.weight = value + try: + self.weight = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (weight): %s' % exp) value = find_attr_value_('delay', node) if value is not None and 'delay' not in already_processed: already_processed.add('delay') self.delay = value self.validate_Nml2Quantity_time(self.delay) # validate type Nml2Quantity_time super(ConnectionWD, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ConnectionWD, self).buildChildren(child_, node, nodeName_, True) pass @@ -28326,20 +20973,16 @@ def get_delay_in_ms(self): class Connection(BaseConnectionOldFormat): - """Individual chemical (event based) synaptic connection, weight==1 and no - delay""" - __hash__ = GeneratedsSuper.__hash__ + """Individual chemical (event based) synaptic connection, weight==1 and + no delay""" member_data_items_ = [ ] subclass = None superclass = BaseConnectionOldFormat - def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell_id=None, pre_segment_id='0', pre_fraction_along='0.5', post_cell_id=None, post_segment_id='0', post_fraction_along='0.5', **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Connection"), self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) + super(Connection, self).__init__(neuro_lex_id, id, pre_cell_id, pre_segment_id, pre_fraction_along, post_cell_id, post_segment_id, post_fraction_along, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -28351,10 +20994,6 @@ def factory(*args_, **kwargs_): else: return Connection(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(Connection, self).hasContent_() @@ -28370,10 +21009,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Connection': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -28387,22 +21024,18 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Connection'): super(Connection, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Connection') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Connection', fromsubclass_=False, pretty_print=True): - super(Connection, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Connection, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Connection, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Connection, self).buildChildren(child_, node, nodeName_, True) pass @@ -28453,21 +21086,16 @@ def __str__(self): class Cell2CaPools(Cell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('biophysical_properties2_ca_pools', 'BiophysicalProperties2CaPools', 0, 1, {'minOccurs': '0', 'name': 'biophysicalProperties2CaPools', 'type': 'BiophysicalProperties2CaPools'}, None), + MemberSpec_('biophysical_properties2_ca_pools', 'BiophysicalProperties2CaPools', 0, 1, {u'type': u'BiophysicalProperties2CaPools', u'name': u'biophysicalProperties2CaPools', u'minOccurs': u'0'}, None), ] subclass = None superclass = Cell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, biophysical_properties2_ca_pools=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, morphology_attr=None, biophysical_properties_attr=None, morphology=None, biophysical_properties=None, biophysical_properties2_ca_pools=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Cell2CaPools"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) + super(Cell2CaPools, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, morphology_attr, biophysical_properties_attr, morphology, biophysical_properties, **kwargs_) self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools - self.biophysical_properties2_ca_pools_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -28479,14 +21107,6 @@ def factory(*args_, **kwargs_): else: return Cell2CaPools(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_biophysicalProperties2CaPools(self): - return self.biophysical_properties2_ca_pools - def set_biophysicalProperties2CaPools(self, biophysical_properties2_ca_pools): - self.biophysical_properties2_ca_pools = biophysical_properties2_ca_pools def hasContent_(self): if ( self.biophysical_properties2_ca_pools is not None or @@ -28503,10 +21123,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Cell2CaPools': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -28521,31 +21139,26 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='Cell2CaPools'): super(Cell2CaPools, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Cell2CaPools') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Cell2CaPools', fromsubclass_=False, pretty_print=True): - super(Cell2CaPools, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(Cell2CaPools, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.biophysical_properties2_ca_pools is not None: - namespaceprefix_ = self.biophysical_properties2_ca_pools_nsprefix_ + ':' if (UseCapturedNS_ and self.biophysical_properties2_ca_pools_nsprefix_) else '' self.biophysical_properties2_ca_pools.export(outfile, level, namespaceprefix_, namespacedef_='', name_='biophysicalProperties2CaPools', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(Cell2CaPools, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'biophysicalProperties2CaPools': obj_ = BiophysicalProperties2CaPools.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.biophysical_properties2_ca_pools = obj_ obj_.original_tagname_ = 'biophysicalProperties2CaPools' super(Cell2CaPools, self).buildChildren(child_, node, nodeName_, True) @@ -28553,48 +21166,34 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class AdExIaFCell(BaseCellMembPotCap): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('g_l', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('EL', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('VT', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('del_t', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('tauw', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('a', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('b', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('g_l', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('EL', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('reset', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('VT', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('thresh', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('del_t', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('tauw', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('a', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('b', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, g_l=None, EL=None, reset=None, VT=None, thresh=None, del_t=None, tauw=None, refract=None, a=None, b=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, g_l=None, EL=None, reset=None, VT=None, thresh=None, del_t=None, tauw=None, refract=None, a=None, b=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("AdExIaFCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + super(AdExIaFCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) self.g_l = _cast(None, g_l) - self.g_l_nsprefix_ = None self.EL = _cast(None, EL) - self.EL_nsprefix_ = None self.reset = _cast(None, reset) - self.reset_nsprefix_ = None self.VT = _cast(None, VT) - self.VT_nsprefix_ = None self.thresh = _cast(None, thresh) - self.thresh_nsprefix_ = None self.del_t = _cast(None, del_t) - self.del_t_nsprefix_ = None self.tauw = _cast(None, tauw) - self.tauw_nsprefix_ = None self.refract = _cast(None, refract) - self.refract_nsprefix_ = None self.a = _cast(None, a) - self.a_nsprefix_ = None self.b = _cast(None, b) - self.b_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -28606,94 +21205,34 @@ def factory(*args_, **kwargs_): else: return AdExIaFCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_gL(self): - return self.g_l - def set_gL(self, g_l): - self.g_l = g_l - def get_EL(self): - return self.EL - def set_EL(self, EL): - self.EL = EL - def get_reset(self): - return self.reset - def set_reset(self, reset): - self.reset = reset - def get_VT(self): - return self.VT - def set_VT(self, VT): - self.VT = VT - def get_thresh(self): - return self.thresh - def set_thresh(self, thresh): - self.thresh = thresh - def get_delT(self): - return self.del_t - def set_delT(self, del_t): - self.del_t = del_t - def get_tauw(self): - return self.tauw - def set_tauw(self, tauw): - self.tauw = tauw - def get_refract(self): - return self.refract - def set_refract(self, refract): - self.refract = refract - def get_a(self): - return self.a - def set_a(self, a): - self.a = a - def get_b(self): - return self.b - def set_b(self, b): - self.b = b def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(AdExIaFCell, self).hasContent_() @@ -28709,10 +21248,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'AdExIaFCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -28728,46 +21265,42 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(AdExIaFCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AdExIaFCell') if self.g_l is not None and 'g_l' not in already_processed: already_processed.add('g_l') - outfile.write(' gL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.g_l), input_name='gL')), )) + outfile.write(' gL=%s' % (quote_attrib(self.g_l), )) if self.EL is not None and 'EL' not in already_processed: already_processed.add('EL') - outfile.write(' EL=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.EL), input_name='EL')), )) + outfile.write(' EL=%s' % (quote_attrib(self.EL), )) if self.reset is not None and 'reset' not in already_processed: already_processed.add('reset') - outfile.write(' reset=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.reset), input_name='reset')), )) + outfile.write(' reset=%s' % (quote_attrib(self.reset), )) if self.VT is not None and 'VT' not in already_processed: already_processed.add('VT') - outfile.write(' VT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.VT), input_name='VT')), )) + outfile.write(' VT=%s' % (quote_attrib(self.VT), )) if self.thresh is not None and 'thresh' not in already_processed: already_processed.add('thresh') - outfile.write(' thresh=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thresh), input_name='thresh')), )) + outfile.write(' thresh=%s' % (quote_attrib(self.thresh), )) if self.del_t is not None and 'del_t' not in already_processed: already_processed.add('del_t') - outfile.write(' delT=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.del_t), input_name='delT')), )) + outfile.write(' delT=%s' % (quote_attrib(self.del_t), )) if self.tauw is not None and 'tauw' not in already_processed: already_processed.add('tauw') - outfile.write(' tauw=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tauw), input_name='tauw')), )) + outfile.write(' tauw=%s' % (quote_attrib(self.tauw), )) if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) + outfile.write(' refract=%s' % (quote_attrib(self.refract), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) + outfile.write(' a=%s' % (quote_attrib(self.a), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) + outfile.write(' b=%s' % (quote_attrib(self.b), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AdExIaFCell', fromsubclass_=False, pretty_print=True): - super(AdExIaFCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(AdExIaFCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gL', node) @@ -28821,52 +21354,39 @@ def buildAttributes(self, node, attrs, already_processed): self.b = value self.validate_Nml2Quantity_current(self.b) # validate type Nml2Quantity_current super(AdExIaFCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(AdExIaFCell, self).buildChildren(child_, node, nodeName_, True) pass # end class AdExIaFCell class Izhikevich2007Cell(BaseCellMembPotCap): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('k', 'Nml2Quantity_conductancePerVoltage', 0, 0, {'use': 'required'}), - MemberSpec_('vr', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('vt', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('vpeak', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('a', 'Nml2Quantity_pertime', 0, 0, {'use': 'required'}), - MemberSpec_('b', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('c', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), - MemberSpec_('d', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('v0', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('k', 'Nml2Quantity_conductancePerVoltage', 0, 0, {'use': u'required'}), + MemberSpec_('vr', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('vt', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('vpeak', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('a', 'Nml2Quantity_pertime', 0, 0, {'use': u'required'}), + MemberSpec_('b', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('c', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), + MemberSpec_('d', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCellMembPotCap - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, C=None, v0=None, k=None, vr=None, vt=None, vpeak=None, a=None, b=None, c=None, d=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("Izhikevich2007Cell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) + super(Izhikevich2007Cell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, C, **kwargs_) self.v0 = _cast(None, v0) - self.v0_nsprefix_ = None self.k = _cast(None, k) - self.k_nsprefix_ = None self.vr = _cast(None, vr) - self.vr_nsprefix_ = None self.vt = _cast(None, vt) - self.vt_nsprefix_ = None self.vpeak = _cast(None, vpeak) - self.vpeak_nsprefix_ = None self.a = _cast(None, a) - self.a_nsprefix_ = None self.b = _cast(None, b) - self.b_nsprefix_ = None self.c = _cast(None, c) - self.c_nsprefix_ = None self.d = _cast(None, d) - self.d_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -28878,101 +21398,41 @@ def factory(*args_, **kwargs_): else: return Izhikevich2007Cell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_v0(self): - return self.v0 - def set_v0(self, v0): - self.v0 = v0 - def get_k(self): - return self.k - def set_k(self, k): - self.k = k - def get_vr(self): - return self.vr - def set_vr(self, vr): - self.vr = vr - def get_vt(self): - return self.vt - def set_vt(self, vt): - self.vt = vt - def get_vpeak(self): - return self.vpeak - def set_vpeak(self, vpeak): - self.vpeak = vpeak - def get_a(self): - return self.a - def set_a(self, a): - self.a = a - def get_b(self): - return self.b - def set_b(self, b): - self.b = b - def get_c(self): - return self.c - def set_c(self, c): - self.c = c - def get_d(self): - return self.d - def set_d(self, d): - self.d = d def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def validate_Nml2Quantity_conductancePerVoltage(self, value): # Validate type Nml2Quantity_conductancePerVoltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductancePerVoltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductancePerVoltage_patterns_, )) - validate_Nml2Quantity_conductancePerVoltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_V|nS_per_mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductancePerVoltage_patterns_, )) + validate_Nml2Quantity_conductancePerVoltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S_per_V|nS_per_mV)$']] def validate_Nml2Quantity_pertime(self, value): # Validate type Nml2Quantity_pertime, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_pertime_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_pertime_patterns_, )) - validate_Nml2Quantity_pertime_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_pertime_patterns_, )) + validate_Nml2Quantity_pertime_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(per_s|per_ms|Hz)$']] def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(Izhikevich2007Cell, self).hasContent_() @@ -28988,10 +21448,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'Izhikevich2007Cell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29007,43 +21465,39 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(Izhikevich2007Cell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Izhikevich2007Cell') if self.v0 is not None and 'v0' not in already_processed: already_processed.add('v0') - outfile.write(' v0=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v0), input_name='v0')), )) + outfile.write(' v0=%s' % (quote_attrib(self.v0), )) if self.k is not None and 'k' not in already_processed: already_processed.add('k') - outfile.write(' k=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.k), input_name='k')), )) + outfile.write(' k=%s' % (quote_attrib(self.k), )) if self.vr is not None and 'vr' not in already_processed: already_processed.add('vr') - outfile.write(' vr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vr), input_name='vr')), )) + outfile.write(' vr=%s' % (quote_attrib(self.vr), )) if self.vt is not None and 'vt' not in already_processed: already_processed.add('vt') - outfile.write(' vt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vt), input_name='vt')), )) + outfile.write(' vt=%s' % (quote_attrib(self.vt), )) if self.vpeak is not None and 'vpeak' not in already_processed: already_processed.add('vpeak') - outfile.write(' vpeak=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.vpeak), input_name='vpeak')), )) + outfile.write(' vpeak=%s' % (quote_attrib(self.vpeak), )) if self.a is not None and 'a' not in already_processed: already_processed.add('a') - outfile.write(' a=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.a), input_name='a')), )) + outfile.write(' a=%s' % (quote_attrib(self.a), )) if self.b is not None and 'b' not in already_processed: already_processed.add('b') - outfile.write(' b=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.b), input_name='b')), )) + outfile.write(' b=%s' % (quote_attrib(self.b), )) if self.c is not None and 'c' not in already_processed: already_processed.add('c') - outfile.write(' c=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.c), input_name='c')), )) + outfile.write(' c=%s' % (quote_attrib(self.c), )) if self.d is not None and 'd' not in already_processed: already_processed.add('d') - outfile.write(' d=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.d), input_name='d')), )) + outfile.write(' d=%s' % (quote_attrib(self.d), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='Izhikevich2007Cell', fromsubclass_=False, pretty_print=True): - super(Izhikevich2007Cell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(Izhikevich2007Cell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('v0', node) @@ -29092,28 +21546,23 @@ def buildAttributes(self, node, attrs, already_processed): self.d = value self.validate_Nml2Quantity_current(self.d) # validate type Nml2Quantity_current super(Izhikevich2007Cell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(Izhikevich2007Cell, self).buildChildren(child_, node, nodeName_, True) pass # end class Izhikevich2007Cell class IafRefCell(IafCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = IafCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, refract=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, C=None, leak_conductance=None, refract=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IafRefCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) + super(IafRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, C, leak_conductance, **kwargs_) self.refract = _cast(None, refract) - self.refract_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -29125,25 +21574,13 @@ def factory(*args_, **kwargs_): else: return IafRefCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_refract(self): - return self.refract - def set_refract(self, refract): - self.refract = refract def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(IafRefCell, self).hasContent_() @@ -29159,10 +21596,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IafRefCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29178,19 +21613,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafRefCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafRefCell') if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) + outfile.write(' refract=%s' % (quote_attrib(self.refract), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafRefCell', fromsubclass_=False, pretty_print=True): - super(IafRefCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IafRefCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('refract', node) @@ -29199,28 +21630,23 @@ def buildAttributes(self, node, attrs, already_processed): self.refract = value self.validate_Nml2Quantity_time(self.refract) # validate type Nml2Quantity_time super(IafRefCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IafRefCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafRefCell class IafTauRefCell(IafTauCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('refract', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = IafTauCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, refract=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, leak_reversal=None, thresh=None, reset=None, tau=None, refract=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IafTauRefCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) + super(IafTauRefCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, leak_reversal, thresh, reset, tau, **kwargs_) self.refract = _cast(None, refract) - self.refract_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -29232,25 +21658,13 @@ def factory(*args_, **kwargs_): else: return IafTauRefCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_refract(self): - return self.refract - def set_refract(self, refract): - self.refract = refract def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(IafTauRefCell, self).hasContent_() @@ -29266,10 +21680,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IafTauRefCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29285,19 +21697,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IafTauRefCell, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IafTauRefCell') if self.refract is not None and 'refract' not in already_processed: already_processed.add('refract') - outfile.write(' refract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refract), input_name='refract')), )) + outfile.write(' refract=%s' % (quote_attrib(self.refract), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IafTauRefCell', fromsubclass_=False, pretty_print=True): - super(IafTauRefCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IafTauRefCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('refract', node) @@ -29306,37 +21714,29 @@ def buildAttributes(self, node, attrs, already_processed): self.refract = value self.validate_Nml2Quantity_time(self.refract) # validate type Nml2Quantity_time super(IafTauRefCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IafTauRefCell, self).buildChildren(child_, node, nodeName_, True) pass # end class IafTauRefCell class DoubleSynapse(BaseVoltageDepSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('synapse1', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('synapse2', 'NmlId', 0, 0, {'use': 'required'}), - MemberSpec_('synapse1_path', 'xs:string', 0, 0, {'use': 'required'}), - MemberSpec_('synapse2_path', 'xs:string', 0, 0, {'use': 'required'}), + MemberSpec_('synapse1', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('synapse2', 'NmlId', 0, 0, {'use': u'required'}), + MemberSpec_('synapse1_path', 'xs:string', 0, 0, {'use': u'required'}), + MemberSpec_('synapse2_path', 'xs:string', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse1=None, synapse2=None, synapse1_path=None, synapse2_path=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, synapse1=None, synapse2=None, synapse1_path=None, synapse2_path=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("DoubleSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(DoubleSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.synapse1 = _cast(None, synapse1) - self.synapse1_nsprefix_ = None self.synapse2 = _cast(None, synapse2) - self.synapse2_nsprefix_ = None self.synapse1_path = _cast(None, synapse1_path) - self.synapse1_path_nsprefix_ = None self.synapse2_path = _cast(None, synapse2_path) - self.synapse2_path_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -29348,37 +21748,13 @@ def factory(*args_, **kwargs_): else: return DoubleSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_synapse1(self): - return self.synapse1 - def set_synapse1(self, synapse1): - self.synapse1 = synapse1 - def get_synapse2(self): - return self.synapse2 - def set_synapse2(self, synapse2): - self.synapse2 = synapse2 - def get_synapse1Path(self): - return self.synapse1_path - def set_synapse1Path(self, synapse1_path): - self.synapse1_path = synapse1_path - def get_synapse2Path(self): - return self.synapse2_path - def set_synapse2Path(self, synapse2_path): - self.synapse2_path = synapse2_path def validate_NmlId(self, value): # Validate type NmlId, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_NmlId_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_NmlId_patterns_, )) - validate_NmlId_patterns_ = [['^([a-zA-Z_][a-zA-Z0-9_]*)$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_NmlId_patterns_, )) + validate_NmlId_patterns_ = [[u'^[a-zA-Z_][a-zA-Z0-9_]*$']] def hasContent_(self): if ( super(DoubleSynapse, self).hasContent_() @@ -29394,10 +21770,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='D eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'DoubleSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29413,10 +21787,10 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(DoubleSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoubleSynapse') if self.synapse1 is not None and 'synapse1' not in already_processed: already_processed.add('synapse1') - outfile.write(' synapse1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1), input_name='synapse1')), )) + outfile.write(' synapse1=%s' % (quote_attrib(self.synapse1), )) if self.synapse2 is not None and 'synapse2' not in already_processed: already_processed.add('synapse2') - outfile.write(' synapse2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2), input_name='synapse2')), )) + outfile.write(' synapse2=%s' % (quote_attrib(self.synapse2), )) if self.synapse1_path is not None and 'synapse1_path' not in already_processed: already_processed.add('synapse1_path') outfile.write(' synapse1Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse1_path), input_name='synapse1Path')), )) @@ -29424,17 +21798,13 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('synapse2_path') outfile.write(' synapse2Path=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.synapse2_path), input_name='synapse2Path')), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoubleSynapse', fromsubclass_=False, pretty_print=True): - super(DoubleSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(DoubleSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('synapse1', node) @@ -29456,31 +21826,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('synapse2Path') self.synapse2_path = value super(DoubleSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(DoubleSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class DoubleSynapse class AlphaCurrentSynapse(BaseCurrentBasedSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('ibase', 'Nml2Quantity_current', 0, 0, {'use': 'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('ibase', 'Nml2Quantity_current', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseCurrentBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau=None, ibase=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, tau=None, ibase=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("AlphaCurrentSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) + super(AlphaCurrentSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, **kwargs_) self.tau = _cast(None, tau) - self.tau_nsprefix_ = None self.ibase = _cast(None, ibase) - self.ibase_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -29492,40 +21856,20 @@ def factory(*args_, **kwargs_): else: return AlphaCurrentSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tau(self): - return self.tau - def set_tau(self, tau): - self.tau = tau - def get_ibase(self): - return self.ibase - def set_ibase(self, ibase): - self.ibase = ibase def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def validate_Nml2Quantity_current(self, value): # Validate type Nml2Quantity_current, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_current_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_current_patterns_, )) - validate_Nml2Quantity_current_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_current_patterns_, )) + validate_Nml2Quantity_current_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA)$']] def hasContent_(self): if ( super(AlphaCurrentSynapse, self).hasContent_() @@ -29541,10 +21885,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'AlphaCurrentSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29560,22 +21902,18 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(AlphaCurrentSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaCurrentSynapse') if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) + outfile.write(' tau=%s' % (quote_attrib(self.tau), )) if self.ibase is not None and 'ibase' not in already_processed: already_processed.add('ibase') - outfile.write(' ibase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ibase), input_name='ibase')), )) + outfile.write(' ibase=%s' % (quote_attrib(self.ibase), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaCurrentSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaCurrentSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(AlphaCurrentSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau', node) @@ -29589,34 +21927,27 @@ def buildAttributes(self, node, attrs, already_processed): self.ibase = value self.validate_Nml2Quantity_current(self.ibase) # validate type Nml2Quantity_current super(AlphaCurrentSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(AlphaCurrentSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaCurrentSynapse class BaseConductanceBasedSynapseTwo(BaseVoltageDepSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('gbase1', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('gbase2', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('gbase1', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('gbase2', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseConductanceBasedSynapseTwo"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseConductanceBasedSynapseTwo, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase1 = _cast(None, gbase1) - self.gbase1_nsprefix_ = None self.gbase2 = _cast(None, gbase2) - self.gbase2_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -29629,46 +21960,20 @@ def factory(*args_, **kwargs_): else: return BaseConductanceBasedSynapseTwo(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_gbase1(self): - return self.gbase1 - def set_gbase1(self, gbase1): - self.gbase1 = gbase1 - def get_gbase2(self): - return self.gbase2 - def set_gbase2(self, gbase2): - self.gbase2 = gbase2 - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( super(BaseConductanceBasedSynapseTwo, self).hasContent_() @@ -29684,10 +21989,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseConductanceBasedSynapseTwo': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29703,33 +22006,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseConductanceBasedSynapseTwo, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConductanceBasedSynapseTwo') if self.gbase1 is not None and 'gbase1' not in already_processed: already_processed.add('gbase1') - outfile.write(' gbase1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase1), input_name='gbase1')), )) + outfile.write(' gbase1=%s' % (quote_attrib(self.gbase1), )) if self.gbase2 is not None and 'gbase2' not in already_processed: already_processed.add('gbase2') - outfile.write(' gbase2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase2), input_name='gbase2')), )) + outfile.write(' gbase2=%s' % (quote_attrib(self.gbase2), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConductanceBasedSynapseTwo', fromsubclass_=False, pretty_print=True): - super(BaseConductanceBasedSynapseTwo, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseConductanceBasedSynapseTwo, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gbase1', node) @@ -29752,31 +22047,25 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConductanceBasedSynapseTwo, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseConductanceBasedSynapseTwo, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConductanceBasedSynapseTwo class BaseConductanceBasedSynapse(BaseVoltageDepSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('gbase', 'Nml2Quantity_conductance', 0, 0, {'use': 'required'}), - MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('gbase', 'Nml2Quantity_conductance', 0, 0, {'use': u'required'}), + MemberSpec_('erev', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseVoltageDepSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BaseConductanceBasedSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) + super(BaseConductanceBasedSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, extensiontype_, **kwargs_) self.gbase = _cast(None, gbase) - self.gbase_nsprefix_ = None self.erev = _cast(None, erev) - self.erev_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -29789,42 +22078,20 @@ def factory(*args_, **kwargs_): else: return BaseConductanceBasedSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_gbase(self): - return self.gbase - def set_gbase(self, gbase): - self.gbase = gbase - def get_erev(self): - return self.erev - def set_erev(self, erev): - self.erev = erev - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_conductance(self, value): # Validate type Nml2Quantity_conductance, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_conductance_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_conductance_patterns_, )) - validate_Nml2Quantity_conductance_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_conductance_patterns_, )) + validate_Nml2Quantity_conductance_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(S|mS|uS|nS|pS)$']] def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( super(BaseConductanceBasedSynapse, self).hasContent_() @@ -29840,10 +22107,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BaseConductanceBasedSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29859,30 +22124,22 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(BaseConductanceBasedSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BaseConductanceBasedSynapse') if self.gbase is not None and 'gbase' not in already_processed: already_processed.add('gbase') - outfile.write(' gbase=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gbase), input_name='gbase')), )) + outfile.write(' gbase=%s' % (quote_attrib(self.gbase), )) if self.erev is not None and 'erev' not in already_processed: already_processed.add('erev') - outfile.write(' erev=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.erev), input_name='erev')), )) + outfile.write(' erev=%s' % (quote_attrib(self.erev), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BaseConductanceBasedSynapse', fromsubclass_=False, pretty_print=True): - super(BaseConductanceBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(BaseConductanceBasedSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('gbase', node) @@ -29900,7 +22157,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(BaseConductanceBasedSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(BaseConductanceBasedSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class BaseConductanceBasedSynapse @@ -29908,23 +22165,18 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class IonChannelVShift(IonChannel): """Same as ionChannel, but with a vShift parameter to change voltage - activation of gates. The exact usage of vShift in expressions for rates - is determined by the individual gates.""" - __hash__ = GeneratedsSuper.__hash__ + activation of gates. The exact usage of vShift in expressions + for rates is determined by the individual gates.""" member_data_items_ = [ - MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': 'required'}), + MemberSpec_('v_shift', 'Nml2Quantity_voltage', 0, 0, {'use': u'required'}), ] subclass = None superclass = IonChannel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, v_shift=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, v_shift=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IonChannelVShift"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + super(IonChannelVShift, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) self.v_shift = _cast(None, v_shift) - self.v_shift_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -29936,25 +22188,13 @@ def factory(*args_, **kwargs_): else: return IonChannelVShift(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_vShift(self): - return self.v_shift - def set_vShift(self, v_shift): - self.v_shift = v_shift def validate_Nml2Quantity_voltage(self, value): # Validate type Nml2Quantity_voltage, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_voltage_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_voltage_patterns_, )) - validate_Nml2Quantity_voltage_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_voltage_patterns_, )) + validate_Nml2Quantity_voltage_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(V|mV)$']] def hasContent_(self): if ( super(IonChannelVShift, self).hasContent_() @@ -29970,10 +22210,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IonChannelVShift': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -29989,19 +22227,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(IonChannelVShift, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelVShift') if self.v_shift is not None and 'v_shift' not in already_processed: already_processed.add('v_shift') - outfile.write(' vShift=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.v_shift), input_name='vShift')), )) + outfile.write(' vShift=%s' % (quote_attrib(self.v_shift), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelVShift', fromsubclass_=False, pretty_print=True): - super(IonChannelVShift, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IonChannelVShift, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('vShift', node) @@ -30010,29 +22244,25 @@ def buildAttributes(self, node, attrs, already_processed): self.v_shift = value self.validate_Nml2Quantity_voltage(self.v_shift) # validate type Nml2Quantity_voltage super(IonChannelVShift, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IonChannelVShift, self).buildChildren(child_, node, nodeName_, True) pass # end class IonChannelVShift class IonChannelHH(IonChannel): - """Note ionChannel and ionChannelHH are currently functionally identical. - This is needed since many existing examples use ionChannel, some use - ionChannelHH. - NeuroML v2beta4 should remove one of these, probably ionChannelHH.""" - __hash__ = GeneratedsSuper.__hash__ + """Note ionChannel and ionChannelHH are currently functionally + identical. This is needed since many existing examples use + ionChannel, some use ionChannelHH. NeuroML v2beta4 should remove + one of these, probably ionChannelHH.""" member_data_items_ = [ ] subclass = None superclass = IonChannel - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, q10_conductance_scalings=None, species=None, type=None, conductance=None, gates=None, gate_hh_rates=None, gate_h_hrates_taus=None, gate_hh_tau_infs=None, gate_h_hrates_infs=None, gate_h_hrates_tau_infs=None, gate_hh_instantaneouses=None, gate_fractionals=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IonChannelHH"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) + super(IonChannelHH, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, q10_conductance_scalings, species, type, conductance, gates, gate_hh_rates, gate_h_hrates_taus, gate_hh_tau_infs, gate_h_hrates_infs, gate_h_hrates_tau_infs, gate_hh_instantaneouses, gate_fractionals, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -30044,10 +22274,6 @@ def factory(*args_, **kwargs_): else: return IonChannelHH(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IonChannelHH, self).hasContent_() @@ -30063,10 +22289,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IonChannelHH': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30081,39 +22305,31 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IonChannelHH'): super(IonChannelHH, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IonChannelHH') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IonChannelHH', fromsubclass_=False, pretty_print=True): - super(IonChannelHH, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IonChannelHH, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IonChannelHH, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IonChannelHH, self).buildChildren(child_, node, nodeName_, True) pass # end class IonChannelHH class IF_curr_exp(basePyNNIaFCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IF_curr_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(IF_curr_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -30125,10 +22341,6 @@ def factory(*args_, **kwargs_): else: return IF_curr_exp(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_curr_exp, self).hasContent_() @@ -30144,10 +22356,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IF_curr_exp': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30162,39 +22372,31 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_curr_exp'): super(IF_curr_exp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_curr_exp') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_curr_exp', fromsubclass_=False, pretty_print=True): - super(IF_curr_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IF_curr_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_curr_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IF_curr_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_curr_exp class IF_curr_alpha(basePyNNIaFCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IF_curr_alpha"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) + super(IF_curr_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -30206,10 +22408,6 @@ def factory(*args_, **kwargs_): else: return IF_curr_alpha(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_curr_alpha, self).hasContent_() @@ -30225,10 +22423,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IF_curr_alpha': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30243,45 +22439,35 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_curr_alpha'): super(IF_curr_alpha, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_curr_alpha') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_curr_alpha', fromsubclass_=False, pretty_print=True): - super(IF_curr_alpha, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IF_curr_alpha, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_curr_alpha, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IF_curr_alpha, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_curr_alpha class basePyNNIaFCondCell(basePyNNIaFCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('e_rev_E', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('e_rev_I', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = basePyNNIaFCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("basePyNNIaFCondCell"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) + super(basePyNNIaFCondCell, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, extensiontype_, **kwargs_) self.e_rev_E = _cast(float, e_rev_E) - self.e_rev_E_nsprefix_ = None self.e_rev_I = _cast(float, e_rev_I) - self.e_rev_I_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -30294,20 +22480,6 @@ def factory(*args_, **kwargs_): else: return basePyNNIaFCondCell(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_e_rev_E(self): - return self.e_rev_E - def set_e_rev_E(self, e_rev_E): - self.e_rev_E = e_rev_E - def get_e_rev_I(self): - return self.e_rev_I - def set_e_rev_I(self, e_rev_I): - self.e_rev_I = e_rev_I - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(basePyNNIaFCondCell, self).hasContent_() @@ -30323,10 +22495,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='b eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'basePyNNIaFCondCell': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30349,41 +22519,37 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='basePyNNIaFCondCell', fromsubclass_=False, pretty_print=True): - super(basePyNNIaFCondCell, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(basePyNNIaFCondCell, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('e_rev_E', node) if value is not None and 'e_rev_E' not in already_processed: already_processed.add('e_rev_E') - value = self.gds_parse_float(value, node, 'e_rev_E') - self.e_rev_E = value + try: + self.e_rev_E = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_E): %s' % exp) value = find_attr_value_('e_rev_I', node) if value is not None and 'e_rev_I' not in already_processed: already_processed.add('e_rev_I') - value = self.gds_parse_float(value, node, 'e_rev_I') - self.e_rev_I = value + try: + self.e_rev_I = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (e_rev_I): %s' % exp) value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(basePyNNIaFCondCell, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(basePyNNIaFCondCell, self).buildChildren(child_, node, nodeName_, True) pass # end class basePyNNIaFCondCell @@ -30391,18 +22557,14 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ContinuousConnectionInstance(ContinuousConnection): """Individual continuous/analog synaptic connection - instance based""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ContinuousConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ContinuousConnectionInstance"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) + super(ContinuousConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -30415,12 +22577,6 @@ def factory(*args_, **kwargs_): else: return ContinuousConnectionInstance(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(ContinuousConnectionInstance, self).hasContent_() @@ -30436,10 +22592,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ContinuousConnectionInstance': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30455,24 +22609,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnectionInstance', fromsubclass_=False, pretty_print=True): - super(ContinuousConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ContinuousConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -30480,7 +22626,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ContinuousConnectionInstance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ContinuousConnectionInstance, self).buildChildren(child_, node, nodeName_, True) pass @@ -30502,18 +22648,14 @@ def __str__(self): class ElectricalConnectionInstance(ElectricalConnection): """Projection between two populations consisting of analog connections (e.g. graded synapses)""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = ElectricalConnection - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ElectricalConnectionInstance"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) + super(ElectricalConnectionInstance, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, extensiontype_, **kwargs_) self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -30526,12 +22668,6 @@ def factory(*args_, **kwargs_): else: return ElectricalConnectionInstance(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(ElectricalConnectionInstance, self).hasContent_() @@ -30547,10 +22683,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ElectricalConnectionInstance': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30566,24 +22700,16 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnectionInstance', fromsubclass_=False, pretty_print=True): - super(ElectricalConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ElectricalConnectionInstance, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('xsi:type', node) @@ -30591,7 +22717,7 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ElectricalConnectionInstance, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ElectricalConnectionInstance, self).buildChildren(child_, node, nodeName_, True) pass @@ -30610,27 +22736,20 @@ def __str__(self): class ExpThreeSynapse(BaseConductanceBasedSynapseTwo): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay1', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tau_decay2', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay1', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tau_decay2', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConductanceBasedSynapseTwo - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, tau_decay1=None, tau_decay2=None, tau_rise=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase1=None, gbase2=None, erev=None, tau_decay1=None, tau_decay2=None, tau_rise=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExpThreeSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) + super(ExpThreeSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase1, gbase2, erev, **kwargs_) self.tau_decay1 = _cast(None, tau_decay1) - self.tau_decay1_nsprefix_ = None self.tau_decay2 = _cast(None, tau_decay2) - self.tau_decay2_nsprefix_ = None self.tau_rise = _cast(None, tau_rise) - self.tau_rise_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -30642,33 +22761,13 @@ def factory(*args_, **kwargs_): else: return ExpThreeSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tauDecay1(self): - return self.tau_decay1 - def set_tauDecay1(self, tau_decay1): - self.tau_decay1 = tau_decay1 - def get_tauDecay2(self): - return self.tau_decay2 - def set_tauDecay2(self, tau_decay2): - self.tau_decay2 = tau_decay2 - def get_tauRise(self): - return self.tau_rise - def set_tauRise(self, tau_rise): - self.tau_rise = tau_rise def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(ExpThreeSynapse, self).hasContent_() @@ -30684,10 +22783,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExpThreeSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30703,25 +22800,21 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ExpThreeSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpThreeSynapse') if self.tau_decay1 is not None and 'tau_decay1' not in already_processed: already_processed.add('tau_decay1') - outfile.write(' tauDecay1=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay1), input_name='tauDecay1')), )) + outfile.write(' tauDecay1=%s' % (quote_attrib(self.tau_decay1), )) if self.tau_decay2 is not None and 'tau_decay2' not in already_processed: already_processed.add('tau_decay2') - outfile.write(' tauDecay2=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay2), input_name='tauDecay2')), )) + outfile.write(' tauDecay2=%s' % (quote_attrib(self.tau_decay2), )) if self.tau_rise is not None and 'tau_rise' not in already_processed: already_processed.add('tau_rise') - outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rise), input_name='tauRise')), )) + outfile.write(' tauRise=%s' % (quote_attrib(self.tau_rise), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpThreeSynapse', fromsubclass_=False, pretty_print=True): - super(ExpThreeSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ExpThreeSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay1', node) @@ -30740,31 +22833,25 @@ def buildAttributes(self, node, attrs, already_processed): self.tau_rise = value self.validate_Nml2Quantity_time(self.tau_rise) # validate type Nml2Quantity_time super(ExpThreeSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ExpThreeSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpThreeSynapse class ExpTwoSynapse(BaseConductanceBasedSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), - MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), + MemberSpec_('tau_rise', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExpTwoSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) + super(ExpTwoSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, extensiontype_, **kwargs_) self.tau_decay = _cast(None, tau_decay) - self.tau_decay_nsprefix_ = None self.tau_rise = _cast(None, tau_rise) - self.tau_rise_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -30777,31 +22864,13 @@ def factory(*args_, **kwargs_): else: return ExpTwoSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tauDecay(self): - return self.tau_decay - def set_tauDecay(self, tau_decay): - self.tau_decay = tau_decay - def get_tauRise(self): - return self.tau_rise - def set_tauRise(self, tau_rise): - self.tau_rise = tau_rise - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(ExpTwoSynapse, self).hasContent_() @@ -30817,10 +22886,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExpTwoSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30836,30 +22903,22 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ExpTwoSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpTwoSynapse') if self.tau_decay is not None and 'tau_decay' not in already_processed: already_processed.add('tau_decay') - outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay), input_name='tauDecay')), )) + outfile.write(' tauDecay=%s' % (quote_attrib(self.tau_decay), )) if self.tau_rise is not None and 'tau_rise' not in already_processed: already_processed.add('tau_rise') - outfile.write(' tauRise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_rise), input_name='tauRise')), )) + outfile.write(' tauRise=%s' % (quote_attrib(self.tau_rise), )) if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpTwoSynapse', fromsubclass_=False, pretty_print=True): - super(ExpTwoSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ExpTwoSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) @@ -30877,28 +22936,23 @@ def buildAttributes(self, node, attrs, already_processed): already_processed.add('xsi:type') self.extensiontype_ = value super(ExpTwoSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ExpTwoSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpTwoSynapse class ExpOneSynapse(BaseConductanceBasedSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau_decay', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ExpOneSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + super(ExpOneSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) self.tau_decay = _cast(None, tau_decay) - self.tau_decay_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -30910,25 +22964,13 @@ def factory(*args_, **kwargs_): else: return ExpOneSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tauDecay(self): - return self.tau_decay - def set_tauDecay(self, tau_decay): - self.tau_decay = tau_decay def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(ExpOneSynapse, self).hasContent_() @@ -30944,10 +22986,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ExpOneSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -30963,19 +23003,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(ExpOneSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='ExpOneSynapse') if self.tau_decay is not None and 'tau_decay' not in already_processed: already_processed.add('tau_decay') - outfile.write(' tauDecay=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau_decay), input_name='tauDecay')), )) + outfile.write(' tauDecay=%s' % (quote_attrib(self.tau_decay), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ExpOneSynapse', fromsubclass_=False, pretty_print=True): - super(ExpOneSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(ExpOneSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tauDecay', node) @@ -30984,28 +23020,23 @@ def buildAttributes(self, node, attrs, already_processed): self.tau_decay = value self.validate_Nml2Quantity_time(self.tau_decay) # validate type Nml2Quantity_time super(ExpOneSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ExpOneSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class ExpOneSynapse class AlphaSynapse(BaseConductanceBasedSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': 'required'}), + MemberSpec_('tau', 'Nml2Quantity_time', 0, 0, {'use': u'required'}), ] subclass = None superclass = BaseConductanceBasedSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("AlphaSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) + super(AlphaSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, **kwargs_) self.tau = _cast(None, tau) - self.tau_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31017,25 +23048,13 @@ def factory(*args_, **kwargs_): else: return AlphaSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_tau(self): - return self.tau - def set_tau(self, tau): - self.tau = tau def validate_Nml2Quantity_time(self, value): # Validate type Nml2Quantity_time, a restriction on xs:string. - if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None: - if not isinstance(value, str): - lineno = self.gds_get_node_lineno_() - self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, }) - return False + if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_Nml2Quantity_time_patterns_, value): - self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_Nml2Quantity_time_patterns_, )) - validate_Nml2Quantity_time_patterns_ = [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms))$']] + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_Nml2Quantity_time_patterns_, )) + validate_Nml2Quantity_time_patterns_ = [[u'^-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(s|ms)$']] def hasContent_(self): if ( super(AlphaSynapse, self).hasContent_() @@ -31051,10 +23070,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='A eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'AlphaSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31070,19 +23087,15 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' super(AlphaSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='AlphaSynapse') if self.tau is not None and 'tau' not in already_processed: already_processed.add('tau') - outfile.write(' tau=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tau), input_name='tau')), )) + outfile.write(' tau=%s' % (quote_attrib(self.tau), )) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='AlphaSynapse', fromsubclass_=False, pretty_print=True): - super(AlphaSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(AlphaSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('tau', node) @@ -31091,40 +23104,31 @@ def buildAttributes(self, node, attrs, already_processed): self.tau = value self.validate_Nml2Quantity_time(self.tau) # validate type Nml2Quantity_time super(AlphaSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(AlphaSynapse, self).buildChildren(child_, node, nodeName_, True) pass # end class AlphaSynapse class EIF_cond_exp_isfa_ista(basePyNNIaFCondCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('a', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('b', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('delta_T', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('tau_w', 'xs:float', 0, 0, {'use': 'required'}), - MemberSpec_('v_spike', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('a', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('b', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('delta_T', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('tau_w', 'xs:float', 0, 0, {'use': u'required'}), + MemberSpec_('v_spike', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, extensiontype_=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("EIF_cond_exp_isfa_ista"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) + super(EIF_cond_exp_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, extensiontype_, **kwargs_) self.a = _cast(float, a) - self.a_nsprefix_ = None self.b = _cast(float, b) - self.b_nsprefix_ = None self.delta_T = _cast(float, delta_T) - self.delta_T_nsprefix_ = None self.tau_w = _cast(float, tau_w) - self.tau_w_nsprefix_ = None self.v_spike = _cast(float, v_spike) - self.v_spike_nsprefix_ = None self.extensiontype_ = extensiontype_ def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: @@ -31137,32 +23141,6 @@ def factory(*args_, **kwargs_): else: return EIF_cond_exp_isfa_ista(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_a(self): - return self.a - def set_a(self, a): - self.a = a - def get_b(self): - return self.b - def set_b(self, b): - self.b = b - def get_delta_T(self): - return self.delta_T - def set_delta_T(self, delta_T): - self.delta_T = delta_T - def get_tau_w(self): - return self.tau_w - def set_tau_w(self, tau_w): - self.tau_w = tau_w - def get_v_spike(self): - return self.v_spike - def set_v_spike(self, v_spike): - self.v_spike = v_spike - def get_extensiontype_(self): return self.extensiontype_ - def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_ def hasContent_(self): if ( super(EIF_cond_exp_isfa_ista, self).hasContent_() @@ -31178,10 +23156,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'EIF_cond_exp_isfa_ista': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31213,74 +23189,72 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' if self.extensiontype_ is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') - if ":" not in self.extensiontype_: - imported_ns_type_prefix_ = GenerateDSNamespaceTypePrefixes_.get(self.extensiontype_, '') - outfile.write(' xsi:type="%s%s"' % (imported_ns_type_prefix_, self.extensiontype_)) - else: - outfile.write(' xsi:type="%s"' % self.extensiontype_) + outfile.write(' xsi:type="%s"' % self.extensiontype_) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='EIF_cond_exp_isfa_ista', fromsubclass_=False, pretty_print=True): - super(EIF_cond_exp_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(EIF_cond_exp_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('a', node) if value is not None and 'a' not in already_processed: already_processed.add('a') - value = self.gds_parse_float(value, node, 'a') - self.a = value + try: + self.a = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (a): %s' % exp) value = find_attr_value_('b', node) if value is not None and 'b' not in already_processed: already_processed.add('b') - value = self.gds_parse_float(value, node, 'b') - self.b = value + try: + self.b = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (b): %s' % exp) value = find_attr_value_('delta_T', node) if value is not None and 'delta_T' not in already_processed: already_processed.add('delta_T') - value = self.gds_parse_float(value, node, 'delta_T') - self.delta_T = value + try: + self.delta_T = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (delta_T): %s' % exp) value = find_attr_value_('tau_w', node) if value is not None and 'tau_w' not in already_processed: already_processed.add('tau_w') - value = self.gds_parse_float(value, node, 'tau_w') - self.tau_w = value + try: + self.tau_w = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (tau_w): %s' % exp) value = find_attr_value_('v_spike', node) if value is not None and 'v_spike' not in already_processed: already_processed.add('v_spike') - value = self.gds_parse_float(value, node, 'v_spike') - self.v_spike = value + try: + self.v_spike = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (v_spike): %s' % exp) value = find_attr_value_('xsi:type', node) if value is not None and 'xsi:type' not in already_processed: already_processed.add('xsi:type') self.extensiontype_ = value super(EIF_cond_exp_isfa_ista, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(EIF_cond_exp_isfa_ista, self).buildChildren(child_, node, nodeName_, True) pass # end class EIF_cond_exp_isfa_ista class IF_cond_exp(basePyNNIaFCondCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IF_cond_exp"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(IF_cond_exp, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31292,10 +23266,6 @@ def factory(*args_, **kwargs_): else: return IF_cond_exp(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_cond_exp, self).hasContent_() @@ -31311,10 +23281,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IF_cond_exp': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31329,39 +23297,31 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_cond_exp'): super(IF_cond_exp, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_cond_exp') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_cond_exp', fromsubclass_=False, pretty_print=True): - super(IF_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IF_cond_exp, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_cond_exp, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IF_cond_exp, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_cond_exp class IF_cond_alpha(basePyNNIaFCondCell): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = basePyNNIaFCondCell - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("IF_cond_alpha"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) + super(IF_cond_alpha, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31373,10 +23333,6 @@ def factory(*args_, **kwargs_): else: return IF_cond_alpha(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(IF_cond_alpha, self).hasContent_() @@ -31392,10 +23348,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'IF_cond_alpha': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31410,21 +23364,17 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='I def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='IF_cond_alpha'): super(IF_cond_alpha, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='IF_cond_alpha') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='IF_cond_alpha', fromsubclass_=False, pretty_print=True): - super(IF_cond_alpha, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(IF_cond_alpha, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(IF_cond_alpha, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(IF_cond_alpha, self).buildChildren(child_, node, nodeName_, True) pass # end class IF_cond_alpha @@ -31433,21 +23383,16 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class ContinuousConnectionInstanceW(ContinuousConnectionInstance): """Individual continuous/analog synaptic connection - instance based. Includes setting of _weight for the connection""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = ContinuousConnectionInstance - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, weight=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', pre_component=None, post_component=None, weight=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ContinuousConnectionInstanceW"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) + super(ContinuousConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, pre_component, post_component, **kwargs_) self.weight = _cast(float, weight) - self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31459,14 +23404,6 @@ def factory(*args_, **kwargs_): else: return ContinuousConnectionInstanceW(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_weight(self): - return self.weight - def set_weight(self, weight): - self.weight = weight def hasContent_(self): if ( super(ContinuousConnectionInstanceW, self).hasContent_() @@ -31482,10 +23419,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='C eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ContinuousConnectionInstanceW': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31502,27 +23437,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ContinuousConnectionInstanceW', fromsubclass_=False, pretty_print=True): - super(ContinuousConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ContinuousConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - value = self.gds_parse_float(value, node, 'weight') - self.weight = value + try: + self.weight = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (weight): %s' % exp) super(ContinuousConnectionInstanceW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ContinuousConnectionInstanceW, self).buildChildren(child_, node, nodeName_, True) pass @@ -31542,21 +23475,16 @@ class ElectricalConnectionInstanceW(ElectricalConnectionInstance): """Projection between two populations consisting of analog connections (e.g. graded synapses). Includes setting of weight for the connection""" - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('weight', 'xs:float', 0, 0, {'use': 'required'}), + MemberSpec_('weight', 'xs:float', 0, 0, {'use': u'required'}), ] subclass = None superclass = ElectricalConnectionInstance - def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, weight=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, pre_cell=None, pre_segment='0', pre_fraction_along='0.5', post_cell=None, post_segment='0', post_fraction_along='0.5', synapse=None, weight=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("ElectricalConnectionInstanceW"), self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) + super(ElectricalConnectionInstanceW, self).__init__(neuro_lex_id, id, pre_cell, pre_segment, pre_fraction_along, post_cell, post_segment, post_fraction_along, synapse, **kwargs_) self.weight = _cast(float, weight) - self.weight_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31568,14 +23496,6 @@ def factory(*args_, **kwargs_): else: return ElectricalConnectionInstanceW(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_weight(self): - return self.weight - def set_weight(self, weight): - self.weight = weight def hasContent_(self): if ( super(ElectricalConnectionInstanceW, self).hasContent_() @@ -31591,10 +23511,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'ElectricalConnectionInstanceW': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31611,27 +23529,25 @@ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_=' already_processed.add('weight') outfile.write(' weight="%s"' % self.gds_format_float(self.weight, input_name='weight')) def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='ElectricalConnectionInstanceW', fromsubclass_=False, pretty_print=True): - super(ElectricalConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(ElectricalConnectionInstanceW, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) pass - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): value = find_attr_value_('weight', node) if value is not None and 'weight' not in already_processed: already_processed.add('weight') - value = self.gds_parse_float(value, node, 'weight') - self.weight = value + try: + self.weight = float(value) + except ValueError as exp: + raise ValueError('Bad float/double attribute (weight): %s' % exp) super(ElectricalConnectionInstanceW, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(ElectricalConnectionInstanceW, self).buildChildren(child_, node, nodeName_, True) pass @@ -31647,24 +23563,18 @@ def __str__(self): class BlockingPlasticSynapse(ExpTwoSynapse): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ - MemberSpec_('plasticity_mechanism', 'PlasticityMechanism', 0, 1, {'minOccurs': '0', 'name': 'plasticityMechanism', 'type': 'PlasticityMechanism'}, None), - MemberSpec_('block_mechanism', 'BlockMechanism', 0, 1, {'minOccurs': '0', 'name': 'blockMechanism', 'type': 'BlockMechanism'}, None), + MemberSpec_('plasticity_mechanism', 'PlasticityMechanism', 0, 1, {u'type': u'PlasticityMechanism', u'name': u'plasticityMechanism', u'minOccurs': u'0'}, None), + MemberSpec_('block_mechanism', 'BlockMechanism', 0, 1, {u'type': u'BlockMechanism', u'name': u'blockMechanism', u'minOccurs': u'0'}, None), ] subclass = None superclass = ExpTwoSynapse - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, plasticity_mechanism=None, block_mechanism=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, gbase=None, erev=None, tau_decay=None, tau_rise=None, plasticity_mechanism=None, block_mechanism=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("BlockingPlasticSynapse"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) + super(BlockingPlasticSynapse, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, gbase, erev, tau_decay, tau_rise, **kwargs_) self.plasticity_mechanism = plasticity_mechanism - self.plasticity_mechanism_nsprefix_ = None self.block_mechanism = block_mechanism - self.block_mechanism_nsprefix_ = None def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31676,18 +23586,6 @@ def factory(*args_, **kwargs_): else: return BlockingPlasticSynapse(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix - def get_plasticityMechanism(self): - return self.plasticity_mechanism - def set_plasticityMechanism(self, plasticity_mechanism): - self.plasticity_mechanism = plasticity_mechanism - def get_blockMechanism(self): - return self.block_mechanism - def set_blockMechanism(self, block_mechanism): - self.block_mechanism = block_mechanism def hasContent_(self): if ( self.plasticity_mechanism is not None or @@ -31705,10 +23603,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'BlockingPlasticSynapse': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31723,39 +23619,33 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='B def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='BlockingPlasticSynapse'): super(BlockingPlasticSynapse, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='BlockingPlasticSynapse') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='BlockingPlasticSynapse', fromsubclass_=False, pretty_print=True): - super(BlockingPlasticSynapse, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) + super(BlockingPlasticSynapse, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) if pretty_print: eol_ = '\n' else: eol_ = '' if self.plasticity_mechanism is not None: - namespaceprefix_ = self.plasticity_mechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.plasticity_mechanism_nsprefix_) else '' self.plasticity_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plasticityMechanism', pretty_print=pretty_print) if self.block_mechanism is not None: - namespaceprefix_ = self.block_mechanism_nsprefix_ + ':' if (UseCapturedNS_ and self.block_mechanism_nsprefix_) else '' self.block_mechanism.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockMechanism', pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(BlockingPlasticSynapse, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'plasticityMechanism': obj_ = PlasticityMechanism.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.plasticity_mechanism = obj_ obj_.original_tagname_ = 'plasticityMechanism' elif nodeName_ == 'blockMechanism': obj_ = BlockMechanism.factory(parent_object_=self) - obj_.build(child_, gds_collector_=gds_collector_) + obj_.build(child_) self.block_mechanism = obj_ obj_.original_tagname_ = 'blockMechanism' super(BlockingPlasticSynapse, self).buildChildren(child_, node, nodeName_, True) @@ -31763,18 +23653,14 @@ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collec class EIF_cond_alpha_isfa_ista(EIF_cond_exp_isfa_ista): - __hash__ = GeneratedsSuper.__hash__ member_data_items_ = [ ] subclass = None superclass = EIF_cond_exp_isfa_ista - def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, gds_collector_=None, **kwargs_): - self.gds_collector_ = gds_collector_ - self.gds_elementtree_node_ = None + def __init__(self, neuro_lex_id=None, id=None, metaid=None, notes=None, properties=None, annotation=None, cm=None, i_offset=None, tau_syn_E=None, tau_syn_I=None, v_init=None, tau_m=None, tau_refrac=None, v_reset=None, v_rest=None, v_thresh=None, e_rev_E=None, e_rev_I=None, a=None, b=None, delta_T=None, tau_w=None, v_spike=None, **kwargs_): self.original_tagname_ = None self.parent_object_ = kwargs_.get('parent_object_') - self.ns_prefix_ = None - super(globals().get("EIF_cond_alpha_isfa_ista"), self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) + super(EIF_cond_alpha_isfa_ista, self).__init__(neuro_lex_id, id, metaid, notes, properties, annotation, cm, i_offset, tau_syn_E, tau_syn_I, v_init, tau_m, tau_refrac, v_reset, v_rest, v_thresh, e_rev_E, e_rev_I, a, b, delta_T, tau_w, v_spike, **kwargs_) def factory(*args_, **kwargs_): if CurrentSubclassModule_ is not None: subclass = getSubclassFromModule_( @@ -31786,10 +23672,6 @@ def factory(*args_, **kwargs_): else: return EIF_cond_alpha_isfa_ista(*args_, **kwargs_) factory = staticmethod(factory) - def get_ns_prefix_(self): - return self.ns_prefix_ - def set_ns_prefix_(self, ns_prefix): - self.ns_prefix_ = ns_prefix def hasContent_(self): if ( super(EIF_cond_alpha_isfa_ista, self).hasContent_() @@ -31805,10 +23687,8 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E eol_ = '\n' else: eol_ = '' - if self.original_tagname_ is not None and name_ == 'EIF_cond_alpha_isfa_ista': + if self.original_tagname_ is not None: name_ = self.original_tagname_ - if UseCapturedNS_ and self.ns_prefix_: - namespaceprefix_ = self.ns_prefix_ + ':' showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() @@ -31823,21 +23703,17 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='E def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='EIF_cond_alpha_isfa_ista'): super(EIF_cond_alpha_isfa_ista, self).exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='EIF_cond_alpha_isfa_ista') def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='EIF_cond_alpha_isfa_ista', fromsubclass_=False, pretty_print=True): - super(EIF_cond_alpha_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, namespacedef_, name_, True, pretty_print=pretty_print) - def build(self, node, gds_collector_=None): - self.gds_collector_ = gds_collector_ - if SaveElementTreeNode: - self.gds_elementtree_node_ = node + super(EIF_cond_alpha_isfa_ista, self).exportChildren(outfile, level, namespaceprefix_, name_, True, pretty_print=pretty_print) + def build(self, node): already_processed = set() - self.ns_prefix_ = node.prefix self.buildAttributes(node, node.attrib, already_processed) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] - self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_) + self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): super(EIF_cond_alpha_isfa_ista, self).buildAttributes(node, attrs, already_processed) - def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None): + def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): super(EIF_cond_alpha_isfa_ista, self).buildChildren(child_, node, nodeName_, True) pass # end class EIF_cond_alpha_isfa_ista @@ -31866,26 +23742,7 @@ def get_root_tag(node): return tag, rootClass -def get_required_ns_prefix_defs(rootNode): - '''Get all name space prefix definitions required in this XML doc. - Return a dictionary of definitions and a char string of definitions. - ''' - nsmap = { - prefix: uri - for node in rootNode.iter() - for (prefix, uri) in node.nsmap.items() - if prefix is not None - } - namespacedefs = ' '.join([ - 'xmlns:{}="{}"'.format(prefix, uri) - for prefix, uri in nsmap.items() - ]) - return nsmap, namespacedefs - - -def parse(inFileName, silence=False, print_warnings=True): - global CapturedNsmap_ - gds_collector = GdsCollector_() +def parse(inFileName, silence=False): parser = None doc = parsexml_(inFileName, parser) rootNode = doc.getroot() @@ -31894,65 +23751,43 @@ def parse(inFileName, silence=False, print_warnings=True): rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode, gds_collector_=gds_collector) - CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode) - if not SaveElementTreeNode: - doc = None - rootNode = None - if not silence: - sys.stdout.write('\n') - rootObj.export( - sys.stdout, 0, name_=rootTag, - namespacedef_=namespacedefs, - pretty_print=True) - if print_warnings and len(gds_collector.get_messages()) > 0: - separator = ('-' * 50) + '\n' - sys.stderr.write(separator) - sys.stderr.write('----- Warnings -- count: {} -----\n'.format( - len(gds_collector.get_messages()), )) - gds_collector.write_messages(sys.stderr) - sys.stderr.write(separator) + rootObj.build(rootNode) + # Enable Python to collect the space used by the DOM. + doc = None +## if not silence: +## sys.stdout.write('\n') +## rootObj.export( +## sys.stdout, 0, name_=rootTag, +## namespacedef_='', +## pretty_print=True) return rootObj -def parseEtree(inFileName, silence=False, print_warnings=True, - mapping=None, nsmap=None): +def parseEtree(inFileName, silence=False): parser = None doc = parsexml_(inFileName, parser) - gds_collector = GdsCollector_() rootNode = doc.getroot() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode, gds_collector_=gds_collector) + rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. - if mapping is None: - mapping = {} - rootElement = rootObj.to_etree( - None, name_=rootTag, mapping_=mapping, nsmap_=nsmap) + doc = None + mapping = {} + rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping) reverse_mapping = rootObj.gds_reverse_node_mapping(mapping) - if not SaveElementTreeNode: - doc = None - rootNode = None - if not silence: - content = etree_.tostring( - rootElement, pretty_print=True, - xml_declaration=True, encoding="utf-8") - sys.stdout.write(str(content)) - sys.stdout.write('\n') - if print_warnings and len(gds_collector.get_messages()) > 0: - separator = ('-' * 50) + '\n' - sys.stderr.write(separator) - sys.stderr.write('----- Warnings -- count: {} -----\n'.format( - len(gds_collector.get_messages()), )) - gds_collector.write_messages(sys.stderr) - sys.stderr.write(separator) +## if not silence: +## content = etree_.tostring( +## rootElement, pretty_print=True, +## xml_declaration=True, encoding="utf-8") +## sys.stdout.write(content) +## sys.stdout.write('\n') return rootObj, rootElement, mapping, reverse_mapping -def parseString(inString, silence=False, print_warnings=True): +def parseString(inString, silence=False): '''Parse a string, create the object tree, and export it. Arguments: @@ -31963,58 +23798,39 @@ def parseString(inString, silence=False, print_warnings=True): ''' parser = None rootNode= parsexmlstring_(inString, parser) - gds_collector = GdsCollector_() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode, gds_collector_=gds_collector) - if not SaveElementTreeNode: - rootNode = None - if not silence: - sys.stdout.write('\n') - rootObj.export( - sys.stdout, 0, name_=rootTag, - namespacedef_='') - if print_warnings and len(gds_collector.get_messages()) > 0: - separator = ('-' * 50) + '\n' - sys.stderr.write(separator) - sys.stderr.write('----- Warnings -- count: {} -----\n'.format( - len(gds_collector.get_messages()), )) - gds_collector.write_messages(sys.stderr) - sys.stderr.write(separator) + rootObj.build(rootNode) + # Enable Python to collect the space used by the DOM. +## if not silence: +## sys.stdout.write('\n') +## rootObj.export( +## sys.stdout, 0, name_=rootTag, +## namespacedef_='') return rootObj -def parseLiteral(inFileName, silence=False, print_warnings=True): +def parseLiteral(inFileName, silence=False): parser = None doc = parsexml_(inFileName, parser) - gds_collector = GdsCollector_() rootNode = doc.getroot() rootTag, rootClass = get_root_tag(rootNode) if rootClass is None: rootTag = 'Property' rootClass = Property rootObj = rootClass.factory() - rootObj.build(rootNode, gds_collector_=gds_collector) + rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. - if not SaveElementTreeNode: - doc = None - rootNode = None - if not silence: - sys.stdout.write('#from nml import *\n\n') - sys.stdout.write('import nml as model_\n\n') - sys.stdout.write('rootObj = model_.rootClass(\n') - rootObj.exportLiteral(sys.stdout, 0, name_=rootTag) - sys.stdout.write(')\n') - if print_warnings and len(gds_collector.get_messages()) > 0: - separator = ('-' * 50) + '\n' - sys.stderr.write(separator) - sys.stderr.write('----- Warnings -- count: {} -----\n'.format( - len(gds_collector.get_messages()), )) - gds_collector.write_messages(sys.stderr) - sys.stderr.write(separator) + doc = None +## if not silence: +## sys.stdout.write('#from nml import *\n\n') +## sys.stdout.write('import nml as model_\n\n') +## sys.stdout.write('rootObj = model_.rootClass(\n') +## rootObj.exportLiteral(sys.stdout, 0, name_=rootTag) +## sys.stdout.write(')\n') return rootObj @@ -32030,670 +23846,6 @@ def main(): #import pdb; pdb.set_trace() main() -RenameMappings_ = { -} - -# -# Mapping of namespaces to types defined in them -# and the file in which each is defined. -# simpleTypes are marked "ST" and complexTypes "CT". -NamespaceToDefMappings_ = {'http://www.neuroml.org/schema/neuroml2': [('NmlId', 'NeuroML_v2.1.xsd', 'ST'), - ('Nml2Quantity', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_none', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_voltage', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_length', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_resistance', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_conductance', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_conductanceDensity', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_permeability', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_time', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_pertime', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_capacitance', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_specificCapacitance', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_concentration', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_current', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_currentDensity', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_temperature', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_rhoFactor', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Nml2Quantity_conductancePerVoltage', - 'NeuroML_v2.1.xsd', - 'ST'), - ('MetaId', - 'NeuroML_v2.1.xsd', - 'ST'), - ('NeuroLexId', - 'NeuroML_v2.1.xsd', - 'ST'), - ('NonNegativeInteger', - 'NeuroML_v2.1.xsd', - 'ST'), - ('PositiveInteger', - 'NeuroML_v2.1.xsd', - 'ST'), - ('DoubleGreaterThanZero', - 'NeuroML_v2.1.xsd', - 'ST'), - ('ZeroOrOne', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Notes', 'NeuroML_v2.1.xsd', 'ST'), - ('ZeroToOne', - 'NeuroML_v2.1.xsd', - 'ST'), - ('channelTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('gateTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('BlockTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('PlasticityTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Metric', - 'NeuroML_v2.1.xsd', - 'ST'), - ('networkTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('allowedSpaces', - 'NeuroML_v2.1.xsd', - 'ST'), - ('populationTypes', - 'NeuroML_v2.1.xsd', - 'ST'), - ('Property', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Annotation', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ComponentType', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Constant', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Exposure', - 'NeuroML_v2.1.xsd', - 'CT'), - ('NamedDimensionalType', - 'NeuroML_v2.1.xsd', - 'CT'), - ('NamedDimensionalVariable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Parameter', - 'NeuroML_v2.1.xsd', - 'CT'), - ('LEMS_Property', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Requirement', - 'NeuroML_v2.1.xsd', - 'CT'), - ('InstanceRequirement', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Dynamics', - 'NeuroML_v2.1.xsd', - 'CT'), - ('DerivedVariable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('StateVariable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ConditionalDerivedVariable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Case', 'NeuroML_v2.1.xsd', 'CT'), - ('TimeDerivative', - 'NeuroML_v2.1.xsd', - 'CT'), - ('NeuroMLDocument', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IncludeType', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IonChannelScalable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IonChannelKS', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IonChannel', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IonChannelHH', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IonChannelVShift', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Q10ConductanceScaling', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ClosedState', - 'NeuroML_v2.1.xsd', - 'CT'), - ('OpenState', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ForwardTransition', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ReverseTransition', - 'NeuroML_v2.1.xsd', - 'CT'), - ('TauInfTransition', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateKS', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHUndetermined', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHRates', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHTauInf', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHRatesTauInf', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHRatesTau', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHRatesInf', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateHHInstantaneous', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateFractional', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GateFractionalSubgate', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Q10Settings', - 'NeuroML_v2.1.xsd', - 'CT'), - ('HHRate', - 'NeuroML_v2.1.xsd', - 'CT'), - ('HHVariable', - 'NeuroML_v2.1.xsd', - 'CT'), - ('HHTime', - 'NeuroML_v2.1.xsd', - 'CT'), - ('DecayingPoolConcentrationModel', - 'NeuroML_v2.1.xsd', - 'CT'), - ('FixedFactorConcentrationModel', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseVoltageDepSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseCurrentBasedSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseConductanceBasedSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseConductanceBasedSynapseTwo', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GapJunction', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SilentSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('LinearGradedSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GradedSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('AlphaCurrentSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('AlphaSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExpOneSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExpTwoSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExpThreeSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('DoubleSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BlockingPlasticSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BlockMechanism', - 'NeuroML_v2.1.xsd', - 'CT'), - ('PlasticityMechanism', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IafTauCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IafTauRefCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IafCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IafRefCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IzhikevichCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseCellMembPotCap', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Izhikevich2007Cell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('AdExIaFCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('FitzHughNagumoCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('FitzHughNagumo1969Cell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('PinskyRinzelCA3Cell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Cell', 'NeuroML_v2.1.xsd', 'CT'), - ('Cell2CaPools', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Morphology', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Segment', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SegmentParent', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Point3DWithDiam', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SegmentGroup', - 'NeuroML_v2.1.xsd', - 'CT'), - ('InhomogeneousParameter', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ProximalDetails', - 'NeuroML_v2.1.xsd', - 'CT'), - ('DistalDetails', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Member', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Include', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Path', 'NeuroML_v2.1.xsd', 'CT'), - ('SubTree', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SegmentEndPoint', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BiophysicalProperties', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BiophysicalProperties2CaPools', - 'NeuroML_v2.1.xsd', - 'CT'), - ('MembraneProperties', - 'NeuroML_v2.1.xsd', - 'CT'), - ('MembraneProperties2CaPools', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeThresh', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpecificCapacitance', - 'NeuroML_v2.1.xsd', - 'CT'), - ('InitMembPotential', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Resistivity', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelPopulation', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityNonUniform', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityNonUniformNernst', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityNonUniformGHK', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensity', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityVShift', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityNernst', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityNernstCa2', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityGHK', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ChannelDensityGHK2', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ValueAcrossSegOrSegGroup', - 'NeuroML_v2.1.xsd', - 'CT'), - ('VariableParameter', - 'NeuroML_v2.1.xsd', - 'CT'), - ('InhomogeneousValue', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Species', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ConcentrationModel_D', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IntracellularProperties', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IntracellularProperties2CaPools', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExtracellularProperties', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExtracellularPropertiesLocal', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ReactionScheme', - 'NeuroML_v2.1.xsd', - 'CT'), - ('PulseGenerator', - 'NeuroML_v2.1.xsd', - 'CT'), - ('PulseGeneratorDL', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SineGenerator', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SineGeneratorDL', - 'NeuroML_v2.1.xsd', - 'CT'), - ('RampGenerator', - 'NeuroML_v2.1.xsd', - 'CT'), - ('RampGeneratorDL', - 'NeuroML_v2.1.xsd', - 'CT'), - ('CompoundInput', - 'NeuroML_v2.1.xsd', - 'CT'), - ('CompoundInputDL', - 'NeuroML_v2.1.xsd', - 'CT'), - ('VoltageClamp', - 'NeuroML_v2.1.xsd', - 'CT'), - ('VoltageClampTriple', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Spike', 'NeuroML_v2.1.xsd', 'CT'), - ('SpikeArray', - 'NeuroML_v2.1.xsd', - 'CT'), - ('TimedSynapticInput', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeGenerator', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeGeneratorRandom', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeGeneratorPoisson', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeGeneratorRefPoisson', - 'NeuroML_v2.1.xsd', - 'CT'), - ('PoissonFiringSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('TransientPoissonFiringSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Network', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Space', 'NeuroML_v2.1.xsd', 'CT'), - ('SpaceStructure', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Region', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Population', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Layout', - 'NeuroML_v2.1.xsd', - 'CT'), - ('UnstructuredLayout', - 'NeuroML_v2.1.xsd', - 'CT'), - ('RandomLayout', - 'NeuroML_v2.1.xsd', - 'CT'), - ('GridLayout', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Instance', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Location', - 'NeuroML_v2.1.xsd', - 'CT'), - ('CellSet', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SynapticConnection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseProjection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Projection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseConnection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseConnectionOldFormat', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseConnectionNewFormat', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Connection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ConnectionWD', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ElectricalProjection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ElectricalConnection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ElectricalConnectionInstance', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ElectricalConnectionInstanceW', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ContinuousProjection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ContinuousConnection', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ContinuousConnectionInstance', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ContinuousConnectionInstanceW', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExplicitInput', - 'NeuroML_v2.1.xsd', - 'CT'), - ('InputList', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Input', 'NeuroML_v2.1.xsd', 'CT'), - ('InputW', - 'NeuroML_v2.1.xsd', - 'CT'), - ('basePyNNCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('basePyNNIaFCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('basePyNNIaFCondCell', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IF_curr_alpha', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IF_curr_exp', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IF_cond_alpha', - 'NeuroML_v2.1.xsd', - 'CT'), - ('IF_cond_exp', - 'NeuroML_v2.1.xsd', - 'CT'), - ('EIF_cond_exp_isfa_ista', - 'NeuroML_v2.1.xsd', - 'CT'), - ('EIF_cond_alpha_isfa_ista', - 'NeuroML_v2.1.xsd', - 'CT'), - ('HH_cond_exp', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BasePynnSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExpCondSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('AlphaCondSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('ExpCurrSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('AlphaCurrSynapse', - 'NeuroML_v2.1.xsd', - 'CT'), - ('SpikeSourcePoisson', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseWithoutId', - 'NeuroML_v2.1.xsd', - 'CT'), - ('BaseNonNegativeIntegerId', - 'NeuroML_v2.1.xsd', - 'CT'), - ('Base', 'NeuroML_v2.1.xsd', 'CT'), - ('Standalone', - 'NeuroML_v2.1.xsd', - 'CT')]} __all__ = [ "AdExIaFCell", From 56eeabb0fcc7e0d209e71cc00b7034486dc87ee5 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 26 Mar 2021 16:35:29 +0000 Subject: [PATCH 27/27] docs: add extra requirements for doc generation --- doc/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..ef36addc --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1 @@ +sphinxcontrib-bibtex