class OSSAssembly: def __init__ ( self ): self.handler_factory = handler.OSSHandlerFactory ( ) self.parser_factory = SaxParserFactory ( ) def load_buckets ( self, response ): parser = self.parser_factory.create ( ) handler = self.handler_factory.createBucketHandler ( ) parser.setContentHandler ( handler ) parser.parse ( response ) return handler.buckets def load_objects ( self, bucket, response ): parser = self.parser_factory.create ( ) handler = self.handler_factory.createObjectHandler ( bucket ) parser.setContentHandler ( handler ) parser.parse ( response ) return handler.objects
def __init__ ( self ): sax_parser_factory = SaxParserFactory ( ) self.parser = sax_parser_factory.create ( ) self.fixtures = FIXTUES_DIR
def __init__ ( self ): self.handler_factory = handler.OSSHandlerFactory ( ) self.parser_factory = SaxParserFactory ( )
def __init__(self): sax_parser_factory = SaxParserFactory() self.parser = sax_parser_factory.create() self.fixtures = FIXTUES_DIR