Return the (name, path, url) to the short ontology name.

    :param ontology: path to the file or url.

def _get_ontology(ontology):
    """Return the (name, path, url) to the short ontology name.

    :param ontology: path to the file or url.
    """
    onto_name = onto_path = onto_url = None

    # first assume we got the path to the file
    if os.path.exists(ontology):
        onto_name = os.path.split(os.path.abspath(ontology))[1]
        onto_path = os.path.abspath(ontology)
        onto_url = ""
    else:
        # if not, try to find it in a known locations
        discovered_file = _discover_ontology(ontology)
        if discovered_file:
            onto_name = os.path.split(discovered_file)[1]
            onto_path = discovered_file

            x = ontology.lower()
            if "http:" in x or "https:" in x or "ftp:" in x or "file:" in x:
                onto_url = ontology
                onto_path = _get_remote_ontology(onto_url)
            else:
                onto_url = ""

    return (onto_name, onto_path, onto_url)