@@ -229,66 +229,71 @@ def getAnnotations(self, annottype=None, codes=None, ids=None, **kwargs):
229
229
return None
230
230
231
231
# CV
232
- def getCVs (self , type ):
232
+ def getCVs (self , cvtype , ** kwargs ):
233
233
"""
234
234
getCVs(self, type):
235
235
* Pass CVType - return a list of all objects of the given type
236
236
237
237
"""
238
- CV = CVActionType
239
- if type == 'actiontype' :
238
+ self ._check_kwargs (['type' ], kwargs )
239
+ if 'type' in kwargs :
240
+ warnings .warn ('The parameter \' type\' is deprecated. Please use the cvtype parameter instead.' ,
241
+ DeprecationWarning , stacklevel = 2 )
242
+ cvtype = kwargs ['type' ]
243
+
244
+ if cvtype == 'actiontype' :
240
245
CV = CVActionType
241
- elif type == 'aggregationstatistic' :
246
+ elif cvtype == 'aggregationstatistic' :
242
247
CV = CVAggregationStatistic
243
- elif type == 'annotationtype' :
248
+ elif cvtype == 'annotationtype' :
244
249
CV = CVAnnotationType
245
- elif type == 'censorcode' :
250
+ elif cvtype == 'censorcode' :
246
251
CV = CVCensorCode
247
- elif type == 'dataqualitytype' :
252
+ elif cvtype == 'dataqualitytype' :
248
253
CV = CVDataQualityType
249
- elif type == 'dataset type' :
254
+ elif cvtype == 'dataset type' :
250
255
CV = CVDataSetType
251
- elif type == 'Directive Type' :
256
+ elif cvtype == 'Directive Type' :
252
257
CV = CVDirectiveType
253
- elif type == 'Elevation Datum' :
258
+ elif cvtype == 'Elevation Datum' :
254
259
CV = CVElevationDatum
255
- elif type == 'Equipment Type' :
260
+ elif cvtype == 'Equipment Type' :
256
261
CV = CVEquipmentType
257
- elif type == 'Medium' :
262
+ elif cvtype == 'Medium' :
258
263
CV = CVMediumType
259
- elif type == 'Method Type' :
264
+ elif cvtype == 'Method Type' :
260
265
CV = CVMethodType
261
- elif type == 'Organization Type' :
266
+ elif cvtype == 'Organization Type' :
262
267
CV = CVOrganizationType
263
- elif type == 'Property Data Type' :
268
+ elif cvtype == 'Property Data Type' :
264
269
CV = CVPropertyDataType
265
- elif type == 'Quality Code' :
270
+ elif cvtype == 'Quality Code' :
266
271
CV = CVQualityCode
267
- elif type == 'Relationship Type' :
272
+ elif cvtype == 'Relationship Type' :
268
273
CV = CVRelationshipType
269
- elif type == 'Result Type' :
274
+ elif cvtype == 'Result Type' :
270
275
CV = CVResultType
271
- elif type == 'Sampling Feature Geo-type' :
276
+ elif cvtype == 'Sampling Feature Geo-type' :
272
277
CV = CVSamplingFeatureGeoType
273
- elif type == 'Sampling Feature Type' :
278
+ elif cvtype == 'Sampling Feature Type' :
274
279
CV = CVSamplingFeatureType
275
- elif type == 'Site Type' :
280
+ elif cvtype == 'Site Type' :
276
281
CV = CVSiteType
277
- elif type == 'Spatial Offset Type' :
282
+ elif cvtype == 'Spatial Offset Type' :
278
283
CV = CVSpatialOffsetType
279
- elif type == 'Speciation' :
284
+ elif cvtype == 'Speciation' :
280
285
CV = CVSpeciation
281
- elif type == 'Specimen Type' :
286
+ elif cvtype == 'Specimen Type' :
282
287
CV = CVSpecimenType
283
- elif type == 'Status' :
288
+ elif cvtype == 'Status' :
284
289
CV = CVStatus
285
- elif type == 'Taxonomic Classifier Type' :
290
+ elif cvtype == 'Taxonomic Classifier Type' :
286
291
CV = CVTaxonomicClassifierType
287
- elif type == 'Units Type' :
292
+ elif cvtype == 'Units Type' :
288
293
CV = CVUnitsType
289
- elif type == 'Variable Name' :
294
+ elif cvtype == 'Variable Name' :
290
295
CV = CVVariableName
291
- elif type == 'Variable Type' :
296
+ elif cvtype == 'Variable Type' :
292
297
CV = CVVariableType
293
298
else :
294
299
return None
0 commit comments