ar.com.ktulu.dict
Class VirtualDatabase

java.lang.Object
  |
  +--ar.com.ktulu.dict.Database
        |
        +--ar.com.ktulu.dict.VirtualDatabase

public class VirtualDatabase
extends Database

Container for grouping several databases into a virtual one. The names * and ! are special cases, so you must not create an instance using any of those names.

Author:
Luis Parravicini

Constructor Summary
VirtualDatabase(java.lang.String name, java.util.Collection databases)
           
 
Method Summary
 Matches define(java.lang.String word)
          Used by the server to process a "DEFINE" command.
 Definition getWordDefinition(Key k)
          Returns the definition of the word stored in k.
 int keySize()
          Returns the number of headwords in the database.
 Matches match(java.lang.String word, Strategy strat)
          Used by the server to process a "MATCH" command.
 
Methods inherited from class ar.com.ktulu.dict.Database
getInfo, getName, getProperty, getProperty, getShortInfo, setInfo, setName, setShortInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualDatabase

public VirtualDatabase(java.lang.String name,
                       java.util.Collection databases)
Method Detail

keySize

public int keySize()
            throws DatabaseException
Description copied from class: Database
Returns the number of headwords in the database.

Specified by:
keySize in class Database
DatabaseException

define

public Matches define(java.lang.String word)
               throws DatabaseException
Description copied from class: Database
Used by the server to process a "DEFINE" command.

Specified by:
define in class Database
DatabaseException

getWordDefinition

public Definition getWordDefinition(Key k)
                             throws DatabaseException
Description copied from class: Database
Returns the definition of the word stored in k.

Specified by:
getWordDefinition in class Database
DatabaseException

match

public Matches match(java.lang.String word,
                     Strategy strat)
              throws DatabaseException
Description copied from class: Database
Used by the server to process a "MATCH" command.

Specified by:
match in class Database
DatabaseException