Skip to content

Commit

Permalink
Merge pull request #21 from emdb-empiar/v3_0_9_0_admin
Browse files Browse the repository at this point in the history
V3 0 9 0 admin
  • Loading branch information
amudhakumari authored Oct 12, 2023
2 parents 0b074a1 + 19f2c2e commit d866177
Show file tree
Hide file tree
Showing 13 changed files with 98,452 additions and 49 deletions.
131 changes: 121 additions & 10 deletions emdb_schemas/current/emdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# -*- coding: utf-8 -*-

#
# Generated Tue Aug 1 11:24:30 2023 by generateDS.py version 2.41.5.
# Generated Tue Oct 3 16:35:59 2023 by generateDS.py version 2.41.5.
# Python 3.9.5 (default, May 18 2021, 12:31:01) [Clang 10.0.0 ]
#
# Command line options:
# ('--root-element', 'emd')
# ('-f', '')
# ('-o', 'emdb-schemas/emdb_schemas/v3/v3_0_8_0/emdb.py')
# ('-o', 'emdb-schemas/emdb_schemas/v3/v3_0_9_0/emdb.py')
# ('--no-warnings', '')
# ('--external-encoding', 'utf-8')
#
# Command line arguments:
# emdb-schemas/emdb_schemas/v3/v3_0_8_0/emdb.xsd
# emdb-schemas/emdb_schemas/v3/v3_0_9_0/emdb.xsd
#
# Command line:
# /Users/amudha/project/generateDS-2.41.5/generateDS.py --root-element="emd" -f -o "emdb-schemas/emdb_schemas/v3/v3_0_8_0/emdb.py" --no-warnings --external-encoding="utf-8" emdb-schemas/emdb_schemas/v3/v3_0_8_0/emdb.xsd
# /Users/amudha/project/generateDS-2.41.5/generateDS.py --root-element="emd" -f -o "emdb-schemas/emdb_schemas/v3/v3_0_9_0/emdb.py" --no-warnings --external-encoding="utf-8" emdb-schemas/emdb_schemas/v3/v3_0_9_0/emdb.xsd
#
# Current working directory (os.getcwd()):
# IdeaProjects
Expand Down Expand Up @@ -1765,7 +1765,7 @@ class entry_type(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, emdb_id=None, version='3.0.8.0', admin=None, crossreferences=None, sample=None, structure_determination_list=None, map=None, interpretation=None, validation=None, gds_collector_=None, **kwargs_):
def __init__(self, emdb_id=None, version='3.0.9.0', admin=None, crossreferences=None, sample=None, structure_determination_list=None, map=None, interpretation=None, validation=None, gds_collector_=None, **kwargs_):
self.gds_collector_ = gds_collector_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
Expand Down Expand Up @@ -1891,7 +1891,7 @@ def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_=
if self.emdb_id is not None and 'emdb_id' not in already_processed:
already_processed.add('emdb_id')
outfile.write(' emdb_id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.emdb_id), input_name='emdb_id')), ))
if self.version != "3.0.8.0" and 'version' not in already_processed:
if self.version != "3.0.9.0" and 'version' not in already_processed:
already_processed.add('version')
outfile.write(' version=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.version), input_name='version')), ))
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='entry_type', fromsubclass_=False, pretty_print=True):
Expand Down Expand Up @@ -1945,7 +1945,7 @@ def _buildAttributes(self, node, attrs, already_processed):
self.version = ' '.join(self.version.split())
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
if nodeName_ == 'admin':
obj_ = admin_type.factory(parent_object_=self)
obj_ = adminType.factory(parent_object_=self)
obj_.build(child_, gds_collector_=gds_collector_)
self.admin = obj_
obj_.original_tagname_ = 'admin'
Expand Down Expand Up @@ -1986,12 +1986,14 @@ class admin_type(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, status_history_list=None, current_status=None, sites=None, key_dates=None, obsolete_list=None, superseded_by_list=None, grant_support=None, microscopy_center=None, contact_author=None, title=None, authors_list=None, details=None, keywords=None, replace_existing_entry=None, gds_collector_=None, **kwargs_):
def __init__(self, composite_map=None, status_history_list=None, current_status=None, sites=None, key_dates=None, obsolete_list=None, superseded_by_list=None, grant_support=None, microscopy_center=None, contact_author=None, title=None, authors_list=None, details=None, keywords=None, replace_existing_entry=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.composite_map = _cast(bool, composite_map)
self.composite_map_nsprefix_ = None
self.status_history_list = status_history_list
self.status_history_list_nsprefix_ = None
self.current_status = current_status
Expand Down Expand Up @@ -2023,6 +2025,7 @@ def __init__(self, status_history_list=None, current_status=None, sites=None, ke
self.keywords_nsprefix_ = None
self.replace_existing_entry = replace_existing_entry
self.replace_existing_entry_nsprefix_ = None
self.extensiontype_ = extensiontype_
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
Expand Down Expand Up @@ -2100,6 +2103,12 @@ def get_replace_existing_entry(self):
return self.replace_existing_entry
def set_replace_existing_entry(self, replace_existing_entry):
self.replace_existing_entry = replace_existing_entry
def get_composite_map(self):
return self.composite_map
def set_composite_map(self, composite_map):
self.composite_map = composite_map
def get_extensiontype_(self): return self.extensiontype_
def set_extensiontype_(self, extensiontype_): self.extensiontype_ = extensiontype_
def has__content(self):
if (
self.status_history_list is not None or
Expand Down Expand Up @@ -2144,7 +2153,17 @@ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='a
else:
outfile.write('/>%s' % (eol_, ))
def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='admin_type'):
pass
if self.composite_map is not None and 'composite_map' not in already_processed:
already_processed.add('composite_map')
outfile.write(' composite_map="%s"' % self.gds_format_boolean(self.composite_map, input_name='composite_map'))
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_='admin_type', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
Expand Down Expand Up @@ -2208,7 +2227,19 @@ def build(self, node, gds_collector_=None):
self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
return self
def _buildAttributes(self, node, attrs, already_processed):
pass
value = find_attr_value_('composite_map', node)
if value is not None and 'composite_map' not in already_processed:
already_processed.add('composite_map')
if value in ('true', '1'):
self.composite_map = True
elif value in ('false', '0'):
self.composite_map = False
else:
raise_parse_error(node, 'Bad boolean attribute')
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):
if nodeName_ == 'status_history_list':
obj_ = version_list_type.factory(parent_object_=self)
Expand Down Expand Up @@ -23343,6 +23374,85 @@ def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_colle
# end class structure_factors_validation_type


class adminType(admin_type):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = admin_type
def __init__(self, composite_map=None, status_history_list=None, current_status=None, sites=None, key_dates=None, obsolete_list=None, superseded_by_list=None, grant_support=None, microscopy_center=None, contact_author=None, title=None, authors_list=None, details=None, keywords=None, replace_existing_entry=None, gds_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(globals().get("adminType"), self).__init__(composite_map, status_history_list, current_status, sites, key_dates, obsolete_list, superseded_by_list, grant_support, microscopy_center, contact_author, title, authors_list, details, keywords, replace_existing_entry, **kwargs_)
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, adminType)
if subclass is not None:
return subclass(*args_, **kwargs_)
if adminType.subclass:
return adminType.subclass(*args_, **kwargs_)
else:
return adminType(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ns_prefix_(self):
return self.ns_prefix_
def set_ns_prefix_(self, ns_prefix):
self.ns_prefix_ = ns_prefix
def has__content(self):
if (
super(adminType, self).has__content()
):
return True
else:
return False
def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='adminType', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('adminType')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None and name_ == 'adminType':
name_ = self.original_tagname_
if UseCapturedNS_ and self.ns_prefix_:
namespaceprefix_ = self.ns_prefix_ + ':'
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='adminType')
if self.has__content():
outfile.write('>%s' % (eol_, ))
self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='adminType', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='adminType'):
super(adminType, self)._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='adminType')
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='adminType', fromsubclass_=False, pretty_print=True):
super(adminType, 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_, gds_collector_=gds_collector_)
return self
def _buildAttributes(self, node, attrs, already_processed):
super(adminType, self)._buildAttributes(node, attrs, already_processed)
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
super(adminType, self)._buildChildren(child_, node, nodeName_, True)
pass
# end class adminType


class structure_determination_listType(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
Expand Down Expand Up @@ -44500,6 +44610,7 @@ def main():
"_n_linkType",
"acceleration_voltageType",
"additional_map_listType",
"adminType",
"admin_type",
"alignment_procedureType",
"amplitude_correctionType",
Expand Down
11 changes: 9 additions & 2 deletions emdb_schemas/current/emdb.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
<xs:element name="emd" type="entry_type"/>
<xs:complexType name="entry_type">
<xs:sequence>
<xs:element name="admin" type="admin_type"/>
<xs:element name="admin">
<xs:complexType>
<xs:complexContent>
<xs:extension base="admin_type"> </xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="crossreferences" type="crossreferences_type"/>
<xs:element name="sample" type="sample_type"/>
<xs:element name="structure_determination_list">
Expand All @@ -25,7 +31,7 @@
</xs:element>
</xs:sequence>
<xs:attribute name="emdb_id" type="emdb_id_type" use="required"/>
<xs:attribute name="version" type="xs:token" default="3.0.8.0"/>
<xs:attribute name="version" type="xs:token" default="3.0.9.0"/>
<!-- <xs:attribute name="composite_structure" type="xs:boolean"/> -->
</xs:complexType>
<xs:complexType name="admin_type">
Expand Down Expand Up @@ -136,6 +142,7 @@
<xs:element name="keywords" type="xs:string" minOccurs="0"/>
<xs:element name="replace_existing_entry" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="composite_map" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="version_list_type">
<xs:sequence>
Expand Down
Loading

0 comments on commit d866177

Please sign in to comment.