Time-varying coverage, namely sweep coverage is a recent development in the area of wireless sensor networks, where a small number of mobile sensors sweep or monitor comparatively large number of locations periodically. In this article we study barrier sweep coverage with mobile sensors where the barrier is considered as a finite length continuous curve on a plane. The coverage at every point on the curve is time-variant. We propose an optimal solution for sweep coverage of a finite length continuous curve. Usually energy source of a mobile sensor is battery with limited power, so energy restricted sweep coverage is a challenging problem for long running applications. We propose an energy restricted sweep coverage problem where every mobile sensors must visit an energy source frequently to recharge or replace its battery. We propose a 13 3 -approximation algorithm for this problem. The proposed algorithm for multiple curves achieves the best possible approximation factor 2 for a special case. We propose a 5-approximation algorithm for the general problem. As an application of the barrier sweep coverage problem for a set of line segments, we formulate a data gathering problem. In this problem a set of mobile sensors is arbitrarily monitoring the line segments one for each. A set of data mules periodically collects the monitoring data from the set of mobile sensors. We prove that finding the minimum number of data mules to collect data periodically from every mobile sensor is NP-hard and propose a 3-approximation algorithm to solve it.