| @@ 7241-7263 (lines=23) @@ | ||
| 7238 | return self.get_AllIndexed() |
|
| 7239 | ||
| 7240 | # pylint: disable=line-too-long,invalid-name,missing-module-docstring,missing-function-docstring |
|
| 7241 | def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='OrderedGroupType', fromsubclass_=False, pretty_print=True): # pylint: disable=unused-argument,too-many-arguments |
|
| 7242 | namespaceprefix_ = 'pc:' |
|
| 7243 | if self.UserDefined is not None: |
|
| 7244 | self.UserDefined.export(outfile, level, namespaceprefix_, namespacedef_='', name_='UserDefined', pretty_print=pretty_print) |
|
| 7245 | for Labels_ in self.Labels: |
|
| 7246 | Labels_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Labels', pretty_print=pretty_print) |
|
| 7247 | cleaned = [] |
|
| 7248 | def replaceWithRRI(group): |
|
| 7249 | rri = RegionRefIndexedType.factory(parent_object_=self) # pylint: disable=undefined-variable |
|
| 7250 | rri.index = group.index |
|
| 7251 | rri.regionRef = group.regionRef |
|
| 7252 | cleaned.append(rri) |
|
| 7253 | # remove empty groups and replace with RegionRefIndexedType |
|
| 7254 | for entry in self.get_AllIndexed(): |
|
| 7255 | # pylint: disable=undefined-variable |
|
| 7256 | if isinstance(entry, (OrderedGroupIndexedType)) and not entry.get_AllIndexed(): |
|
| 7257 | replaceWithRRI(entry) |
|
| 7258 | elif isinstance(entry, UnorderedGroupIndexedType) and not entry.get_UnorderedGroupChildren(): |
|
| 7259 | replaceWithRRI(entry) |
|
| 7260 | else: |
|
| 7261 | cleaned.append(entry) |
|
| 7262 | for entry in cleaned: |
|
| 7263 | entry.export(outfile, level, namespaceprefix_, namespacedef_='', name_=entry.__class__.__name__[:-4], pretty_print=pretty_print) |
|
| 7264 | # end class OrderedGroupType |
|
| 7265 | ||
| 7266 | ||
| @@ 6309-6331 (lines=23) @@ | ||
| 6306 | return self.get_AllIndexed() |
|
| 6307 | ||
| 6308 | # pylint: disable=line-too-long,invalid-name,missing-module-docstring,missing-function-docstring |
|
| 6309 | def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='OrderedGroupType', fromsubclass_=False, pretty_print=True): # pylint: disable=unused-argument,too-many-arguments |
|
| 6310 | namespaceprefix_ = 'pc:' |
|
| 6311 | if self.UserDefined is not None: |
|
| 6312 | self.UserDefined.export(outfile, level, namespaceprefix_, namespacedef_='', name_='UserDefined', pretty_print=pretty_print) |
|
| 6313 | for Labels_ in self.Labels: |
|
| 6314 | Labels_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Labels', pretty_print=pretty_print) |
|
| 6315 | cleaned = [] |
|
| 6316 | def replaceWithRRI(group): |
|
| 6317 | rri = RegionRefIndexedType.factory(parent_object_=self) # pylint: disable=undefined-variable |
|
| 6318 | rri.index = group.index |
|
| 6319 | rri.regionRef = group.regionRef |
|
| 6320 | cleaned.append(rri) |
|
| 6321 | # remove empty groups and replace with RegionRefIndexedType |
|
| 6322 | for entry in self.get_AllIndexed(): |
|
| 6323 | # pylint: disable=undefined-variable |
|
| 6324 | if isinstance(entry, (OrderedGroupIndexedType)) and not entry.get_AllIndexed(): |
|
| 6325 | replaceWithRRI(entry) |
|
| 6326 | elif isinstance(entry, UnorderedGroupIndexedType) and not entry.get_UnorderedGroupChildren(): |
|
| 6327 | replaceWithRRI(entry) |
|
| 6328 | else: |
|
| 6329 | cleaned.append(entry) |
|
| 6330 | for entry in cleaned: |
|
| 6331 | entry.export(outfile, level, namespaceprefix_, namespacedef_='', name_=entry.__class__.__name__[:-4], pretty_print=pretty_print) |
|
| 6332 | # end class OrderedGroupIndexedType |
|
| 6333 | ||
| 6334 | ||
| @@ 2-24 (lines=23) @@ | ||
| 1 | # pylint: disable=line-too-long,invalid-name,missing-module-docstring,missing-function-docstring |
|
| 2 | def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='OrderedGroupType', fromsubclass_=False, pretty_print=True): # pylint: disable=unused-argument,too-many-arguments |
|
| 3 | namespaceprefix_ = 'pc:' |
|
| 4 | if self.UserDefined is not None: |
|
| 5 | self.UserDefined.export(outfile, level, namespaceprefix_, namespacedef_='', name_='UserDefined', pretty_print=pretty_print) |
|
| 6 | for Labels_ in self.Labels: |
|
| 7 | Labels_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='Labels', pretty_print=pretty_print) |
|
| 8 | cleaned = [] |
|
| 9 | def replaceWithRRI(group): |
|
| 10 | rri = RegionRefIndexedType.factory(parent_object_=self) # pylint: disable=undefined-variable |
|
| 11 | rri.index = group.index |
|
| 12 | rri.regionRef = group.regionRef |
|
| 13 | cleaned.append(rri) |
|
| 14 | # remove empty groups and replace with RegionRefIndexedType |
|
| 15 | for entry in self.get_AllIndexed(): |
|
| 16 | # pylint: disable=undefined-variable |
|
| 17 | if isinstance(entry, (OrderedGroupIndexedType)) and not entry.get_AllIndexed(): |
|
| 18 | replaceWithRRI(entry) |
|
| 19 | elif isinstance(entry, UnorderedGroupIndexedType) and not entry.get_UnorderedGroupChildren(): |
|
| 20 | replaceWithRRI(entry) |
|
| 21 | else: |
|
| 22 | cleaned.append(entry) |
|
| 23 | for entry in cleaned: |
|
| 24 | entry.export(outfile, level, namespaceprefix_, namespacedef_='', name_=entry.__class__.__name__[:-4], pretty_print=pretty_print) |
|
| 25 | ||