from phaser.pipeline.proxy import common

NAME = "CATH database"

def check():
    
    if not common.is_online( url = "http://www.cathdb.info" ):
        raise RuntimeError, "Cannot contact %s" % str( NAME )


def fetch(identifier):

    return common.Download(
        url = "http://www.cathdb.info/pdb/%s?view=xml" % identifier.lower(),
        )
