at.newmedialab.ldclient.service
Class LDCache
java.lang.Object
at.newmedialab.ldclient.service.LDCache
public class LDCache
- extends Object
Add file description here!
Author: Sebastian Schaffert
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LDCache
public LDCache(LDCacheProvider ldCacheProvider)
refreshResource
public void refreshResource(org.openrdf.model.URI resource)
- Refresh the cached resource passed as argument. The method will do nothing for local resources.
Calling the method will carry out the following tasks:
1. check whether the resource is a remote resource; if no, returns immediately
2. check whether the resource has a cache entry; if no, goto 4
3. check whether the expiry time of the cache entry has passed; if no, returns immediately
4. retrieve the triples for the resource from the Linked Data Cloud using the methods offered by the
LinkedDataClientService (registered endpoints etc); returns immediately if the result is null or
an exception is thrown
5. remove all old triples for the resource and add all new triples for the resource
6. create new expiry information of the cache entry and persist it in the transaction
- Parameters:
resource -
getEndpointService
public LDEndpoints getEndpointService()
Copyright © 2012-2013 Salzburg Research. All Rights Reserved.