public class JSDictionaryManager extends JSBaseScriptableObject
Constructor and Description |
---|
JSDictionaryManager() |
Modifier and Type | Method and Description |
---|---|
void |
(JavaScript Function) addWord(java.lang.String theDictionaryName,
java.lang.String theWord,
java.lang.String theSynonyms,
java.lang.String theThesaurus)
Add a word to the dictionary, if dictionary not found or word exists, nothing happens
|
boolean |
(JavaScript Function) createEmptyDictionary(java.lang.String theDictionaryName)
Creates an empty dictionary with the specified name.
|
boolean |
(JavaScript Function) dictionaryExists(java.lang.String theDictionaryName)
Returns true if the specified dictionary exists.
|
org.mozilla.javascript.NativeArray |
(JavaScript Function) findWords(java.lang.String theDictionaryName,
java.lang.String theValue,
int theNumberOfResults,
boolean theExactMatch)
Given the value, find any words that match in the given dictionary.
|
java.lang.String |
(JavaScript Function) getSynonyms(java.lang.String theDictionaryName,
java.lang.String theWord,
boolean theExactMatch)
Returns the synonyms for the specified word in the specified dictionary.
|
void |
(JavaScript Function) removeWord(java.lang.String theDictionaryName,
java.lang.String theWord)
Removes the specified word from the specified dictionary.
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public boolean (JavaScript Function) dictionaryExists(java.lang.String theDictionaryName)
theDictionaryName
- the dictionary namepublic boolean (JavaScript Function) createEmptyDictionary(java.lang.String theDictionaryName)
theDictionaryName
- public void (JavaScript Function) addWord(java.lang.String theDictionaryName, java.lang.String theWord, java.lang.String theSynonyms, java.lang.String theThesaurus)
theDictionaryName
- the dictionary nametheWord
- the word to potentially addtheSynonyms
- the synonyms (may be null)theThesaurus
- the thesaurus (may be null)public void (JavaScript Function) removeWord(java.lang.String theDictionaryName, java.lang.String theWord)
theDictionaryName
- the dictionary nametheWord
- the word to removepublic org.mozilla.javascript.NativeArray (JavaScript Function) findWords(java.lang.String theDictionaryName, java.lang.String theValue, int theNumberOfResults, boolean theExactMatch)
theDictionaryName
- the dictionary to search intheValue
- the valuetheNumberOfResults
- the limit of the number of resultstheExactMatch
- Specifies whether to do exact match (true) or include wildcard at end of word (false). Default is false. (Optional parameter.)public java.lang.String (JavaScript Function) getSynonyms(java.lang.String theDictionaryName, java.lang.String theWord, boolean theExactMatch)
theDictionaryName
- theWord
- theExactMatch
- Specifies whether to do exact match (true) or include wildcard at end of word (false). Default is false. (Optional parameter.)Copyright © 2017 MediaBeacon, Inc. All Rights Reserved.