@@ -125,60 +125,6 @@ def submit_extraction(connector, host, key, fileid, extractorname):
125125 return result
126126
127127
128- # TODO not implemented in v2
129- def submit_extractions_by_dataset (connector , host , key , datasetid , extractorname , ext = False ):
130- """Manually trigger an extraction on all files in a dataset.
131-
132- This will iterate through all files in the given dataset and submit them to
133- the provided extractor.
134-
135- Keyword arguments:
136- connector -- connector information, used to get missing parameters and send status updates
137- host -- the clowder host, including http and port, should end with a /
138- key -- the secret key to login to clowder
139- datasetid -- the dataset UUID to submit
140- extractorname -- registered name of extractor to trigger
141- ext -- extension to filter. e.g. 'tif' will only submit TIFF files for extraction.
142- """
143-
144- filelist = get_file_list (connector , host , key , datasetid )
145-
146- for f in filelist :
147- # Only submit files that end with given extension, if specified
148- if ext and not f ['filename' ].endswith (ext ):
149- continue
150-
151- submit_extraction (connector , host , key , f ['id' ], extractorname )
152-
153-
154- # TODO not implemented in v2
155- def submit_extractions_by_collection (connector , host , key , collectionid , extractorname , ext = False , recursive = True ):
156- """Manually trigger an extraction on all files in a collection.
157-
158- This will iterate through all datasets in the given collection and submit them to
159- the submit_extractions_by_dataset(). Does not operate recursively if there are nested collections.
160-
161- Keyword arguments:
162- connector -- connector information, used to get missing parameters and send status updates
163- host -- the clowder host, including http and port, should end with a /
164- key -- the secret key to login to clowder
165- collectionid -- the collection UUID to submit
166- extractorname -- registered name of extractor to trigger
167- ext -- extension to filter. e.g. 'tif' will only submit TIFF files for extraction
168- recursive -- whether to also submit child collection files recursively (defaults to True)
169- """
170-
171- dslist = get_datasets (connector , host , key , collectionid )
172-
173- for ds in dslist :
174- submit_extractions_by_dataset (connector , host , key , ds ['id' ], extractorname , ext )
175-
176- if recursive :
177- childcolls = get_child_collections (connector , host , key , collectionid )
178- for coll in childcolls :
179- submit_extractions_by_collection (connector , host , key , coll ['id' ], extractorname , ext , recursive )
180-
181-
182128def upload_metadata (connector , host , key , fileid , metadata ):
183129 """Upload file JSON-LD metadata to Clowder.
184130
0 commit comments