Exemple #1
0
    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')})
Exemple #2
0
    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')})
Exemple #3
0
    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')
            })
Exemple #4
0
    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')})
Exemple #5
0
    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})
Exemple #6
0
    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})
Exemple #7
0
    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')})
Exemple #8
0
    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')})
Exemple #9
0
    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})
Exemple #10
0
    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})
Exemple #11
0
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
Exemple #12
0
    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')})
Exemple #13
0
    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')})