def fromBasicServiceEndpoint(cls, endpoint):
    """Create a new instance of this class from the endpoint
        object passed in.

        @return: None or OpenIDServiceEndpoint for this endpoint object"""
    type_uris = endpoint.matchTypes(cls.openid_type_uris)
    if type_uris and endpoint.uri is not None:
        openid_endpoint = cls()
        openid_endpoint.parseService(endpoint.yadis_url, endpoint.uri,
            endpoint.type_uris, endpoint.service_element)
    else:
        openid_endpoint = None
    return openid_endpoint
