xsmeral.semnet.sink
Class RepositoryFactory

java.lang.Object
  extended by xsmeral.semnet.sink.RepositoryFactory
Direct Known Subclasses:
NativeStoreFactory, RdbmsStoreFactory

public abstract class RepositoryFactory
extends Object

Base class for Sesame repository factories.
It is configured with a Properties instance containing any implementation-specific parameters.

See Also:
Repository

Field Summary
static String PROP_WORKING_DIR
           
 
Constructor Summary
RepositoryFactory()
           
 
Method Summary
 Properties getProperties()
          Returns the initialization Properties.
 Repository getRepository()
          Should be called only after initialization and return initialized repository.
protected abstract  void initialize()
          Instantiates and initializes the Repository.
 void initialize(Properties props)
          Sets the properties and calls initialize()
protected  void setRepository(Repository repo)
          Called by the factory, sets the initialized repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_WORKING_DIR

public static final String PROP_WORKING_DIR
See Also:
Constant Field Values
Constructor Detail

RepositoryFactory

public RepositoryFactory()
Method Detail

getRepository

public final Repository getRepository()
Should be called only after initialization and return initialized repository.

Returns:
Initialized sesame repository

setRepository

protected void setRepository(Repository repo)
Called by the factory, sets the initialized repository.


getProperties

public final Properties getProperties()
Returns the initialization Properties.


initialize

public final void initialize(Properties props)
                      throws RepositoryException
Sets the properties and calls initialize()

Parameters:
props -
Throws:
RepositoryException - If the repository fails to initialize

initialize

protected abstract void initialize()
                            throws RepositoryException
Instantiates and initializes the Repository. Should call setRepository(repo)

Throws:
RepositoryException - In case of any error with repository initialization