edu.northwestern.at.monk.model
Class ModelInit

java.lang.Object
  extended by edu.northwestern.at.monk.model.ModelInit

public class ModelInit
extends java.lang.Object

Model initialization.

You must call the initialization method ModelInit.init before you can use the model.

The initialization method reads all the core objects into memory for efficient access. This includes all the lemmas and all the spellings, which can be large collections. This can take a long time, from half a minute or so on a fast network connection to much too long over a DSL line.

This architecture optimizes the model for use in the Monk server, which is presumably started infrequently and which presumably is running on the same host as the underlying database. It is not optimal for end-user application programs which need to access the static data. These programs are written to the Monk server API, not to the model API described here. Only the Monk server uses the model package directly.

You may call Modelnit.init more than once, but all calls after the first one are ignored.

See Also:
MONK Datastore Overview, Licensing Agreement

Method Summary
static void init(java.lang.String driverClassName, java.lang.String url, java.lang.String username, java.lang.String password, int maxPoolSize)
          Initializes the model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static void init(java.lang.String driverClassName,
                        java.lang.String url,
                        java.lang.String username,
                        java.lang.String password,
                        int maxPoolSize)
                 throws ModelException
Initializes the model.

Parameters:
driverClassName - Driver class name.
url - Database url.
username - Database username.
password - Database password.
maxPoolSize - Maximum connection pool size - the maximum number of concurrent connections.
Throws:
ModelException -
Unable to initialize model