com.hack23.cia.service.impl
Class TranslatorImpl

Package class diagram package TranslatorImpl
java.lang.Object
  extended by com.hack23.cia.service.impl.TranslatorImpl
All Implemented Interfaces:
Translator

@Service(value="Translator")
public class TranslatorImpl
extends Object
implements Translator

The Class TranslatorImpl.


Field Summary
static com.google.api.translate.Language STANDARD_PROTOCOL
          The Constant STANDARD_PROTOCOL.
static com.google.api.translate.Language SWEDISH_LANGUAGE
          The Constant SWEDISH_LANGUAGE.
 
Constructor Summary
TranslatorImpl()
           
 
Method Summary
 String translate(String text, com.google.api.translate.Language from, com.google.api.translate.Language to)
          Translate.
 String translateFromStandardProtocol(String text, com.google.api.translate.Language to)
          Translate from standard protocol.
 String translateFromSwedish(String text, com.google.api.translate.Language to)
          Translate from swedish.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_PROTOCOL

public static final com.google.api.translate.Language STANDARD_PROTOCOL
The Constant STANDARD_PROTOCOL.


SWEDISH_LANGUAGE

public static final com.google.api.translate.Language SWEDISH_LANGUAGE
The Constant SWEDISH_LANGUAGE.

Constructor Detail

TranslatorImpl

public TranslatorImpl()
Method Detail

translate

@Cacheable(cacheName="Translations")
public String translate(String text,
                                  com.google.api.translate.Language from,
                                  com.google.api.translate.Language to)
Description copied from interface: Translator
Translate.

Specified by:
translate in interface Translator
Parameters:
text - the text
from - the from
to - the to
Returns:
the string

translateFromStandardProtocol

@Cacheable(cacheName="TranslationsToEnglish")
public String translateFromStandardProtocol(String text,
                                                      com.google.api.translate.Language to)
Description copied from interface: Translator
Translate from standard protocol.

Specified by:
translateFromStandardProtocol in interface Translator
Parameters:
text - the text
to - the to
Returns:
the string

translateFromSwedish

@Cacheable(cacheName="TranslationsFromSwedish")
public String translateFromSwedish(String text,
                                             com.google.api.translate.Language to)
Description copied from interface: Translator
Translate from swedish.

Specified by:
translateFromSwedish in interface Translator
Parameters:
text - the text
to - the to
Returns:
the string


Copyright © 2008-2011 www.hack23.com. All Rights Reserved.