|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fuberlin.wiwiss.marbles.loading.CacheController
public class CacheController
Implements caching of data retrieved from HTTP URLs using a Sesame repository Uses HTTP in RDF namespace, but currently does not follow the ontology as this would require deeper nesting with b-nodes, which is an overcomplication for the current use cases
http://www.w3.org/TR/HTTP-in-RDF/
Constructor Summary | |
---|---|
CacheController(org.openrdf.repository.sail.SailRepository dataRepository,
org.openrdf.repository.sail.SailRepository metaDataRepository)
Constructs a new CacheController |
Method Summary | |
---|---|
void |
addURLData(java.lang.String url,
org.openrdf.model.Graph data,
org.apache.commons.httpclient.HttpMethod method)
Adds retrieved URL data to the cache |
org.apache.commons.httpclient.Header |
getCachedHeaderData(org.openrdf.repository.RepositoryConnection metaDataConn,
org.openrdf.model.Resource mainResource,
java.lang.String headerField)
Retrieves a cached response header field from the metadata cache |
org.apache.commons.httpclient.Header |
getCachedHeaderData(org.openrdf.repository.RepositoryConnection metaDataConn,
java.lang.String url,
java.lang.String headerField)
Retrieves a cached response header field from the metadata cache |
java.lang.String |
getCachedHeaderDataValue(org.openrdf.repository.RepositoryConnection metaDataConn,
org.openrdf.model.Resource mainResource,
java.lang.String headerField)
Retrieves the value of a cached response header field from the metadata cache |
java.lang.String |
getCachedHeaderDataValue(org.openrdf.repository.RepositoryConnection metaDataConn,
java.lang.String url,
java.lang.String headerField)
Retrieves the value of a cached response header field from the metadata cache |
java.lang.String |
getCachedRedirect(java.lang.String uri)
Provides redirection targets from the cache |
org.openrdf.repository.Repository |
getDataRepository()
|
org.openrdf.repository.Repository |
getMetaDataRepository()
|
boolean |
hasURLData(java.lang.String url)
Determines whether the cache holds a valid copy of an URL's data |
void |
removeData(java.lang.String url)
Removes data for a given URL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheController(org.openrdf.repository.sail.SailRepository dataRepository, org.openrdf.repository.sail.SailRepository metaDataRepository)
CacheController
dataRepository
- metaDataRepository
- Method Detail |
---|
public void removeData(java.lang.String url)
url
- The URL whose data is to be removedpublic void addURLData(java.lang.String url, org.openrdf.model.Graph data, org.apache.commons.httpclient.HttpMethod method)
url
- The URL that was retrieveddata
- The retrieved datamethod
- Used to obtain metadatapublic boolean hasURLData(java.lang.String url)
url
- The URL of interest
public java.lang.String getCachedRedirect(java.lang.String uri)
uri
- The URI of interest
null
if there is nonepublic org.apache.commons.httpclient.Header getCachedHeaderData(org.openrdf.repository.RepositoryConnection metaDataConn, org.openrdf.model.Resource mainResource, java.lang.String headerField) throws org.openrdf.repository.RepositoryException
metaDataConn
- A connection to the metadata repositorymainResource
- The resource of interestheaderField
- The header field of interest
org.openrdf.repository.RepositoryException
public org.apache.commons.httpclient.Header getCachedHeaderData(org.openrdf.repository.RepositoryConnection metaDataConn, java.lang.String url, java.lang.String headerField) throws org.openrdf.repository.RepositoryException
metaDataConn
- A connection to the metadata repositoryurl
- The resource of interestheaderField
- The header field of interest
org.openrdf.repository.RepositoryException
public java.lang.String getCachedHeaderDataValue(org.openrdf.repository.RepositoryConnection metaDataConn, org.openrdf.model.Resource mainResource, java.lang.String headerField) throws org.openrdf.repository.RepositoryException
metaDataConn
- A connection to the metadata repositorymainResource
- The resource of interestheaderField
- The header field of interest
org.openrdf.repository.RepositoryException
public java.lang.String getCachedHeaderDataValue(org.openrdf.repository.RepositoryConnection metaDataConn, java.lang.String url, java.lang.String headerField) throws org.openrdf.repository.RepositoryException
metaDataConn
- A connection to the metadata repositoryurl
- The resource of interestheaderField
- The header field of interest
org.openrdf.repository.RepositoryException
public org.openrdf.repository.Repository getDataRepository()
public org.openrdf.repository.Repository getMetaDataRepository()
dataRepository
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |