def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'mpmetadata' in keys_to_update: parsed_metadata.append({"mpmetadata": metadata.pop('mpmetadata')})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'requesturlbase' in keys_to_update: parsed_metadata.append( {"requesturlbase": metadata.pop('requesturlbase')}) if 'toolversion' in keys_to_update: parsed_metadata.append( {"toolversion": metadata.pop('toolversion')}) if 'toolicon' in keys_to_update: parsed_metadata.append({"toolicon": metadata.pop('toolicon')}) if 'apphomepageurl' in keys_to_update: parsed_metadata.append( {"apphomepageurl": metadata.pop('apphomepageurl')}) if 'supportedrestypes' in keys_to_update: parsed_metadata.append( {"supportedrestypes": metadata.pop('supportedrestypes')}) if 'supportedsharingstatus' in keys_to_update: parsed_metadata.append({ "supportedsharingstatus": metadata.pop('supportedsharingstatus') })
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = list(metadata.keys()) if 'scriptspecificmetadata' in keys_to_update: parsed_metadata.append({"scriptspecificmetadata": metadata.pop('scriptspecificmetadata')})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'bandinformations' in keys_to_update: for bandinformation in metadata.pop('bandinformations'): parsed_metadata.append({"bandinformation": bandinformation})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'modeloutput' in keys_to_update: parsed_metadata.append({"modeloutput": metadata.pop('modeloutput')}) if 'executedby' in keys_to_update: parsed_metadata.append({"executedby": metadata.pop('executedby')})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'originalcoverage' in keys_to_update: parsed_metadata.append({"originalcoverage": metadata.pop('originalcoverage')}) if 'variables' in keys_to_update: for variable in metadata.pop('variables'): parsed_metadata.append({"variable": variable})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = list(metadata.keys()) if 'originalcoverage' in keys_to_update: parsed_metadata.append({"originalcoverage": metadata.pop('originalcoverage')}) if 'variables' in keys_to_update: for variable in metadata.pop('variables'): parsed_metadata.append({"variable": variable})
def _get_resource_sender(element_name, resource): core_metadata_element_names = [el_name.lower() for el_name in CoreMetaData.get_supported_element_names()] if element_name in core_metadata_element_names: sender_resource = GenericResource().__class__ else: sender_resource = resource.__class__ return sender_resource
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) keys_to_update = metadata.keys() if 'requesturlbase' in keys_to_update: parsed_metadata.append({"requesturlbase": metadata.pop('requesturlbase')}) if 'requesturlbaseaggregation' in keys_to_update: parsed_metadata.append( {"requesturlbaseaggregation": metadata.pop('requesturlbaseaggregation')}) if 'requesturlbasefile' in keys_to_update: parsed_metadata.append({"requesturlbasefile": metadata.pop('requesturlbasefile')}) if 'toolversion' in keys_to_update: parsed_metadata.append({"toolversion": metadata.pop('toolversion')}) if 'toolicon' in keys_to_update: parsed_metadata.append({"toolicon": metadata.pop('toolicon')}) if 'supportedfileextensions' in keys_to_update: parsed_metadata.append({"supportedfileextensions": metadata.pop( 'supportedfileextensions')}) if 'apphomepageurl' in keys_to_update: parsed_metadata.append({"apphomepageurl": metadata.pop('apphomepageurl')}) if 'supportedrestypes' in keys_to_update: parsed_metadata.append({"supportedrestypes": metadata.pop('supportedrestypes')}) if 'supportedaggtypes' in keys_to_update: parsed_metadata.append({"supportedaggtypes": metadata.pop('supportedaggtypes')}) if 'supportedsharingstatus' in keys_to_update: parsed_metadata.append( {"supportedsharingstatus": metadata.pop('supportedsharingstatus')})
def parse_for_bulk_update(cls, metadata, parsed_metadata): """Overriding the base class method""" CoreMetaData.parse_for_bulk_update(metadata, parsed_metadata) # TODO The json metadata has underscores, remove those to matche the metadata elements. This is probably an # issue in the other metadata implementations as well. for key, value in list(metadata.items()): if "_" in key: metadata[key.replace("_", "")] = metadata.pop(key) keys_to_update = list(metadata.keys()) if 'requesturlbase' in keys_to_update: parsed_metadata.append( {"requesturlbase": metadata.pop('requesturlbase')}) if 'requesturlbaseaggregation' in keys_to_update: parsed_metadata.append({ "requesturlbaseaggregation": metadata.pop('requesturlbaseaggregation') }) if 'requesturlbasefile' in keys_to_update: parsed_metadata.append( {"requesturlbasefile": metadata.pop('requesturlbasefile')}) if 'toolversion' in keys_to_update: parsed_metadata.append( {"toolversion": metadata.pop('toolversion')}) if 'toolicon' in keys_to_update: parsed_metadata.append({"toolicon": metadata.pop('toolicon')}) if 'supportedfileextensions' in keys_to_update: parsed_metadata.append({ "supportedfileextensions": metadata.pop('supportedfileextensions') }) if 'apphomepageurl' in keys_to_update: parsed_metadata.append( {"apphomepageurl": metadata.pop('apphomepageurl')}) if 'supportedrestypes' in keys_to_update: parsed_metadata.append( {"supportedrestypes": metadata.pop('supportedrestypes')}) if 'supportedaggtypes' in keys_to_update: parsed_metadata.append( {"supportedaggtypes": metadata.pop('supportedaggtypes')}) if 'supportedsharingstatus' in keys_to_update: parsed_metadata.append({ "supportedsharingstatus": metadata.pop('supportedsharingstatus') }) if 'testingprotocolurl' in keys_to_update: parsed_metadata.append( {"testingprotocolurl": metadata.pop('testingprotocolurl')}) if 'helppageurl' in keys_to_update: parsed_metadata.append( {"helppageurl": metadata.pop('helppageurl')}) if 'sourcecodeurl' in keys_to_update: parsed_metadata.append( {"sourcecodeurl": metadata.pop('sourcecodeurl')}) if 'issuespageurl' in keys_to_update: parsed_metadata.append( {"issuespageurl": metadata.pop('issuespageurl')}) if 'mailinglisturl' in keys_to_update: parsed_metadata.append( {"mailinglisturl": metadata.pop('mailinglisturl')}) if 'roadmap' in keys_to_update: parsed_metadata.append({"roadmap": metadata.pop('roadmap')})