maiolum.xml
Class XMLModuleManager

java.lang.Object
  extended bymaiolum.ModuleManager
      extended bymaiolum.xml.XMLModuleManager

public class XMLModuleManager
extends ModuleManager

Represents container holding the BibleModules.


Nested Class Summary
 class XMLModuleManager.XMLModuleBibleFragmentFactory
          This implementation of BibleFragmentFactory serves for retrieving BibleFragments from "subfactories" of modules maintained by outer XMLModuleManager.
 
Field Summary
private  XMLModuleManager.XMLModuleBibleFragmentFactory factory
          Factory, which gives unified access to BibleFragments throughout the all BibleModules in this ModuleManager.
private static org.apache.log4j.Logger logger
          Internal logger associated with this class
private  java.util.Vector modules
          Internal container holding the BibleModule objects.
 
Constructor Summary
XMLModuleManager()
          Empty constructor, does nothing.
 
Method Summary
 void add(BibleModule module)
          Adds given BibleModule to this ModuleManager.
 void add(java.lang.String URI, Edition edition)
          Constructs the new BibleModule from the file specified by given URI, makes an association with given Edition and adds it ModuleManager
 Edition[] getAvailableEditions()
          Retrieves list of all available Editions throughout all BibleModules loaded in this ModuleManager.
 XMLModuleManager.XMLModuleBibleFragmentFactory getFactory()
          Returns the factory associated with this ModuleManager.
 BibleModule getModule(int i)
          Retrieves i-th BibleModule from the BibleManager.
 int getSize()
          Returns number of BibleModules contained in this ModuleManager.
static void main(java.lang.String[] args)
           
 void setFactory(XMLModuleManager.XMLModuleBibleFragmentFactory factory)
          Associates given factory with this ModuleManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modules

private java.util.Vector modules
Internal container holding the BibleModule objects.


factory

private XMLModuleManager.XMLModuleBibleFragmentFactory factory
Factory, which gives unified access to BibleFragments throughout the all BibleModules in this ModuleManager.


logger

private static org.apache.log4j.Logger logger
Internal logger associated with this class

Constructor Detail

XMLModuleManager

public XMLModuleManager()
                 throws java.lang.Exception
Empty constructor, does nothing.

Method Detail

add

public void add(java.lang.String URI,
                Edition edition)
         throws java.lang.Exception
Constructs the new BibleModule from the file specified by given URI, makes an association with given Edition and adds it ModuleManager

Specified by:
add in class ModuleManager
Throws:
java.lang.Exception

add

public void add(BibleModule module)
         throws java.lang.Exception
Adds given BibleModule to this ModuleManager.

Specified by:
add in class ModuleManager
Throws:
java.lang.Exception

getModule

public BibleModule getModule(int i)
Retrieves i-th BibleModule from the BibleManager.

Specified by:
getModule in class ModuleManager

getSize

public int getSize()
Returns number of BibleModules contained in this ModuleManager.

Specified by:
getSize in class ModuleManager

getFactory

public XMLModuleManager.XMLModuleBibleFragmentFactory getFactory()
Returns the factory associated with this ModuleManager.


setFactory

public void setFactory(XMLModuleManager.XMLModuleBibleFragmentFactory factory)
Associates given factory with this ModuleManager.


getAvailableEditions

public Edition[] getAvailableEditions()
Retrieves list of all available Editions throughout all BibleModules loaded in this ModuleManager. In other words, returns all available Editions in this ModuleManager.

Returns:
all available Editions from this ModuleManager as array.

main

public static void main(java.lang.String[] args)