org.openstreetmap.osmosis.core.store
Interface StoreClassRegister

All Known Implementing Classes:
BaseStoreClassRegister, DynamicStoreClassRegister, StaticStoreClassRegister

public interface StoreClassRegister

Writes class identifiers to a store allowing the class to be identified when the store data is being read back again. This provides the basis for multiple classes to be written to a single store location.


Method Summary
 java.lang.Class<?> getClassFromIdentifier(StoreReader storeReader)
          Returns the class associated with the unique identifier in the store.
 void storeIdentifierForClass(StoreWriter storeWriter, java.lang.Class<?> clazz)
          Stores the unique identifier for the specified class to the store.
 

Method Detail

storeIdentifierForClass

void storeIdentifierForClass(StoreWriter storeWriter,
                             java.lang.Class<?> clazz)
Stores the unique identifier for the specified class to the store.

Parameters:
storeWriter - The store to write class identification data to.
clazz - The class for which an identifier is required.

getClassFromIdentifier

java.lang.Class<?> getClassFromIdentifier(StoreReader storeReader)
Returns the class associated with the unique identifier in the store. An exception will be thrown if the identifier is not recognised.

Parameters:
storeReader - The store to read class identification information from.
Returns:
The class associated with the identifier.