|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fortytwo.linkeddata.LinkedDataCache
public class LinkedDataCache
A manager for a dynamic set of RDF graphs collected from the Web. The cache uses configurable URI dereferencers and RDFizers to fetch and translate documents, and connects to an RDF triple store which provides a unified view of the Web of Data.
| Field Summary | |
|---|---|
static org.openrdf.model.URI |
CACHE_GRAPH
|
static org.openrdf.model.URI |
CACHE_MEMO
|
static String |
CACHE_NS
|
| Constructor Summary | |
|---|---|
LinkedDataCache(org.openrdf.sail.Sail sail)
|
|
| Method Summary | |
|---|---|
void |
addDereferencer(String scheme,
Dereferencer dref)
Associates a dereferencer with a given URI scheme. |
void |
addRdfizer(org.restlet.data.MediaType mediaType,
Rdfizer rdfizer,
double qualityFactor)
Associates an rdfizer with a given media type. |
static LinkedDataCache |
createDefault(org.openrdf.sail.Sail sail)
Constructs a cache with the default settings, dereferencers, and rdfizers. |
String |
getAcceptHeader()
|
boolean |
getDereferenceContexts()
|
boolean |
getDereferenceObjects()
|
boolean |
getDereferencePredicates()
|
boolean |
getDereferenceSubjects()
|
net.fortytwo.ripple.URIMap |
getURIMap()
|
boolean |
isAutoCommit()
|
CacheEntry.Status |
retrieveUri(org.openrdf.model.URI uri,
org.openrdf.sail.SailConnection sc)
Retrieves caching metadata for a URI, possibly dereferencing a document from the Web first. |
void |
setAutoCommit(boolean autoCommit)
|
void |
setDereferenceContexts(boolean flag)
|
void |
setDereferenceObjects(boolean flag)
|
void |
setDereferencePredicates(boolean flag)
|
void |
setDereferenceSubjects(boolean flag)
|
void |
setExpirationPolicy(CacheExpirationPolicy expirationPolicy)
|
void |
setURIMap(net.fortytwo.ripple.URIMap map)
Defines an application-specific mapping for URIs dereferenced by the cache, in the manner of a Web proxy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CACHE_NS
public static final org.openrdf.model.URI CACHE_MEMO
public static final org.openrdf.model.URI CACHE_GRAPH
| Constructor Detail |
|---|
public LinkedDataCache(org.openrdf.sail.Sail sail)
throws net.fortytwo.ripple.RippleException
sail - underlying triple store for the cache
net.fortytwo.ripple.RippleException - if there is a configuration error| Method Detail |
|---|
public static LinkedDataCache createDefault(org.openrdf.sail.Sail sail)
throws net.fortytwo.ripple.RippleException
sail - the underlying triple store for the cache
net.fortytwo.ripple.RippleException - if construction fails for any reasonpublic net.fortytwo.ripple.URIMap getURIMap()
public void setURIMap(net.fortytwo.ripple.URIMap map)
map - the mappingpublic String getAcceptHeader()
public void addRdfizer(org.restlet.data.MediaType mediaType,
Rdfizer rdfizer,
double qualityFactor)
mediaType - a MIME type, e.g. "application/rdf+xml", "image/tiff"rdfizer - the associated rdfizerqualityFactor - a quality value ranging from 0 to 1 which expresses the client's preference for the given media type.
This value is used for HTTP content negotiation.
public void addDereferencer(String scheme,
Dereferencer dref)
scheme - the name of the URI scheme (e.g. "http", "ftp", "file", "jar")dref - the associated dereferencer
public CacheEntry.Status retrieveUri(org.openrdf.model.URI uri,
org.openrdf.sail.SailConnection sc)
throws net.fortytwo.ripple.RippleException
uri - the URI to dereferencesc - a connection to a Sail
net.fortytwo.ripple.RippleException - if retrieval fails for any reasonpublic boolean isAutoCommit()
public void setAutoCommit(boolean autoCommit)
autoCommit - whether the cache should commit to the triple store after each Web request
(true by default)public void setExpirationPolicy(CacheExpirationPolicy expirationPolicy)
expirationPolicy - the rule by which the cache determines whether a cache entry has expired.
If an entry has expired, the cache will issue a new request in order to refresh it.public boolean getDereferenceSubjects()
public void setDereferenceSubjects(boolean flag)
public boolean getDereferencePredicates()
public void setDereferencePredicates(boolean flag)
public boolean getDereferenceObjects()
public void setDereferenceObjects(boolean flag)
public boolean getDereferenceContexts()
public void setDereferenceContexts(boolean flag)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||