dict.common
Class DictType

java.lang.Object
  extended by dict.common.DictType

public class DictType
extends java.lang.Object

Enumeration of dictionary types.


Field Summary
static int DEFAULT
          Default dictionary type.
static int DICTCC
          dict.cc dictionary type.
static java.lang.String ENCODING
           
static java.lang.String[] NAMES
          Names for dictionary types.
static int THES
          Polish and German thesaurus.
static int UDDL
          UDDL text file dictionary type.
 
Constructor Summary
DictType()
           
 
Method Summary
static int fromString(java.lang.String aTypeName)
          Converts the given name into the valid dictionary type ID.
static java.lang.String toString(int aType)
          Converts the given type to a string value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING

public static final java.lang.String ENCODING
See Also:
Constant Field Values

NAMES

public static final java.lang.String[] NAMES
Names for dictionary types.


DICTCC

public static final int DICTCC
dict.cc dictionary type.

See Also:
Constant Field Values

UDDL

public static final int UDDL
UDDL text file dictionary type. http://www.dicts.info/uddl.php

See Also:
Constant Field Values

THES

public static final int THES
Polish and German thesaurus. http://www.openthesaurus.de, http://synonimy.ux.pl.

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
Default dictionary type. Used as start setting or as value, if the program doesn't know a better one.

See Also:
Constant Field Values
Constructor Detail

DictType

public DictType()
Method Detail

toString

public static java.lang.String toString(int aType)
Converts the given type to a string value

Parameters:
aType - the type id, eg. DICTCC, UDDL or THES.
Returns:
the name for the given type or an empty string if not found.

fromString

public static int fromString(java.lang.String aTypeName)
Converts the given name into the valid dictionary type ID.

Parameters:
aTypeName - the name for the type, one of NAMES.
Returns:
the corresponding ID for the type name or DEFAULT, if not found.