def classPath2modulePath(stringIn):
    """

    if it get: specification.ocni.AvailabilityInterval
    it will return: specification.ocni

    """

    tem = stringIn.split('.')
    res = ''
    #l'indice pour la boucle while
    i = 0
    while i < len(tem) - 1:
        res += tem[i]
        if i < len(tem) - 2:
            res += '.'
        i += 1
    return res