Model-Checking Based Data Retrieval: An Application to Semistructured and Temporal Data