def __init__(self, network, store_type, output_dir=""):
     self.network = network
     self.store_type = store_type
     store_class = GenericStore.get_store_class(store_type)
     # Buffer to store network data
     self.gbuffer = GraphBuffer(self.network.label,
                                store_class,
                                output_dir=output_dir)
 def __init__(self, network, store_type="gml"):
     """ Function to initialize a network crawler.
       Args:
         network: the network object to be crawled
         store_type: the type of storage. Valid values are "gml", "basic_shelve"
                     or "couchdb"
       Returns:
         An initialized crawler object
     """
     self.network = network
     store_class = GenericStore.get_store_class(store_type)
     # Buffer to store network data
     self.gbuffer = GraphBuffer(self.network.label, store_class)
     #self.recover = recover
     # Priority queue in memory that keeps track of nodes to visit
     self.pqueue = PriorityQueue(store_class, store_name=self.network.label +
                                                         "_state")
Exemple #3
0
 def __init__(self, network, store_type="gml"):
     """ Function to initialize a network crawler.
       Args:
         network: the network object to be crawled
         store_type: the type of storage. Valid values are "gml", "basic_shelve"
                     or "couchdb"
       Returns:
         An initialized crawler object
     """
     self.network = network
     store_class = GenericStore.get_store_class(store_type)
     # Buffer to store network data
     self.gbuffer = GraphBuffer(self.network.label, store_class)
     #self.recover = recover
     # Priority queue in memory that keeps track of nodes to visit
     self.pqueue = PriorityQueue(store_class,
                                 store_name=self.network.label + "_state")
 def __init__(self, network, store_type, output_dir=""):
     self.network= network
     self.store_type = store_type
     store_class = GenericStore.get_store_class(store_type)
     # Buffer to store network data
     self.gbuffer = GraphBuffer(self.network.label, store_class, output_dir=output_dir)