public class JSDictionaryManager extends JSBaseScriptableObject
Constructor and Description |
---|
JSDictionaryManager() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
jsFunction_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
|
JSDictionary |
jsFunction_createDictionaryFromFile(java.lang.String theName,
java.lang.String theDescription,
boolean theIsDynamic,
IFileObject theFile)
Creates a dictionary (either regular or dynamic) with the specified name from the specified file.
|
void |
jsFunction_createDynamicRow(JSDictionary theDictionary,
org.mozilla.javascript.NativeArray theWordsList)
Creates a new row from the specified words in the specified dynamic dictionary.
|
boolean |
jsFunction_createEmptyDictionary(java.lang.String theDictionaryName)
Creates an empty dictionary with the specified name.
|
void |
jsFunction_deleteDictionary(JSDictionary theDictionary)
Deletes the specified dictionary, either regular or dynamic.
|
void |
jsFunction_deleteDynamicRow(JSDictionary theDictionary,
org.mozilla.javascript.NativeArray theWordsList)
Removes the specified row from the specified dynamic dictionary.
|
boolean |
jsFunction_dictionaryExists(java.lang.String theDictionaryName)
Returns true if the specified dictionary exists.
|
java.lang.Integer |
jsFunction_findDictionaryIdByUUID(java.lang.String theUUID)
Method returns the dictionary id associated with the word found by using this UUID
|
JSWord[] |
jsFunction_findJSWords(java.lang.String theDictionaryName,
java.lang.String theValue,
int theNumberOfResults,
boolean theExactMatch)
Given the value, find any JSWords that match in the given dictionary.
|
org.mozilla.javascript.NativeArray |
jsFunction_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.
|
org.mozilla.javascript.NativeObject |
jsFunction_getDictionaryByName(java.lang.String theName)
Deprecated.
Use jsFunction_getJSDictionaryByName(java.lang.String)
|
java.lang.String |
jsFunction_getDictionaryName(int theId)
Returns the dictionary name for the specified id.
|
java.lang.String[] |
jsFunction_getDynamicColumns(JSDictionary theDictionary,
boolean theToLowercase)
Returns the array of table columns for the dynamic dictionary, in either natural or lower case.
|
java.lang.String[] |
jsFunction_getDynamicHeaders(JSDictionary theDictionary)
Returns the array of column headers (original CSV column names) for the dynamic dictionary.
|
org.mozilla.javascript.NativeArray |
jsFunction_getDynamicWords(JSDictionary theDictionary,
int theOffset,
int theLimit,
org.mozilla.javascript.NativeArray theColumnFilters,
java.lang.String theSortColumn,
java.lang.String theSolrDir)
Returns the specified page of words for the specified dynamic dictionary table, column filters, and sort.
|
JSDictionary |
jsFunction_getJSDictionaryByName(java.lang.String theName)
Gets all the information about a dictionary by name.
|
java.lang.String |
jsFunction_getSynonyms(java.lang.String theDictionaryName,
java.lang.String theWord,
boolean theExactMatch)
Returns the synonyms for the specified word in the specified dictionary.
|
java.lang.String |
jsFunction_getThesaurus(java.lang.String theDictionaryName,
java.lang.String theWord,
boolean theExactMatch)
Returns the thesuarus for the specified word in the specified dictionary.
|
org.mozilla.javascript.NativeArray |
jsFunction_getWordsForSynonym(java.lang.String theDictionaryName,
java.lang.String theSynonym)
Returns an array of words from the specified dictionary that have the given synonym.
|
org.mozilla.javascript.NativeArray |
jsFunction_listDictionaries()
Lists all the dictionaries (dictionary names).
|
org.mozilla.javascript.NativeArray |
jsFunction_listDictionaryNames()
Lists all the dictionaries (dictionary names).
|
org.mozilla.javascript.NativeArray |
jsFunction_listWords(java.lang.String theDictionaryName)
Returns the array of words in the specified dictionary.
|
void |
jsFunction_rebuildNormalizedSynonyms()
Rebuild the j101t_synonyms_norm table from the contents of j72t_synonyms
|
boolean |
jsFunction_removeWord(java.lang.String theDictionaryName,
java.lang.String theWord)
Removes the specified word from the specified dictionary.
|
void |
jsFunction_renameWordByName(java.lang.String theDictionaryName,
java.lang.String theWord,
java.lang.String theNewWord)
Renames the specified word in the specified dictionary.
|
void |
jsFunction_renameWordByUUID(java.lang.String theUUID,
java.lang.String theNewWord)
Renames the word in a particular dictionary, as specified by the UUID.
|
void |
jsFunction_updateDynamicWord(JSDictionary theDictionary,
int theColumnIndex,
java.lang.String theNewWord,
org.mozilla.javascript.NativeArray theWordsList)
Updates the specified dynamic dictionary row at the specified index with the specified word.
|
void |
jsFunction_updateWord(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 does not exist, nothing happens
|
void |
jsFunction_updateWordByUUID(java.lang.String theUUID,
java.lang.String theSynonyms,
java.lang.String theThesaurus)
Update a word's related content (synonyms, thesaurus) by looking up by UUID
|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public org.mozilla.javascript.NativeArray jsFunction_listDictionaries()
public org.mozilla.javascript.NativeArray jsFunction_listDictionaryNames()
public void jsFunction_rebuildNormalizedSynonyms()
public boolean jsFunction_dictionaryExists(java.lang.String theDictionaryName)
theDictionaryName
- the dictionary namepublic boolean jsFunction_createEmptyDictionary(java.lang.String theDictionaryName)
theDictionaryName
- public java.lang.Integer jsFunction_findDictionaryIdByUUID(java.lang.String theUUID)
theUUID
- the UUID of the wordpublic java.lang.String jsFunction_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 jsFunction_renameWordByName(java.lang.String theDictionaryName, java.lang.String theWord, java.lang.String theNewWord)
theDictionaryName
- the dictionary.theWord
- the word to rename.theNewWord
- the new (renamed) word.public void jsFunction_renameWordByUUID(java.lang.String theUUID, java.lang.String theNewWord)
theUUID
- the UUID of the word in a particular dictionary to rename.theNewWord
- the new (renamed) word.public void jsFunction_updateWordByUUID(java.lang.String theUUID, java.lang.String theSynonyms, java.lang.String theThesaurus)
theUUID
- the UUID to updatetheSynonyms
- the synonyms to overwrite (may be null)theThesaurus
- the thesaurus to overwrite (may be null)public void jsFunction_updateWord(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 boolean jsFunction_removeWord(java.lang.String theDictionaryName, java.lang.String theWord)
theDictionaryName
- the dictionary nametheWord
- the word to removepublic org.mozilla.javascript.NativeArray jsFunction_findWords(java.lang.String theDictionaryName, java.lang.String theValue, int theNumberOfResults, boolean theExactMatch)
theDictionaryName
- the dictionary to search in (name or ID)theValue
- 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 JSWord[] jsFunction_findJSWords(java.lang.String theDictionaryName, java.lang.String theValue, int theNumberOfResults, boolean theExactMatch)
theDictionaryName
- the dictionary to search in (name or ID)theValue
- 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 org.mozilla.javascript.NativeArray jsFunction_getWordsForSynonym(java.lang.String theDictionaryName, java.lang.String theSynonym)
theSynonym
- the synonym.public org.mozilla.javascript.NativeArray jsFunction_listWords(java.lang.String theDictionaryName)
theDictionaryName
- the dictionary.public java.lang.String jsFunction_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.)public java.lang.String jsFunction_getThesaurus(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.)public java.lang.String jsFunction_getDictionaryName(int theId)
theId
- the dictionary id.public org.mozilla.javascript.NativeObject jsFunction_getDictionaryByName(java.lang.String theName)
theName
- the name to query.JSDictionaryManager.jsFunction_getJSDictionaryByName(java.lang.String)
public JSDictionary jsFunction_getJSDictionaryByName(java.lang.String theName)
theName
- the name to query.public JSDictionary jsFunction_createDictionaryFromFile(java.lang.String theName, java.lang.String theDescription, boolean theIsDynamic, IFileObject theFile)
theName
- the dictionary name.theDescription
- the dictionary name.theIsDynamic
- is this a dynamic dictionary?theFile
- the file (CSV, XLS, XLSX) to create the dictionary from.public void jsFunction_deleteDictionary(JSDictionary theDictionary)
theDictionary
- the dictionary.public java.lang.String[] jsFunction_getDynamicColumns(JSDictionary theDictionary, boolean theToLowercase)
theDictionary
- the dynamic dictionary.theToLowercase
- convert to all lowercase (vs natural case)?public java.lang.String[] jsFunction_getDynamicHeaders(JSDictionary theDictionary)
theDictionary
- the dynamic dictionary.public org.mozilla.javascript.NativeArray jsFunction_getDynamicWords(JSDictionary theDictionary, int theOffset, int theLimit, org.mozilla.javascript.NativeArray theColumnFilters, java.lang.String theSortColumn, java.lang.String theSolrDir)
theDictionary
- the dynamic dictionary.theOffset
- the page number (0-based).theLimit
- the page size.theColumnFilters
- the column filters. (No filtering/return all columns, if null/not defined.)theSortColumn
- the sort column. (The first column, if null/not defined.)theSolrDir
- the sort direction ("ASC" or "DESC"). ("ASC", if null/not defined.)public void jsFunction_deleteDynamicRow(JSDictionary theDictionary, org.mozilla.javascript.NativeArray theWordsList)
theDictionary
- the dynamic dictionary.theWordsList
- the words of the row to delete.public void jsFunction_createDynamicRow(JSDictionary theDictionary, org.mozilla.javascript.NativeArray theWordsList)
theDictionary
- the dynamic dictionary.theWordsList
- the words of the row to create.public void jsFunction_updateDynamicWord(JSDictionary theDictionary, int theColumnIndex, java.lang.String theNewWord, org.mozilla.javascript.NativeArray theWordsList)
theDictionary
- the dictionary.theColumnIndex
- the column index to update.theNewWord
- the new word.theWordsList
- the existing words of the row to update (to search on).Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.