org.jcon.store
Class TOFStore

java.lang.Object
  extended by org.jcon.store.TOFStore
All Implemented Interfaces:
StructuredStore

public class TOFStore
extends java.lang.Object
implements StructuredStore

A StructuredStore implementation which uses the TOF format to store object graphs in a StreamingStore device.

Author:
Paul Reavis

Constructor Summary
TOFStore()
           
TOFStore(StreamingStore streamStore)
           
 
Method Summary
static TOFStore currentDirSingleton()
          Returns the only needed TOFStore that pulls things from class resources.
 LookupDatabase getLookup()
           
 StreamingStore getStreamingStore()
           
 java.lang.Object loadObject(java.lang.String storagePath)
          Returns an object for the given storage path; null if the named object is not in the store.
 void setLookup(LookupDatabase newLookup)
           
 void setStreamingStore(StreamingStore newStore)
           
static TOFStore singleton()
          Returns the only needed TOFStore that pulls things from class resources.
 void storeObject(java.lang.String storagePath, java.lang.Object object)
          Stores the object using the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TOFStore

public TOFStore()

TOFStore

public TOFStore(StreamingStore streamStore)
Method Detail

singleton

public static TOFStore singleton()
Returns the only needed TOFStore that pulls things from class resources.


currentDirSingleton

public static TOFStore currentDirSingleton()
Returns the only needed TOFStore that pulls things from class resources.


loadObject

public java.lang.Object loadObject(java.lang.String storagePath)
Returns an object for the given storage path; null if the named object is not in the store. Loads TOF objects from TOF files, and String objects from HTML or .txt files.

Specified by:
loadObject in interface StructuredStore

storeObject

public void storeObject(java.lang.String storagePath,
                        java.lang.Object object)
                 throws StoreException
Stores the object using the given path. Throws StoreException if storage is not possible.

Specified by:
storeObject in interface StructuredStore
Throws:
StoreException

getStreamingStore

public StreamingStore getStreamingStore()

setStreamingStore

public void setStreamingStore(StreamingStore newStore)

getLookup

public LookupDatabase getLookup()

setLookup

public void setLookup(LookupDatabase newLookup)