com.ldodds.slug.framework.config
Class MemoryImpl

java.lang.Object
  extended bycom.ldodds.slug.framework.config.MemoryImpl
All Implemented Interfaces:
Memory

public abstract class MemoryImpl
extends java.lang.Object
implements Memory

FIXME transactions! Default implementation of the Memory interface.

Author:
Leigh Dodds

Field Summary
protected  Model _model
           
 
Constructor Summary
MemoryImpl()
           
 
Method Summary
 void addRawTripleCount(Resource representation, long size)
           
 void annotateFetch(Resource fetch, int code, java.util.Map headers)
           
 boolean canBeFetched(Resource rep, java.util.Date date)
           
 Model getModel()
           
 Resource getOrCreateRepresentation(java.net.URL url)
           
 Resource getOrCreateRepresentation(java.net.URL url, java.net.URL origin)
           
 Resource getRepresentation(java.net.URL url)
           
 Resource makeFetch(Resource representation)
           
 Resource makeReasonAndError(Resource fetch, java.lang.Exception e)
           
 Resource makeReasonAndError(Resource fetch, java.lang.String msg)
           
 Resource makeReasonAndSkip(Resource representation, java.lang.String msg)
           
 Resource makeRepresentation(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ldodds.slug.framework.config.Memory
load, save
 

Field Detail

_model

protected Model _model
Constructor Detail

MemoryImpl

public MemoryImpl()
Method Detail

getModel

public Model getModel()
Specified by:
getModel in interface Memory

getRepresentation

public Resource getRepresentation(java.net.URL url)
Specified by:
getRepresentation in interface Memory

getOrCreateRepresentation

public Resource getOrCreateRepresentation(java.net.URL url)
Specified by:
getOrCreateRepresentation in interface Memory

getOrCreateRepresentation

public Resource getOrCreateRepresentation(java.net.URL url,
                                          java.net.URL origin)
Specified by:
getOrCreateRepresentation in interface Memory

canBeFetched

public boolean canBeFetched(Resource rep,
                            java.util.Date date)
Specified by:
canBeFetched in interface Memory

addRawTripleCount

public void addRawTripleCount(Resource representation,
                              long size)
Specified by:
addRawTripleCount in interface Memory

makeRepresentation

public Resource makeRepresentation(java.net.URL url)

makeFetch

public Resource makeFetch(Resource representation)
Specified by:
makeFetch in interface Memory

annotateFetch

public void annotateFetch(Resource fetch,
                          int code,
                          java.util.Map headers)
Specified by:
annotateFetch in interface Memory

makeReasonAndSkip

public Resource makeReasonAndSkip(Resource representation,
                                  java.lang.String msg)
Specified by:
makeReasonAndSkip in interface Memory

makeReasonAndError

public Resource makeReasonAndError(Resource fetch,
                                   java.lang.String msg)
Specified by:
makeReasonAndError in interface Memory

makeReasonAndError

public Resource makeReasonAndError(Resource fetch,
                                   java.lang.Exception e)
Specified by:
makeReasonAndError in interface Memory