net.spy.translate
Enum TranslateMode

java.lang.Object
  extended by java.lang.Enum<TranslateMode>
      extended by net.spy.translate.TranslateMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TranslateMode>

public enum TranslateMode
extends java.lang.Enum<TranslateMode>

This is the enumerated type that you must use to set the translation mode for the GoogleTranslateScraper.

Author:
Jason Hudgins (jasonlee@spy.net)
See Also:
GoogleTranslateScraper

Enum Constant Summary
ARABIC_TO_ENGLISH
           
CHINESE_SIMPLE_TO_TRADITIONAL
           
CHINESE_TO_ENGLISH
           
CHINESE_TRADITIONAL_TO_SIMPLE
           
ENGLISH_T0_JAPANESE
           
ENGLISH_TO_ARABIC
           
ENGLISH_TO_CHINESE_SIMPLE
           
ENGLISH_TO_CHINESE_TRADITIONAL
           
ENGLISH_TO_FRENCH
           
ENGLISH_TO_GERMAN
           
ENGLISH_TO_ITALIAN
           
ENGLISH_TO_KOREAN
           
ENGLISH_TO_PORTUGUESE
           
ENGLISH_TO_RUSSIAN
           
ENGLISH_TO_SPANISH
           
FRENCH_TO_ENGLISH
           
FRENCH_TO_GERMAN
           
GERMAN_TO_ENGLISH
           
GERMAN_TO_FRENCH
           
ITALIAN_TO_ENGLISH
           
JAPANESE_TO_ENGLISH
           
KOREAN_TO_ENGLISH
           
PORTUGUESE_TO_ENGLISH
           
RUSSIAN_TO_ENGLISH
           
SPANISH_TO_ENGLISH
           
 
Method Summary
static java.util.Collection<java.lang.String> getAllModes()
          Get a collection of all language pair names.
static TranslateMode getByLangPair(java.lang.String langPair)
          Get the TranslateMode by lang pair.
 java.lang.String getLangPair()
           
 java.lang.String getSourceLang()
           
static TranslateMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TranslateMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ENGLISH_TO_RUSSIAN

public static final TranslateMode ENGLISH_TO_RUSSIAN

ENGLISH_TO_FRENCH

public static final TranslateMode ENGLISH_TO_FRENCH

CHINESE_TO_ENGLISH

public static final TranslateMode CHINESE_TO_ENGLISH

CHINESE_SIMPLE_TO_TRADITIONAL

public static final TranslateMode CHINESE_SIMPLE_TO_TRADITIONAL

CHINESE_TRADITIONAL_TO_SIMPLE

public static final TranslateMode CHINESE_TRADITIONAL_TO_SIMPLE

ENGLISH_TO_CHINESE_SIMPLE

public static final TranslateMode ENGLISH_TO_CHINESE_SIMPLE

ENGLISH_TO_CHINESE_TRADITIONAL

public static final TranslateMode ENGLISH_TO_CHINESE_TRADITIONAL

ARABIC_TO_ENGLISH

public static final TranslateMode ARABIC_TO_ENGLISH

ENGLISH_TO_ITALIAN

public static final TranslateMode ENGLISH_TO_ITALIAN

ENGLISH_T0_JAPANESE

public static final TranslateMode ENGLISH_T0_JAPANESE

ENGLISH_TO_GERMAN

public static final TranslateMode ENGLISH_TO_GERMAN

ENGLISH_TO_KOREAN

public static final TranslateMode ENGLISH_TO_KOREAN

ENGLISH_TO_PORTUGUESE

public static final TranslateMode ENGLISH_TO_PORTUGUESE

ENGLISH_TO_SPANISH

public static final TranslateMode ENGLISH_TO_SPANISH

FRENCH_TO_ENGLISH

public static final TranslateMode FRENCH_TO_ENGLISH

FRENCH_TO_GERMAN

public static final TranslateMode FRENCH_TO_GERMAN

GERMAN_TO_ENGLISH

public static final TranslateMode GERMAN_TO_ENGLISH

GERMAN_TO_FRENCH

public static final TranslateMode GERMAN_TO_FRENCH

ITALIAN_TO_ENGLISH

public static final TranslateMode ITALIAN_TO_ENGLISH

JAPANESE_TO_ENGLISH

public static final TranslateMode JAPANESE_TO_ENGLISH

KOREAN_TO_ENGLISH

public static final TranslateMode KOREAN_TO_ENGLISH

PORTUGUESE_TO_ENGLISH

public static final TranslateMode PORTUGUESE_TO_ENGLISH

RUSSIAN_TO_ENGLISH

public static final TranslateMode RUSSIAN_TO_ENGLISH

SPANISH_TO_ENGLISH

public static final TranslateMode SPANISH_TO_ENGLISH

ENGLISH_TO_ARABIC

public static final TranslateMode ENGLISH_TO_ARABIC
Method Detail

values

public static TranslateMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TranslateMode c : TranslateMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TranslateMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getLangPair

public java.lang.String getLangPair()
Returns:
The language pair for the translation operation.

getSourceLang

public java.lang.String getSourceLang()
Returns:
The source language encoding.

getAllModes

public static java.util.Collection<java.lang.String> getAllModes()
Get a collection of all language pair names.


getByLangPair

public static TranslateMode getByLangPair(java.lang.String langPair)
Get the TranslateMode by lang pair.

Parameters:
s - the lang pair argument (e.g. en|fr)
Returns:
a TranslateMode value
Throws:
java.lang.IllegalArgumentException - if the given langPair doesn't correspond to a lang pair this TranslateMode supports
java.lang.NullPointerException - if langPair is null


Copyright © 2008. All Rights Reserved.