uk.ac.ed.inf.ogsaconfig.garm.reference
Class ReferenceSpaceImp

java.lang.Object
  |
  +--uk.ac.ed.inf.ogsaconfig.garm.reference.ReferenceSpaceImp
All Implemented Interfaces:
ReferenceSpace

public class ReferenceSpaceImp
extends java.lang.Object
implements ReferenceSpace

This class provides an implementation of a ReferenceSpace. It provides an open ended way to add new reference types by passing in all reference identifiers and their associated builders as a map to its constructor


Constructor Summary
ReferenceSpaceImp(java.util.Map builderMap, PersistenceMechanismFactory storeFactory)
           
 
Method Summary
 void cleanup()
          Synchronises any necessary state with storage prior to shutdown
 FileCollection getCollection(java.lang.String ref)
          Returns a file collection chain for the given name
 java.lang.String getReference(FileCollection collection)
          Returns a string name for the given collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceSpaceImp

public ReferenceSpaceImp(java.util.Map builderMap,
                         PersistenceMechanismFactory storeFactory)
Parameters:
builderMap - is a set of pairs between reference type strings and collection builders, for example "dir" -> a DirectoryBuilder
Method Detail

cleanup

public void cleanup()
Description copied from interface: ReferenceSpace
Synchronises any necessary state with storage prior to shutdown

Specified by:
cleanup in interface ReferenceSpace

getCollection

public FileCollection getCollection(java.lang.String ref)
Description copied from interface: ReferenceSpace
Returns a file collection chain for the given name

Specified by:
getCollection in interface ReferenceSpace

getReference

public java.lang.String getReference(FileCollection collection)
Description copied from interface: ReferenceSpace
Returns a string name for the given collection

Specified by:
getReference in interface ReferenceSpace