If your x coordinate is composed of dates, you can rely on generalized additive models with the following components : - trend - yearly profile - weekly profile - daily profile
GAM models are available in R, so I would advice you to use JRI in order to interface your java code with R.
Cheers