Class DictionaryServiceImpl
- java.lang.Object
-
- org.opencastproject.dictionary.regexp.DictionaryServiceImpl
-
- All Implemented Interfaces:
org.opencastproject.dictionary.api.DictionaryService,org.osgi.service.cm.ManagedService
public class DictionaryServiceImpl extends Object implements org.opencastproject.dictionary.api.DictionaryService, org.osgi.service.cm.ManagedService
This dictionary service implementation applies a pattern to an input string - as many times as it matches - and returns the matches, separated by a space character.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPATTERN_CONFIG_KEY
-
Constructor Summary
Constructors Constructor Description DictionaryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opencastproject.metadata.mpeg7.TextualcleanUpText(String text)Filter the text according to the rules defined by the dictionary implementation used.StringgetPattern()voidsetPattern(String p)voidupdated(Dictionary<String,?> properties)Load configuration
-
-
-
Field Detail
-
PATTERN_CONFIG_KEY
public static final String PATTERN_CONFIG_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPattern
public void setPattern(String p)
-
getPattern
public String getPattern()
-
updated
public void updated(Dictionary<String,?> properties)
Load configuration- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService
-
cleanUpText
public org.opencastproject.metadata.mpeg7.Textual cleanUpText(String text)
Filter the text according to the rules defined by the dictionary implementation used. This implementation uses a regular expression to find matching terms.- Specified by:
cleanUpTextin interfaceorg.opencastproject.dictionary.api.DictionaryService- Returns:
- filtered text
-
-