org.olat.core.commons.modules.glossary.morphService
Class MorphologicalServiceLocalImpl

java.lang.Object
  extended by org.olat.core.commons.modules.glossary.morphService.MorphologicalServiceLocalImpl
All Implemented Interfaces:
MorphologicalService

public class MorphologicalServiceLocalImpl
extends java.lang.Object
implements MorphologicalService

Description:
Simulates a morphological Service and delivers the reply from a local XML-file. It's used only for testing! This is why some return values are "hard coded".

Initial Date: 7.12.2008

Author:
Roman Haag, frentix GmbH, roman.haag@frentix.com

Field Summary
 
Fields inherited from interface org.olat.core.commons.modules.glossary.morphService.MorphologicalService
STATUS_ERROR, STATUS_GUESSED, STATUS_KNOWN
 
Constructor Summary
MorphologicalServiceLocalImpl()
           
 
Method Summary
 java.lang.String assumePartOfSpeech(java.lang.String glossTerm)
          returns part-of-speech for a given word or wordgroup
 java.util.ArrayList<java.lang.String> getFlexions(java.lang.String word)
          same as getFlexions(String partOfSpeech, String word) but with automatic assumption of partofspeech
 java.util.ArrayList<java.lang.String> getFlexions(java.lang.String partOfSpeech, java.lang.String word)
          returns a list of Flexions found for a given word.
 java.lang.String getMorphServiceDescriptor()
          get service name as description in guis
 java.lang.String getMorphServiceIdentifier()
          get unique identifier to store with glossary-config
 java.lang.String getReplyStatus()
          Get the Status from the reply arrived from the morphological service status can either be: - known Flexions were found in Lexicon - guessed Flexions were generated with heuristics - error Couldn't find anything or service error / unavailable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MorphologicalServiceLocalImpl

public MorphologicalServiceLocalImpl()
Method Detail

getFlexions

public java.util.ArrayList<java.lang.String> getFlexions(java.lang.String partOfSpeech,
                                                         java.lang.String word)
Description copied from interface: MorphologicalService
returns a list of Flexions found for a given word.

Specified by:
getFlexions in interface MorphologicalService
Parameters:
partOfSpeech - possible values, see: assumePartOfSpeech()
word - a single word or a wordgroup
Returns:
list of flexions found with a morphological service
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceClient#getFlexions(java.lang.String, java.lang.String)

assumePartOfSpeech

public java.lang.String assumePartOfSpeech(java.lang.String glossTerm)
Description copied from interface: MorphologicalService
returns part-of-speech for a given word or wordgroup

Specified by:
assumePartOfSpeech in interface MorphologicalService
Returns:
part of speech, which can be: - a for an adjective "schön" - n for a noun "Haus" - an for adjective and noun "schönes Haus"
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceClient#assumePartOfSpeech(java.lang.String)

getFlexions

public java.util.ArrayList<java.lang.String> getFlexions(java.lang.String word)
Description copied from interface: MorphologicalService
same as getFlexions(String partOfSpeech, String word) but with automatic assumption of partofspeech

Specified by:
getFlexions in interface MorphologicalService
Returns:
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceClient#getFlexions(java.lang.String)

getReplyStatus

public java.lang.String getReplyStatus()
Description copied from interface: MorphologicalService
Get the Status from the reply arrived from the morphological service status can either be: - known Flexions were found in Lexicon - guessed Flexions were generated with heuristics - error Couldn't find anything or service error / unavailable

Specified by:
getReplyStatus in interface MorphologicalService
Returns:
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceClient#getReplyStatus()

getMorphServiceDescriptor

public java.lang.String getMorphServiceDescriptor()
Description copied from interface: MorphologicalService
get service name as description in guis

Specified by:
getMorphServiceDescriptor in interface MorphologicalService
Returns:
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceManager#getFlexionServiceDescriptor()

getMorphServiceIdentifier

public java.lang.String getMorphServiceIdentifier()
Description copied from interface: MorphologicalService
get unique identifier to store with glossary-config

Specified by:
getMorphServiceIdentifier in interface MorphologicalService
Returns:
See Also:
org.olat.core.commons.modules.glossary.morphService.FlexionServiceManager#getFlexionServiceIdentifier()