A court in China has sentenced an activist to seven-and-a-half years in prison for subverting state power.