RoboSpice and Jsoup

I have an application in which I use Jsoup to get an HTML file from the Internet and parse it in POJO. Then I use a custom content provider to store my POJOs in a SQLite database. This is a lot of code, and some things are difficult to implement, especially caching (that is, how to determine if my object is already in the database, how to control expiration, etc.). From the look through the Internet, I realized that RoboSpice can come to the rescue, as it is transparent in caching. However, I did not find any example on how to connect a custom parser (my results are neither JSON nor XML, but just pure HTML that I am parsing with Jsoup at the moment). Therefore, I would be grateful if you could point me to some kindred example.

Here is a more detailed description of what I am doing. My application reads a specific website to get lists of specific entries. These entries are based on calendars and I request them monthly. Each month, the query returns me a list of records from this month. I want these queries to be cachable and queryable, so I need a database backend so that I can execute my own SQL queries against it. What RoboSpice configuration should I use, what extensions and code samples could I name?

Thanks in advance.

+4
source share
1 answer

It seems that it’s useful to use RoboSpice here, but the way you want to use is a little different from its natural scope.

Pojo, , Jackson, webservice, jackson, Pojo. RoboSpice pojo json, , / .

ObjectPersister Pojo . pojos , RoboSpice ormlite , .

ormlite RoboSpice.

+2

All Articles