def ceiling_from_str(src):
    """A simply restriction on integer:

    <xs:simpleType name="Ceiling">
            <xs:restriction base="xs:integer">
                    <xs:maxInclusive value="32767"/>
                    <xs:minInclusive value="-1"/>
            </xs:restriction>
    </xs:simpleType>
    """
    value = int(src)
    if value < -1 or value > 32767:
        raise ValueError('Value exceeds bounds for CEILING: %i' % value)
    return value
