All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class multilizer.ServerDictionary

java.lang.Object
   |
   +----multilizer.Dictionary
           |
           +----multilizer.LoginDictionary
                   |
                   +----multilizer.ServerDictionary

public class ServerDictionary
extends LoginDictionary
A dictionary component that gets language and translation data from Dictionary Server.

Set the URL property to contain the host name (or IP address). Set the User and the Password properties specify the user account of Dictionary Server. Set the RemoteDictionaryName property to contain the name of the dictionary. Call the open method to open the dictionary.

An example:

 ServerDictionary dictionary = new ServerDictionary();
 dictionary.setURL("www.multilizer.com");
 dictionary.setRemoteDictionaryName("javadcalc");
 dictionary.setUser("guest");
 dictionary.setPassword("guest");
 dictionary.open();
 

See Also:
DatabaseDictionary

Constructor Index

 o ServerDictionary()

Method Index

 o close()
Closes the dictionary.
 o getLanguageCount()
Gets the amount of the languages in the dictionary.
 o getLanguageData(int)
Gets the specified language.
 o getPort()
Gets the port of MDS.
 o getRemoteDictionaryName()
Gets the name of the dictionary.
 o getTranslationCount()
Returns the translation count.
 o languageChanged(boolean, boolean)
Dictionary calls this method after the current language has been changed.
 o open()
Opens the dictionary.
 o read()
Returns the reply message from the server.
 o send(String)
Sends the message to the server.
 o setPort(int)
Sets the TCP/IP port of MDS.
 o setRemoteDictionaryName(String)
Sets the name of the dictionary.
 o transaction(String)
Makes a transaction to the server.
 o translateString(String)
Returns the translation of the native string in the current language.
 o translateString(String, String, String)
Returns the translation of the context sensitive native string in the current language.

Constructors

 o ServerDictionary
 public ServerDictionary()

Methods

 o getLanguageCount
 public int getLanguageCount()
Gets the amount of the languages in the dictionary.

Overrides:
getLanguageCount in class Dictionary
 o getLanguageData
 public Language getLanguageData(int index)
Gets the specified language.

Overrides:
getLanguageData in class Dictionary
 o getTranslationCount
 public int getTranslationCount()
Returns the translation count.

Overrides:
getTranslationCount in class Dictionary
 o translateString
 protected String translateString(String str)
Returns the translation of the native string in the current language.

Overrides:
translateString in class Dictionary
 o translateString
 protected String translateString(String str,
                                  String form,
                                  String component)
Returns the translation of the context sensitive native string in the current language.

Overrides:
translateString in class Dictionary
 o languageChanged
 protected void languageChanged(boolean languageChanged,
                                boolean localeChanged)
Dictionary calls this method after the current language has been changed.

Overrides:
languageChanged in class Dictionary
 o open
 public void open()
Opens the dictionary.

Overrides:
open in class Dictionary
 o close
 public void close()
Closes the dictionary.

Overrides:
close in class Dictionary
 o send
 protected void send(String msg) throws IOException
Sends the message to the server.

Parameters:
msg - the message to be sent
 o read
 protected String read() throws IOException
Returns the reply message from the server.

 o transaction
 protected String transaction(String msg)
Makes a transaction to the server. A transaction means sending a message and waiting a reply for it.

Parameters:
msg - the message to be send
Returns:
the reply message from the server
 o setPort
 public void setPort(int value)
Sets the TCP/IP port of MDS. The default is 1099.

 o getPort
 public int getPort()
Gets the port of MDS.

 o setRemoteDictionaryName
 public void setRemoteDictionaryName(String value)
Sets the name of the dictionary.

 o getRemoteDictionaryName
 public String getRemoteDictionaryName()
Gets the name of the dictionary.


All Packages  Class Hierarchy  This Package  Previous  Next  Index