def export(self, export_context, subdir, root=False): """ See IFilesystemExporter. """ FolderishExporterImporter.export(self, export_context, subdir, root) template = PageTemplateResource("xml/%s" % self._FILENAME, globals()).__of__(self.context) export_context.writeDataFile( "%s/criteria.xml" % self.context.getId(), template(info=self._getExportInfo()), "text/xml", subdir )
def export(self, export_context, subdir, root=False): """ See IFilesystemExporter. """ FolderishExporterImporter.export(self, export_context, subdir, root) template = PageTemplateResource('xml/%s' % self._FILENAME, globals()).__of__(self.context) export_context.writeDataFile('%s/criteria.xml' % self.context.getId(), template(info=self._getExportInfo()), 'text/xml', subdir, )
def listExportableItems(self): """ See IFilesystemExporter. """ criteria_metatypes = self.context._criteria_metatype_ids() return [ x for x in FolderishExporterImporter.listExportableItems(self) if x[1].meta_type not in criteria_metatypes ]
def import_(self, import_context, subdir, root=False): """ See IFilesystemImporter """ FolderishExporterImporter.import_(self, import_context, subdir, root) self.encoding = import_context.getEncoding() if import_context.shouldPurge(): self._purgeContext() data = import_context.readDataFile("%s/criteria.xml" % self.context.getId(), subdir) if data is not None: dom = parseString(data) root = dom.firstChild assert root.tagName == self._ROOT_TAGNAME self._updateFromDOM(root)
def listExportableItems(self): """ See IFilesystemExporter. """ criteria_metatypes = self.context._criteria_metatype_ids() return [ x for x in FolderishExporterImporter.listExportableItems(self) if x[1].meta_type not in criteria_metatypes ]
def import_(self, import_context, subdir, root=False): """ See IFilesystemImporter """ FolderishExporterImporter.import_(self, import_context, subdir, root) self.encoding = import_context.getEncoding() if import_context.shouldPurge(): self._purgeContext() data = import_context.readDataFile( '%s/criteria.xml' % self.context.getId(), subdir) if data is not None: dom = parseString(data) root = dom.firstChild assert root.tagName == self._ROOT_TAGNAME self._updateFromDOM(root)
def import_(self, import_context, subdir, root=False): """ See IFilesystemImporter. """ FolderishExporterImporter.import_(self, import_context, subdir, root)
def export(self, export_context, subdir, root=False): """ See IFilesystemExporter. """ FolderishExporterImporter.export(self, export_context, subdir, root)
def import_(self, import_context, subdir, root=False): """ See IFilesystemImporter. """ FolderishExporterImporter.import_(self, import_context, subdir, root)
def export(self, export_context, subdir, root=False): """ See IFilesystemExporter. """ FolderishExporterImporter.export(self, export_context, subdir, root)
def _mustPreserve(self): context = self.context keepers = FolderishExporterImporter._mustPreserve(self) keepers.extend(context.objectItems(context._criteria_metatype_ids())) return keepers