textmaven.dictionaries
Class Server

java.lang.Object
  extended bytextmaven.dictionaries.Server
All Implemented Interfaces:
Globals, IDatabaseServer, IServer

public class Server
extends java.lang.Object
implements IDatabaseServer, Globals

Author:
krebtho

Field Summary
 
Fields inherited from interface textmaven.Globals
C_ATTR_CLASSNAME, C_DICT_BASE_TYPE, C_DICT_TYPE, C_SERVER_BASE_TYPE, C_STEMMER_BASE_TYPE, C_WRITER_BASE_TYPE, CONFIG_FILE, DEFAULT_SENTENCES, DEFAULT_SEPARATOR, NEW_PARA, T_COL_DICTIONARY, T_COL_HOMONYMID, T_COL_ID, T_COL_LEXKEY, T_COL_TRANSLATION, T_COL_WORDCLASS, VERBOSE
 
Constructor Summary
Server()
           
 
Method Summary
 java.sql.Connection getConnection()
          Returns connection to database server
 java.lang.String getDbName()
           
 java.lang.String getDescription()
          Returns server description
 java.lang.String getHost()
           
 java.lang.String getId()
          Gets the identification string of this instance
 java.lang.String getJdbcDriver()
           
 java.lang.String getJdbcDSN()
           
 java.lang.String getPassword()
           
 java.lang.String getPort()
           
 java.lang.String getStartCommand()
           
 ISQLStatementFactory getStatementFactory()
          Returns a StatementFactory instance for this particular server instance without initializing it.
 ISQLStatementFactory getStatementFactory(java.sql.Connection con, java.lang.String tableName)
          Returns a StatementFactory instance for this particular server instance.
 java.lang.String getStopCommand()
           
 java.lang.String getUser()
           
 void setDbName(java.lang.String dbName)
           
 void setDescription(java.lang.String description)
          Sets description for server.
 void setHost(java.lang.String host)
           
 void setId(java.lang.String id)
          Sets identification string
 void setJdbcDriver(java.lang.String driver)
           
 void setJdbcDSN(java.lang.String jdbcDSN)
           
 void setPassword(java.lang.String password)
           
 void setPort(java.lang.String port)
           
 void setStartCommand(java.lang.String startCommand)
           
 void setStatementFactory(java.lang.String aFactoryClass)
           
 void setStopCommand(java.lang.String stopCommand)
           
 void setUser(java.lang.String user)
           
 void start()
          Starts the database server.
static void startServers()
          Starts all configured servers.
 void stop()
          Shutdown database server
static void stopServers()
          Stops all configured servers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server()
Method Detail

startServers

public static void startServers()
Starts all configured servers.


stopServers

public static void stopServers()
Stops all configured servers.


getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from interface: IDatabaseServer
Returns connection to database server

Specified by:
getConnection in interface IDatabaseServer
Returns:
Connection to database server
Throws:
java.sql.SQLException

start

public void start()
Description copied from interface: IServer
Starts the database server.

Specified by:
start in interface IServer

stop

public void stop()
Description copied from interface: IServer
Shutdown database server

Specified by:
stop in interface IServer

setId

public void setId(java.lang.String id)
Description copied from interface: IServer
Sets identification string

Specified by:
setId in interface IServer
Parameters:
id -

getId

public java.lang.String getId()
Description copied from interface: IServer
Gets the identification string of this instance

Specified by:
getId in interface IServer
Returns:
String source identification

getJdbcDriver

public java.lang.String getJdbcDriver()
Specified by:
getJdbcDriver in interface IDatabaseServer
Returns:
Returns the driver.

setJdbcDriver

public void setJdbcDriver(java.lang.String driver)
Specified by:
setJdbcDriver in interface IDatabaseServer
Parameters:
driver - The driver to set.

getHost

public java.lang.String getHost()
Specified by:
getHost in interface IDatabaseServer
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Specified by:
setHost in interface IDatabaseServer
Parameters:
host - The host to set.

getJdbcDSN

public java.lang.String getJdbcDSN()
Specified by:
getJdbcDSN in interface IDatabaseServer
Returns:
Returns the jdbcDSN.

setJdbcDSN

public void setJdbcDSN(java.lang.String jdbcDSN)
Specified by:
setJdbcDSN in interface IDatabaseServer
Parameters:
jdbcDSN - The jdbcDSN to set.

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface IDatabaseServer
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String password)
Specified by:
setPassword in interface IDatabaseServer
Parameters:
password - The password to set.

getPort

public java.lang.String getPort()
Specified by:
getPort in interface IDatabaseServer
Returns:
Returns the port.

setPort

public void setPort(java.lang.String port)
Specified by:
setPort in interface IDatabaseServer
Parameters:
port - The port to set.

getStartCommand

public java.lang.String getStartCommand()
Specified by:
getStartCommand in interface IDatabaseServer
Returns:
Returns the startCommand.

setStartCommand

public void setStartCommand(java.lang.String startCommand)
Specified by:
setStartCommand in interface IDatabaseServer
Parameters:
startCommand - The startCommand to set.

getStopCommand

public java.lang.String getStopCommand()
Specified by:
getStopCommand in interface IDatabaseServer
Returns:
Returns the stopCommand.

setStopCommand

public void setStopCommand(java.lang.String stopCommand)
Specified by:
setStopCommand in interface IDatabaseServer
Parameters:
stopCommand - The stopCommand to set.

getUser

public java.lang.String getUser()
Specified by:
getUser in interface IDatabaseServer
Returns:
Returns the user.

setUser

public void setUser(java.lang.String user)
Specified by:
setUser in interface IDatabaseServer
Parameters:
user - The user to set.

getDescription

public java.lang.String getDescription()
Description copied from interface: IServer
Returns server description

Specified by:
getDescription in interface IServer
Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: IServer
Sets description for server.

Specified by:
setDescription in interface IServer
Parameters:
description - The description to set.

getDbName

public java.lang.String getDbName()
Returns:
Returns the dbName.

setDbName

public void setDbName(java.lang.String dbName)
Parameters:
dbName - The dbName to set.

getStatementFactory

public ISQLStatementFactory getStatementFactory(java.sql.Connection con,
                                                java.lang.String tableName)
Description copied from interface: IServer
Returns a StatementFactory instance for this particular server instance. Statements created by this factory will utilize the specified connection and table name.

Specified by:
getStatementFactory in interface IServer
Parameters:
con - Database connection
tableName - table name to which generated statements will be refer to
Returns:
a ISQLStatementFactory
See Also:
IServer.getStatementFactory(java.sql.Connection, java.lang.String)

getStatementFactory

public ISQLStatementFactory getStatementFactory()
Description copied from interface: IServer
Returns a StatementFactory instance for this particular server instance without initializing it. Before it can be used the init method has to be called. Statements created by this factory will utilize the specified connection and table name.

Specified by:
getStatementFactory in interface IServer
Returns:
a ISQLStatementFactory
See Also:
IServer.getStatementFactory()

setStatementFactory

public void setStatementFactory(java.lang.String aFactoryClass)
Specified by:
setStatementFactory in interface IServer
See Also:
IServer.setStatementFactory(String)


Copyright © 2002-2005 Sourceforge. All Rights Reserved.