Gets the SP metadata. The XML representation.
        :returns: SP metadata (xml)
        :rtype: string
519057
def get_sp_metadata(self):
        
        metadata = OneLogin_Saml2_Metadata.builder(
            self.__sp, self.__security['authnRequestsSigned'],
            self.__security['wantAssertionsSigned'],
            self.__security['metadataValidUntil'],
            self.__security['metadataCacheDuration'],
            self.get_contacts(), self.get_organization()
        )

        add_encryption = self.__security['wantNameIdEncrypted'] or self.__security['wantAssertionsEncrypted']

        cert_new = self.get_sp_cert_new()
        metadata = OneLogin_Saml2_Metadata.add_x509_key_descriptors(metadata, cert_new, add_encryption)

        cert = self.get_sp_cert()
        metadata = OneLogin_Saml2_Metadata.add_x509_key_descriptors(metadata, cert, add_encryption)

        # Sign metadata
        if 'signMetadata' in self.__security and self.__security['signMetadata'] is not False:
            if self.__security['signMetadata'] is True:
                # Use the SP's normal key to sign the metadata:
                if not cert:
                    raise OneLogin_Saml2_Error(
                        'Cannot sign metadata: missing SP public key certificate.',
                        OneLogin_Saml2_Error.PUBLIC_CERT_FILE_NOT_FOUND
                    )
                cert_metadata = cert
                key_metadata = self.get_sp_key()
                if not key_metadata:
                    raise OneLogin_Saml2_Error(
                        'Cannot sign metadata: missing SP private key.',
                        OneLogin_Saml2_Error.PRIVATE_KEY_FILE_NOT_FOUND
                    )
            else:
                # Use a custom key to sign the metadata:
                if ('keyFileName' not in self.__security['signMetadata'] or
                        'certFileName' not in self.__security['signMetadata']):
                    raise OneLogin_Saml2_Error(
                        'Invalid Setting: signMetadata value of the sp is not valid',
                        OneLogin_Saml2_Error.SETTINGS_INVALID_SYNTAX
                    )
                key_file_name = self.__security['signMetadata']['keyFileName']
                cert_file_name = self.__security['signMetadata']['certFileName']
                key_metadata_file = self.__paths['cert'] + key_file_name
                cert_metadata_file = self.__paths['cert'] + cert_file_name

                try:
                    with open(key_metadata_file, 'r') as f_metadata_key:
                        key_metadata = f_metadata_key.read()
                except IOError:
                    raise OneLogin_Saml2_Error(
                        'Private key file not readable: %s',
                        OneLogin_Saml2_Error.PRIVATE_KEY_FILE_NOT_FOUND,
                        key_metadata_file
                    )

                try:
                    with open(cert_metadata_file, 'r') as f_metadata_cert:
                        cert_metadata = f_metadata_cert.read()
                except IOError:
                    raise OneLogin_Saml2_Error(
                        'Public cert file not readable: %s',
                        OneLogin_Saml2_Error.PUBLIC_CERT_FILE_NOT_FOUND,
                        cert_metadata_file
                    )

            signature_algorithm = self.__security['signatureAlgorithm']
            digest_algorithm = self.__security['digestAlgorithm']

            metadata = OneLogin_Saml2_Metadata.sign_metadata(metadata, key_metadata, cert_metadata, signature_algorithm, digest_algorithm)

        return metadata
843336
def get_display_names_metadata(self):
        
        metadata = dict(self._display_names_metadata)
        metadata.update({'existing_string_values': [t['text'] for t in self.my_osid_object_form._my_map['displayNames']]})
        return Metadata(**metadata)
69848
def get_metadata(self, loadbalancer, node=None, raw=False):
        
        if node:
            uri = "/loadbalancers/%s/nodes/%s/metadata" % (
                    utils.get_id(loadbalancer), utils.get_id(node))
        else:
            uri = "/loadbalancers/%s/metadata" % utils.get_id(loadbalancer)
        resp, body = self.api.method_get(uri)
        meta = body.get("metadata", [])
        if raw:
            return meta
        ret = dict([(itm["key"], itm["value"]) for itm in meta])
        return ret
1219034
def _rpc_metadata(self):
        
        if self._rpc_metadata_internal is None:
            self._rpc_metadata_internal = _helpers.metadata_with_prefix(
                self._database_string
            )

        return self._rpc_metadata_internal
1092039
def get_description_metadata(self):
        
        metadata = dict(self._mdata['description'])
        metadata.update({'existing_string_values': self._my_map['description']['text']})
        return Metadata(**metadata)
765636
def wsfed_metadata(self):
        

        url = 'https://{}/wsfed/FederationMetadata' \
              '/2007-06/FederationMetadata.xml'

        return self.get(url=url.format(self.domain))
433251
def xmlmetadata(self):
        """"""
        E = ElementMaker(namespace="http://ilk.uvt.nl/folia",nsmap={None: "http://ilk.uvt.nl/folia", 'xml' : "http://www.w3.org/XML/1998/namespace"})
        elements = []
        if self.metadatatype == "native":
            if isinstance(self.metadata, NativeMetaData):
                for key, value in self.metadata.items():
                    elements.append(E.meta(value,id=key) )
        else:
            if isinstance(self.metadata, ForeignData):
                #in-document
                m = self.metadata
                while m is not None:
                    elements.append(m.xml())
                    m = m.next
        for metadata_id, submetadata in self.submetadata.items():
            subelements = []
            attribs = {
                "{http://www.w3.org/XML/1998/namespace}id": metadata_id,
                "type": self.submetadatatype[metadata_id] }
            if isinstance(submetadata, NativeMetaData):
                for key, value in submetadata.items():
                    subelements.append(E.meta(value,id=key) )
            elif isinstance(submetadata, ExternalMetaData):
                attribs['src'] = submetadata.url
            elif isinstance(submetadata, ForeignData):
                #in-document
                m = submetadata
                while m is not None:
                    subelements.append(m.xml())
                    m = m.next
            elements.append( E.submetadata(*subelements, **attribs))
        return elements
920030
def toxml(self):
        

        xmlstr = '<OnStart'

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnStart>'
        else:
            xmlstr += '/>'

        return xmlstr
1374238
def getMetadataId(self, metadata):
        
        return str(datamodel.VariantSetMetadataCompoundId(
            self.getCompoundId(), 'metadata:' + metadata.key))
1139826
def metadata(self):
        
        # Check exceptional case: return none if no metadata
        if not self._operation.HasField('metadata'):
            return None

        # Return expected metadata
        return _from_any(self._metadata_type, self._operation.metadata)
756987
def get_sp_key(self):
        
        key = self.__sp.get('privateKey')
        key_file_name = self.__paths['cert'] + 'sp.key'

        if not key and exists(key_file_name):
            with open(key_file_name) as f:
                key = f.read()

        return key or None
437174
def get_level_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['level'])
        metadata.update({'existing_id_values': self._my_map['levelId']})
        return Metadata(**metadata)
482619
def get_metadata(item):
    
    for metadata_key in ('METADATA', 'PKG-INFO'):
        try:
            metadata_lines = item.get_metadata_lines(metadata_key)
            break
        except (KeyError, IOError):
            # The package will be shown in the report without any license information
            # if a metadata key is not found.
            metadata_lines = []

    return metadata_lines
1149173
def metadata(self):
        
        result = []
        for layer in self._layers:
            if layer in self._values:
                result.append({
                    'layer': layer,
                    'value': self._values[layer][1],
                    'source': self._values[layer][0],
                    'default': layer == self._layers[-1]
                })
        return result
1171919
def toxml(self):
        

        xmlstr = '<OnEvent port="{0}"'.format(self.port)

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnEvent>'
        else:
            xmlstr += '/>'

        return xmlstr
551195
def get_metadata():
    
    motifs = _load_motifs()

    motif_names = sorted(list(motifs.keys()))
    df = pd.Series(motif_names).str.split(expand=True)
    df.rename(columns={0: "PWM_id", 1: "info1", 2: "info2"}, inplace=True)

    # compute the consensus
    consensus = pd.Series([PWM(motifs[m]).get_consensus() for m in motif_names])
    df["consensus"] = consensus
    return df
539596
def get_product_metadata_name(self):
        
        if self.safe_type == EsaSafeType.OLD_TYPE:
            name = _edit_name(self.product_id, 'MTD', 'SAFL1C')
        else:
            name = 'MTD_{}'.format(self.product_id.split('_')[1])
        return '{}.{}'.format(name, MimeType.XML.value)