#NEWLINE# def __init__( self , url ) : #NEWLINE# #INDENT# 'Creates a store that contains collection of data packages. The\n        datasets are referred as `store_name.dataset_name`.' #NEWLINE# if ( not is_local ( url ) ) : #NEWLINE# #INDENT# raise NotImplementedError ( 'Remote package collections are not supported yet' ) #NEWLINE# #UNINDENT# self . packages = [ ] #NEWLINE# paths = [ ] #NEWLINE# for path in os . listdir ( url ) : #NEWLINE# #INDENT# path = os . path . join ( url , path ) #NEWLINE# if ( not os . path . isdir ( path ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not os . path . exists ( os . path . join ( path , 'datapackage.json' ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# package = DataPackage ( path ) #NEWLINE# self . packages . append ( package ) #NEWLINE# #UNINDENT# self . datasets = OrderedDict ( ) #NEWLINE# self . _index_datasets ( )