Hilbert II - Version 0.03.04

org.qedeq.kernel.bo.module
Interface ModuleFactory

All Known Subinterfaces:
Kernel, KernelState
All Known Implementing Classes:
DefaultModuleFactory, KernelContext

public interface ModuleFactory

Access to QEDEQ modules.

Version:
$Revision: 1.2 $

Method Summary
 void clearLocalBuffer()
          Clear local file buffer and all loaded QEDEQ modules.
 String[] getAllLoadedModules()
          Get list of all currently loaded QEDEQ modules.
 String getBufferDirectory()
          Get buffer directory for QEDEQ module files.
 String getGenerationDirectory()
          Get directory for generated files.
 ModuleProperties getModuleProperties(String address)
          Get ModuleProperties for an address.
 void init()
          Initialisation of ModuleFactory.
 boolean loadAllModulesFromQedeq()
          Load all QEDEQ modules from project web directory for current kernel.
 QedeqBo loadModule(ModuleAddress moduleAddress)
          Get a certain module.
 QedeqBo loadModule(QedeqBo module, Specification spec)
          Load a certain module.
 QedeqBo loadModule(String address)
          Get a certain module.
 void removeAllModules()
          Remove all modules from memory.
 

Method Detail

init

public void init()
Initialisation of ModuleFactory. This method should be called from the Kernel directly after switching into ready state. Calling this method in ready state is not supported. TODO mime 20070411: what about an appropriate closing method?


removeAllModules

public void removeAllModules()
Remove all modules from memory.


clearLocalBuffer

public void clearLocalBuffer()
                      throws IOException
Clear local file buffer and all loaded QEDEQ modules.

Throws:
IOException - Deletion of all buffered file was not successful.

loadModule

public QedeqBo loadModule(String address)
                   throws XmlFileExceptionList
Get a certain module.

Parameters:
address - Address of module.
Returns:
Wanted module.
Throws:
XmlFileExceptionList - Module could not be successfully loaded.

loadModule

public QedeqBo loadModule(ModuleAddress moduleAddress)
                   throws XmlFileExceptionList
Get a certain module.

Parameters:
moduleAddress - Address of module.
Returns:
Wanted module.
Throws:
XmlFileExceptionList - Module could not be successfully loaded.

loadModule

public QedeqBo loadModule(QedeqBo module,
                          Specification spec)
                   throws XmlFileExceptionList
Load a certain module.

Parameters:
module - this is the current module.
spec - specification of wanted module.
Returns:
wanted module
Throws:
XmlFileExceptionList - Module could not be successfully loaded.

loadAllModulesFromQedeq

public boolean loadAllModulesFromQedeq()
Load all QEDEQ modules from project web directory for current kernel. LATER mime 20070326: dynamic loading from web page directory

Returns:
Successful loading.

getAllLoadedModules

public String[] getAllLoadedModules()
Get list of all currently loaded QEDEQ modules.

Returns:
All currently loaded QEDEQ modules.

getBufferDirectory

public String getBufferDirectory()
Get buffer directory for QEDEQ module files.

Returns:
buffer directory.

getGenerationDirectory

public String getGenerationDirectory()
Get directory for generated files.

Returns:
Generation directory.

getModuleProperties

public ModuleProperties getModuleProperties(String address)
Get ModuleProperties for an address.

Parameters:
address - Look for this address.
Returns:
Existing or new ModuleProperties, if address is maleformed null is returned.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.