def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.line_stream, produces=FORMAT.record) self.current_record = None
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.string) self.cur_file_path = self.cfg.get('file_path')
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.record_array) self.refiners = dict()
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_element, produces=FORMAT.etree_element) # Create specific preparer object from given class name string self.prep_class = self.cfg.get('prep_class') self.prep_class = factory.class_forname(self.prep_class) self.preparer = self.prep_class('stetl')
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.any, produces=FORMAT.any) self.packet_list = []
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.record_array) self.current_record = None
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.string, produces=FORMAT.etree_element) self.context = None self.root = None self.cur_file_path = None self.elem_count = 0 log.info("Element tags to be matched: %s" % self.element_tags)
def __init__(self, configdict, section='gml_splitter'): Filter.__init__(self, configdict, section, consumes=FORMAT.xml_line_stream, produces=FORMAT.etree_doc) log.info("cfg = %s" % self.cfg.to_string()) self.max_features = self.cfg.get_int('max_features', 10000) # File preamble self.start_container = self.cfg.get('start_container') # File postamble self.end_container = self.cfg.get('end_container') self.container_tag = self.cfg.get('container_tag') # self.feature_tags = self.cfg.get('feature_tags').split(',') self.start_feature_markers = self.cfg.get('start_feature_markers').split(',') self.end_feature_markers = self.cfg.get('end_feature_markers').split(',') self.feature_count = 0 self.total_feature_count = 0 self.in_heading = True # End of file is line with end_container_tag self.end_container_tag = '</%s' % self.container_tag # Derive start and end tags from feature_tags # for feature_tag in self.feature_tags: # self.start_feature_markers.append('<%s' % feature_tag) # self.end_feature_markers.append('</%s>' % feature_tag) self.expect_end_feature_markers = [] self.expect_end_feature_tag = None self.buffer = None # Reusable XML parser self.xml_parser = etree.XMLParser(remove_blank_text=True)
def __init__(self, configdict, section, vsiname): Filter.__init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.string) self.vsiname = vsiname
def __init__(self, configdict, section='gml_splitter'): Filter.__init__(self, configdict, section, consumes=FORMAT.xml_line_stream, produces=FORMAT.etree_doc) log.info("cfg = %s" % self.cfg.to_string()) self.max_features = self.cfg.get_int('max_features', 10000) # File preamble self.start_container = self.cfg.get('start_container') # File postamble self.end_container = self.cfg.get('end_container') self.container_tag = self.cfg.get('container_tag') # self.feature_tags = self.cfg.get('feature_tags').split(',') self.start_feature_markers = self.cfg.get( 'start_feature_markers').split(',') self.end_feature_markers = self.cfg.get('end_feature_markers').split( ',') self.feature_count = 0 self.total_feature_count = 0 self.in_heading = True # End of file is line with end_container_tag self.end_container_tag = '</%s' % self.container_tag # Derive start and end tags from feature_tags # for feature_tag in self.feature_tags: # self.start_feature_markers.append('<%s' % feature_tag) # self.end_feature_markers.append('</%s>' % feature_tag) self.expect_end_feature_markers = [] self.expect_end_feature_tag = None self.buffer = None # Reusable XML parser self.xml_parser = etree.XMLParser(remove_blank_text=True)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.any, produces=FORMAT.any) self.converter = None
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.any, produces=FORMAT.string) log.info("working dir %s" % os.getcwd())
def __init__(self, configdict, section, consumes=FORMAT.string, produces=FORMAT.record): Filter.__init__(self, configdict, section, consumes, produces) self.regex_object = re.compile(self.pattern_string, re.S)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_doc) self.xslt_file = open(self.script, 'r') # Parse XSLT file only once self.xslt_doc = etree.parse(self.xslt_file) self.xslt_obj = etree.XSLT(self.xslt_doc) self.xslt_file.close()
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_doc) self.xslt_file_path = self.cfg.get('script') self.xslt_file = open(self.xslt_file_path, 'r') # Parse XSLT file only once self.xslt_doc = etree.parse(self.xslt_file) self.xslt_obj = etree.XSLT(self.xslt_doc) self.xslt_file.close()
def __init__(self, configdict, section, consumes, produces): Filter.__init__(self, configdict, section, consumes=consumes, produces=produces) self.input_archive_file = None if not os.path.exists(self.target_dir): os.mkdir(self.target_dir)
def __init__(self, configdict, section, consumes=FORMAT.any, produces=FORMAT.string): Filter.__init__(self, configdict, section, consumes=consumes, produces=produces)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.record_array) self.current_record = None self.last_id = None self.device = Josene() self.sensor_defs = self.device.get_sensor_defs()
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_element_stream, produces=FORMAT.etree_element_stream) # Create specific preparer object from given class name string self.prep_class = self.cfg.get('prep_class') self.prep_class = factory.class_forname(self.prep_class) self.preparer = self.prep_class('stetl')
def __init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.record): Filter.__init__(self, configdict, section, consumes, produces) self.pipeline = None self.current_target = None self.current_target_id = None self.other_targets = None self._filter = ['s_coresistance', 's_no2resistance', 's_o3resistance'] self._return_gs_elem = ['cv_results_', 'best_estimator_', 'best_score_', 'best_params_', 'best_index_', 'scorer_', 'n_splits_'] self.sensor_defs = Josene().get_sensor_defs()
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_element, produces=FORMAT.etree_doc) log.info("cfg = %s" % self.cfg.to_string()) self.max_elements = self.cfg.get_int('max_elements', 10000) self.container_doc = self.cfg.get('container_doc') self.element_container_xpath = XmlAssembler.xpath_base % self.cfg.get('element_container_tag') self.total_element_count = 0 self.element_arr = [] # Reusable XML parser self.xml_parser = etree.XMLParser(remove_blank_text=True)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_doc) self.enabled = self.cfg.get_bool('enabled', True) self.xsd = self.cfg.get('xsd') log.info( "Building the Schema once with (GML XSD) dependencies for schema=%s (be patient...)" % self.xsd) self.schema = etree.XMLSchema(etree.parse(self.xsd))
def __init__(self, configdict, section='gml_feature_extractor'): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_feature_array) log.info("cfg = %s" % self.cfg.to_string()) # Build the Xpath expresion from configures tagnames self.feature_tags = self.cfg.get('feature_tags').split(',') self.total_features = 0 self.xpath_expression = '' index = 0 for feature_tag in self.feature_tags: if index > 0: self.xpath_expression += '|' self.xpath_expression += GmlFeatureExtractor.xpath_base % feature_tag index += 1 log.info("xpath expression = %s" % self.xpath_expression)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_element_stream, produces=FORMAT.etree_doc) log.info("cfg = %s" % self.cfg.to_string()) self.max_elements = self.cfg.get_int('max_elements', 10000) self.container_doc = self.cfg.get('container_doc') self.element_container_xpath = XmlAssembler.xpath_base % self.cfg.get( 'element_container_tag') self.total_element_count = 0 self.element_arr = [] # Reusable XML parser self.xml_parser = etree.XMLParser(remove_blank_text=True)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.geojson_collection, produces=FORMAT.geojson_collection)
def __init__(self, configdict, section, consumes=FORMAT.any, produces=FORMAT.any): Filter.__init__(self, configdict, section, consumes, produces)
def __init__(self, configdict, section, consumes, produces): Filter.__init__(self, configdict, section, consumes, produces)
def __init__(self, configdict, section, consumes=FORMAT.string, produces=FORMAT.string): Filter.__init__(self, configdict, section, consumes, produces)
def __init__(self, config_dict, section): Filter.__init__(self, config_dict, section, consumes=[FORMAT.record_array, FORMAT.record], produces=[FORMAT.record_array, FORMAT.record]) self.last_ids = None self.db = None
def __init__(self, configdict, section, consumes=FORMAT.record, produces=FORMAT.record): Filter.__init__(self, configdict, section, consumes, produces)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_doc)
def __init__(self, configdict, section): Filter.__init__(self, configdict, section, consumes=FORMAT.etree_doc, produces=FORMAT.etree_doc) self.enabled = self.cfg.get_bool('enabled', True) self.xsd = self.cfg.get('xsd') log.info("Building the Schema once with (GML XSD) dependencies for schema=%s (be patient...)" % self.xsd) self.schema = etree.XMLSchema(etree.parse(self.xsd))