Interface DictionaryClient
-
- All Superinterfaces:
ExposedApi
public interface DictionaryClient extends ExposedApi
Dictionary Management API.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDICTIONARY_RESOURCES_NAMEName ofGlobalMapthat contains published dictionaries.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DictionaryInfoapproveDictionary(DictionaryInfo info)Approve pending changes to dictionary identified byinfo.DictionaryInfocloneDictionary(DictionaryInfo source, DictionaryInfo dest)Clone dictionarysourcetodest.DictionaryInfocreateDictionary(DictionaryInfo info)Create dictionaryinfo.DictionaryInfocreateDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId)Add all entries fromcontentStorIdin csv format to dictionary identified byinfo.DictionaryEntrycreateDictionaryEntry(DictionaryEntry entry)Create a dictionary entry.DictionaryInfodeleteDictionary(DictionaryInfo info)Delete dictionaryinfo.DictionaryEntrydeleteDictionaryEntry(DictionaryEntry entry)Delete a dictionary entry.voiddeleteDictionaryFromContentStore(java.lang.String contentStoreId)Deprecated.java.lang.StringexportDictionary(DictionaryInfo info)Export published form of dictionary.AdminQueryResult<DictionaryInfo>getDictionaries(AdminQuery query, int offset, int rows)Get all matching dictionaries.DictionaryInfogetDictionary(RevisionStatus view, DictionaryType type, java.lang.String name, java.lang.String group)Get a dictionary info based on the (type, name, group).AdminQueryResult<DictionaryEntry>getDictionaryEntries(AdminQuery query, int offset, int rows)Get dictionary entries.DictionaryEntrygetDictionaryEntry(RevisionStatus view, java.lang.String entryId)Get a dictionary entry based on its entryId.java.lang.StringgetDictionaryUri(DictionaryInfo info)java.lang.StringgetIndexFeature()AdminQueryResult<DictionaryEntry>getPublishedEntities(java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows)Get a list of published entries for an entity dictionary.voidimportDictionary(java.lang.String contentStoreId)DictionaryInfopublishDictionary(DictionaryInfo info)Publish approved changes to dictionary identified byinfo.DictionaryInforefreshDictionary(DictionaryInfo info)Refresh dictionary identified byinfo.DictionaryInforegisterDictionary(DictionaryInfo info, java.lang.String contentStoreId)Create dictionary defined byinfoand import all dictionary entries atcontentStoreIdin csv format.voidreplaceDictionary(java.lang.String contentStoreId)Replace dictionary with import.DictionaryInforeplaceDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId)Add all entries fromcontentStorIdin csv format to dictionary identified byinfo.DictionaryInforevertDictionary(DictionaryInfo info, boolean recursive)Revert pending changes to dictionary.DictionaryInforevertDictionaryApproval(DictionaryInfo info, boolean recursive)Revert approved changes to dictionary.DictionaryEntryrevertDictionaryEntry(DictionaryEntry entry)Revert pending changes to dictionary entry.DictionaryEntryrevertDictionaryEntryApproval(DictionaryEntry entry)Revert approved changes to dictionary entry.voidstoreDictionaryInContentStore(java.lang.String contentStoreId, byte[] bytes)Deprecated.DictionaryInfoupdateDictionary(DictionaryInfo info)Update dictionaryinfo.DictionaryEntryupdateDictionaryEntry(DictionaryEntry entry)Update a dictionary entry.
-
-
-
Field Detail
-
DICTIONARY_RESOURCES_NAME
static final java.lang.String DICTIONARY_RESOURCES_NAME
Name ofGlobalMapthat contains published dictionaries.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDictionaryUri
java.lang.String getDictionaryUri(DictionaryInfo info)
-
getIndexFeature
java.lang.String getIndexFeature()
-
registerDictionary
DictionaryInfo registerDictionary(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Create dictionary defined byinfoand import all dictionary entries atcontentStoreIdin csv format.Dictionary identified by
infomust not exist.- Throws:
AttivioException
-
createDictionaryEntries
DictionaryInfo createDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Add all entries fromcontentStorIdin csv format to dictionary identified byinfo.Dictionary identified by
infomust already exist.- Throws:
AttivioException
-
cloneDictionary
DictionaryInfo cloneDictionary(DictionaryInfo source, DictionaryInfo dest) throws AttivioException
Clone dictionarysourcetodest.Dictionary type for
sourceanddestmust be the same.- Throws:
AttivioException
-
exportDictionary
java.lang.String exportDictionary(DictionaryInfo info) throws AttivioException
Export published form of dictionary.Returns ContentStore Id where export has been stored.
- Throws:
AttivioException
-
importDictionary
void importDictionary(java.lang.String contentStoreId) throws AttivioException- Throws:
AttivioException
-
storeDictionaryInContentStore
@Deprecated void storeDictionaryInContentStore(java.lang.String contentStoreId, byte[] bytes) throws AttivioExceptionDeprecated.Put the content of bytes into the content store with the given contentStoreId.- Parameters:
contentStoreId-bytes-- Throws:
AttivioException
-
deleteDictionaryFromContentStore
@Deprecated void deleteDictionaryFromContentStore(java.lang.String contentStoreId) throws AttivioExceptionDeprecated.Delete the data from the content store with the supplied contentStoreId.- Parameters:
contentStoreId-- Throws:
AttivioException
-
replaceDictionary
void replaceDictionary(java.lang.String contentStoreId) throws AttivioExceptionReplace dictionary with import.- Throws:
AttivioException
-
replaceDictionaryEntries
DictionaryInfo replaceDictionaryEntries(DictionaryInfo info, java.lang.String contentStoreId) throws AttivioException
Add all entries fromcontentStorIdin csv format to dictionary identified byinfo.All dictionary entries that previously existed for
infowill be removed.Dictionary identified by
infomust already exist.- Throws:
AttivioException
-
createDictionary
DictionaryInfo createDictionary(DictionaryInfo info) throws AttivioException
Create dictionaryinfo.Dictionary must not exist yet.
- Throws:
AttivioException
-
updateDictionary
DictionaryInfo updateDictionary(DictionaryInfo info) throws AttivioException
Update dictionaryinfo.Dictionary must already exist and must not be deleted.
- Throws:
AttivioException
-
deleteDictionary
DictionaryInfo deleteDictionary(DictionaryInfo info) throws AttivioException
Delete dictionaryinfo.Dictionary must already exist and must not be deleted already.
- Throws:
AttivioException
-
revertDictionary
DictionaryInfo revertDictionary(DictionaryInfo info, boolean recursive) throws AttivioException
Revert pending changes to dictionary.Dictionary already must exist
- Throws:
AttivioException
-
revertDictionaryApproval
DictionaryInfo revertDictionaryApproval(DictionaryInfo info, boolean recursive) throws AttivioException
Revert approved changes to dictionary.NOTE: any pending changes will be replaced with current approved version.
Dictionary must already exist
- Throws:
AttivioException
-
createDictionaryEntry
DictionaryEntry createDictionaryEntry(DictionaryEntry entry) throws AttivioException
Create a dictionary entry.Dictionary for entry must exist and dictionary term for entry must not yet exist.
- Throws:
AttivioException
-
updateDictionaryEntry
DictionaryEntry updateDictionaryEntry(DictionaryEntry entry) throws AttivioException
Update a dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId())Dictionary term (if changed) must not exist yet.
Dictionary type/name/id must not be changed.
- Throws:
AttivioException
-
deleteDictionaryEntry
DictionaryEntry deleteDictionaryEntry(DictionaryEntry entry) throws AttivioException
Delete a dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId())- Throws:
AttivioException
-
revertDictionaryEntry
DictionaryEntry revertDictionaryEntry(DictionaryEntry entry) throws AttivioException
Revert pending changes to dictionary entry.DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId())- Throws:
AttivioException
-
revertDictionaryEntryApproval
DictionaryEntry revertDictionaryEntryApproval(DictionaryEntry entry) throws AttivioException
Revert approved changes to dictionary entry.NOTE: any pending changes will be replaced with previously approved version.
DictionaryEntry must exist (identified by
DictionaryEntry.getEntryId())- Throws:
AttivioException
-
getDictionary
DictionaryInfo getDictionary(RevisionStatus view, DictionaryType type, java.lang.String name, java.lang.String group) throws AttivioException
Get a dictionary info based on the (type, name, group).- Throws:
AttivioException
-
getPublishedEntities
AdminQueryResult<DictionaryEntry> getPublishedEntities(java.lang.String name, java.lang.String group, java.lang.String query, int offset, int rows) throws AttivioException
Get a list of published entries for an entity dictionary.The returned entries will be extracted from the published dictionary.
- Parameters:
name- The dictionary name to select entries from.group- The dictionary group to select entries from.query- The prefix query to select terms from dictionary.offset- the offset into the result set for returned entries.rows- the maximum number of entries to return (starting at offset).- Throws:
AttivioException
-
getDictionaries
AdminQueryResult<DictionaryInfo> getDictionaries(AdminQuery query, int offset, int rows) throws AttivioException
Get all matching dictionaries.- Parameters:
query- Query for selecting matching dictionaries.offset- the offset into the result set for returned entries.rows- the maximum number of dictionaries to return (starting at offset)- Throws:
AttivioException
-
getDictionaryEntry
DictionaryEntry getDictionaryEntry(RevisionStatus view, java.lang.String entryId) throws AttivioException
Get a dictionary entry based on its entryId.- Throws:
AttivioException
-
getDictionaryEntries
AdminQueryResult<DictionaryEntry> getDictionaryEntries(AdminQuery query, int offset, int rows) throws AttivioException
Get dictionary entries.- Parameters:
query- Query for selecting matching entries.offset- the offset into the result set for returned entries.rows- the maximum number of entries to return (starting at offset)- Throws:
AttivioException
-
approveDictionary
DictionaryInfo approveDictionary(DictionaryInfo info) throws AttivioException
Approve pending changes to dictionary identified byinfo.- Throws:
AttivioException
-
publishDictionary
DictionaryInfo publishDictionary(DictionaryInfo info) throws AttivioException
Publish approved changes to dictionary identified byinfo.- Throws:
AttivioException
-
refreshDictionary
DictionaryInfo refreshDictionary(DictionaryInfo info) throws AttivioException
Refresh dictionary identified byinfo.For spellcheck dictionaries, this will result in extracting new terms/frequencies from the index.
For all dictionaries, this will result in notifying Query Transformers to reload their dictionary.
- Throws:
AttivioException
-
-