def ingest(self): """ Starts the ingesting process """ coverage = Coverage(self.coverage_id, [], None, None, None) importer = Importer(self.resumer, coverage, self.import_wms) if importer._is_insert(): self.__insert_coverage_request() else: self.__update_coverage_request() if self.import_wms: importer._insert_update_into_wms()
def _get_importer(self): """ Returns the importer :rtype: Importer """ if self.importer is None: self.importer = Importer(self.resumer, self._get_coverage(), self.options['wms_import'], self.options['scale_levels'], self.options['coverage']['grid_coverage']) return self.importer
def _get_importers(self): ret = [] convertors = self._get_convertors() for cov_id, conv in convertors.iteritems(): coverage_slices = conv.coverage_slices importer = Importer(conv.resumer, conv.to_coverage(coverage_slices), self.wms_import, self.scale_levels, self.grid_cov) ret.append(importer) return ret
def _get_importer(self): if self.importer is None: grid_coverage = False if 'coverage' in self.options: grid_coverage = self.options['coverage'][ 'grid_coverage'] if 'grid_coverage' in self.options[ 'coverage'] else False wms_import = self.options[ 'wms_import'] if 'wms_import' in self.options else False scale_levels = self.options['scale_levels'] if self.options[ 'scale_levels'] is not None else None self.importer = Importer(self.resumer, self._get_coverage(), wms_import, scale_levels, grid_coverage, self.session) return self.importer
def _get_importers(self): ret = [] convertors = self._get_convertors() for cov_id, conv in convertors.items(): coverage_slices = conv.coverage_slices coverages = conv.to_coverages(coverage_slices) for coverage in coverages: importer = Importer(conv.resumer, coverage, self.wms_import, self.scale_levels, self.grid_cov, self.session, self.options['scale_factors']) ret.append(importer) return ret
def _get_importer(self): """ Returns the importer :rtype: Importer """ if self.importer is None: coverages = self._get_coverages() importers = [] for coverage in coverages: importer = Importer(self.resumer, coverage, self.options['wms_import'], self.options['scale_levels'], self.options['coverage']['grid_coverage'], self.session, self.options['scale_factors']) importers.append(importer) self.importer = MultiImporter(importers) return self.importer
def _get_importer(self): if self.importer is None: grid_coverage = False if 'coverage' in self.options: grid_coverage = self.options['coverage']['grid_coverage'] if 'grid_coverage' in self.options['coverage'] else False wms_import = self.options['wms_import'] if 'wms_import' in self.options else False scale_levels = self.options['scale_levels'] if self.options['scale_levels'] is not None else None coverages = self._get_coverages() importers = [] for coverage in coverages: importers.append(Importer(self.resumer, coverage, wms_import, scale_levels, grid_coverage, self.session, self.options['scale_factors'])) self.importer = MultiImporter(importers) return self.importer
def __add_pyramid_bases(self): """ Add current importing coverage id to the listed pyramid members of pyramid_bases the ingredient files """ executor = ConfigManager.executor if self.session.pyramid_bases is not None: for base_coverage_id in self.session.pyramid_bases: base_pyramid_member_coverage_ids = Importer.list_pyramid_member_coverages( base_coverage_id, ConfigManager.mock) if self.coverage_id not in base_pyramid_member_coverage_ids: request = AddPyramidMemberRequest( base_coverage_id, self.coverage_id, self.session.pyramid_harvesting) executor.execute(request, mock=ConfigManager.mock, input_base_url=request.context_path)
def __add_pyramid_members(self): """ Add the listed pyramid members in the ingredient files to this base coverage """ executor = ConfigManager.executor base_coverage_id = self.coverage_id current_pyramid_member_coverage_ids = Importer.list_pyramid_member_coverages( base_coverage_id, ConfigManager.mock) # add listed pyramid members coverage ids in the ingredients file to this base coverage's pyramid if self.session.pyramid_members is not None: for pyramid_member_coverage_id in self.session.pyramid_members: if pyramid_member_coverage_id not in current_pyramid_member_coverage_ids: request = AddPyramidMemberRequest( self.coverage_id, pyramid_member_coverage_id, self.session.pyramid_harvesting) executor.execute(request, mock=ConfigManager.mock, input_base_url=request.context_path)
def _get_importer(self): if self.importer is None: self.importer = Importer(self.resumer, self._get_coverage()) return self.importer
def _get_importer(self): if self.importer is None: self.importer = Importer(self._get_coverage(), self.options['wms_import'], self.options['scale_levels'], False) return self.importer