def __init__(self, tbhtags, content, rid, mods, config, type_str, file_path): UsableFlag.__init__(self) # This is the name of the tags which will be handled by the # module input. self.tbhtags = tbhtags # This are the original tags - when there is no # need to convert them to specific values, they are left # here. self.otags = {} # This is the list of converted values. self.values = {} Encoding.check_unicode(rid) self._id = rid self.mods = mods self.config = config Encoding.check_unicode(type_str) self.type_str = type_str self._file_path = file_path self.record = None self.brmo = None # The analytic modules store the results in this map: self.analytics = {} if content is not None: self.__input(content)
def __init__(self, input_mods, config): '''Sets up a TopicContinuum for use.''' tracer.info("called") UsableFlag.__init__(self) self.__input_mods = input_mods self._config = config # This dictionary holds all the TopicSetCollections # available in the configured time period. self.__continuum = {} # Store objects with IDs also in the cache - so that they can be reused. self.__object_cache = ObjectCache() self.__init_continuum_set() self.__object_cache.log_stats() tracer.debug("Finished.")
def __init__(self, input_mods, config): """Sets up a TopicContinuum for use.""" tracer.info("called") UsableFlag.__init__(self) self.__input_mods = input_mods self._config = config # This dictionary holds all the TopicSetCollections # available in the configured time period. self.__continuum = {} # Store objects with IDs also in the cache - so that they can be reused. self.__object_cache = ObjectCache() self.__init_continuum_set() self.__object_cache.log_stats() tracer.debug("Finished.")
def __init__(self, config): '''Constructs a RequirementSet. This does not read everything in: please use the appropriate method to do so.''' tracer.debug("Called.") Digraph.__init__(self) UsableFlag.__init__(self) self._config = config self.__master_nodes = None # The key is the id the value the constraint. self.__constraints = {} # This holds only ready to use CE3 objects. self.__ce3set = CE3Set() # All the test cases for this requirement set self.__testcases = {} tracer.debug("Finished.")
def __init__(self, ts_name, config, ts_config, object_cache, input_mods): UsableFlag.__init__(self) self.__name = ts_name tracer.info("Called: name [%s]", self.__name) self._config = config self.__topic_sets = {} # This is the list of all version control system ids. # Those ids are sorted by time. # The first is the vcs id of the (sub-)element, # The second is the commit. # The oldest versions is the first one - sorted. # Note: this does not contain any other data, only the ids. # To access the data, use some construct like: # self.__topic_sets[self.__vcs_commit_ids[n].get_commit()] # self.__vcs_commit_ids = [] self.__object_cache = object_cache self.__input_mods = input_mods self.__read_topic_sets(ts_config) self.__ts_config = ts_config tracer.debug("Finished; topic set count [%d]", len(self.__topic_sets))
def __init__(self, tbhtags, content, rid, mods, config, type_str, file_path): UsableFlag.__init__(self) # This is the name of the tags which will be handled by the # module input. self.tbhtags = tbhtags # This are the original tags - when there is no # need to convert them to specific values, they are left # here. self.otags = {} # This is the list of converted values. self.values = {} self.id = rid self.mods = mods self.config = config self.type_str = type_str self._file_path = file_path self.record = None self.brmo = None if content != None: self.__input(content)
def __init__(self, ts_name, config, ts_config, object_cache, input_mods): UsableFlag.__init__(self) self.__name = ts_name tracer.info("Called: name [%s]." % self.__name) self._config = config self.__topic_sets = {} # This is the list of all version control system ids. # Those ids are sorted by time. # The first is the vcs id of the (sub-)element, # The second is the commit. # The oldest versions is the first one - sorted. # Note: this does not contain any other data, only the ids. # To access the data, use some construct like: # self.__topic_sets[self.__vcs_commit_ids[n].get_commit()] # self.__vcs_commit_ids = [] self.__object_cache = object_cache self.__input_mods = input_mods self.__read_topic_sets(ts_config) self.__ts_config = ts_config tracer.debug("Finished; topic set count [%d]" % len(self.__topic_sets))
def __init__(self, config, input_handler, commit, object_cache, input_mods): '''Read in all the dependent topics and the requirements.''' tracer.info("Called; commit timestamp [%s]" % input_handler.get_timestamp(commit)) Digraph.__init__(self) UsableFlag.__init__(self) self._config = config self.__input_handler = input_handler self.__commit = commit self.__object_cache = object_cache self.__input_mods = input_mods # Because it is possible that things are failing, there is the need to # have some defaults here: self.__complete_requirement_set = None self.__topic = None self.__requirement_set = None tracer.debug("Read in all the requirements.") self.__read_requirement_set() if not self.is_usable(): tracer.error("Errors during reading the requirements.") return tracer.debug("Read in all the topics.") # Stored here is the initial node of the topic digraph. self.__topic = self.__read_topics() if not self.is_usable(): tracer.error("Errors during reading the topics.") return tracer.debug("Restrict requirements to those which are " "needed in the topic.") self.__requirement_set = self.__restrict_requirements_set() if not self.is_usable(): tracer.error("Errors during restriction of the requirements.") return tracer.debug("Finished; success.")
def __init__(self, config, input_handler, commit, object_cache, input_mods): '''Read in all the dependent topics and the requirements.''' tracer.info("Called; commit timestamp [%s]", input_handler.get_timestamp(commit)) Digraph.__init__(self) UsableFlag.__init__(self) self._config = config self.__input_handler = input_handler self.__commit = commit self.__object_cache = object_cache self.__input_mods = input_mods # Because it is possible that things are failing, there is the need to # have some defaults here: self.__complete_requirement_set = None self.__topic = None self.__requirement_set = None # First: read in all the requirements. self.__read_requirement_set() if not self.is_usable(): tracer.error("Errors during reading the requirements.") return # Second: read in all the topics. # Stored here is the initial node of the topic digraph. self.__topic = self.__read_topics() if not self.is_usable(): tracer.error("Errors during reading the topics.") return # Third: restrict requirements to those which are # needed in the topic. self.__requirement_set = self.__restrict_requirements_set() if not self.is_usable(): tracer.error("Errors during restriction of the requirements.") return tracer.debug("Finished.")
def __init__(self): list.__init__(self) UsableFlag.__init__(self) self.ldict = None