public class OracleContentStorageManager extends S_LibrarySessionContentStorageManager
A ContentStorageManager ("CSM") is created for and bound to each S_LibrarySession. CSM mediates access to the subsystem that stores, retrieves, and otherwise manages binary content. This subsystem includes:
CONTEXTROUTERTABLE_TABLENAME, INDEXINGSTATE_AWAITING_EXTRACTION
Modifier | Constructor and Description |
---|---|
protected |
OracleContentStorageManager(S_LibrarySession session)
Constructs a CSM for Oracle.
|
Modifier and Type | Method and Description |
---|---|
int |
deleteOldFilteredContent(S_LibrarySession session,
long age)
Delete old filtered content entries.
|
void |
destroyTextRenditions(S_ContentObject co)
Destroy all text renditions: themes, summaries, and filtered content.
|
void |
dispose()
Disposes this CSM.
|
protected void |
extractContentForIndexing(S_ContentObject co)
For the specified ContentObject, extracts the content and loads it into
the INDEXABLECONTENT column in the corresponding ODMZ_CONTEXT_ROUTER row.
|
void |
filterContent(S_ContentObject co,
boolean plaintext)
Generate filtered content for the specified ContentObject.
|
void |
generateSummary(S_ContentObject co,
String pointOfView,
long sizeAsPercent,
long sizeAsNumParagraphs,
String summaryLevel)
Generate Summary for specified ContentObject.
|
void |
generateThemes(S_ContentObject co,
boolean fullThemes)
Generate Themes for specified ContentObject.
|
static ContextTable[] |
getContextTables(S_LibrarySession sess)
Called by search.
|
Reader |
getFilteredContent(S_ContentObject co)
Gets the filtered content for specified ContentObject.
|
String |
getFullTextIndexName()
Gets the name of the full text index.
|
static String |
getIndexName() |
Reader |
getSummary(S_ContentObject co,
String pointOfView)
Gets the summary for specified ContentObject and point of view.
|
ContextTheme[] |
getThemes(S_ContentObject co)
Gets the generate Themes for specified ContentObject.
|
void |
insertIntoContextRouter(Long coId,
Long coClassId,
Long cid,
S_Media media,
S_ContentVaultEntry cve,
long contentSize,
String ianaCharacterSet,
String oracleLanguage,
boolean text,
boolean indirectFullTextIndexing)
Inserts a row in the context router table.
|
void |
invalidateFilteredContent(S_ContentObject co)
Invalidates any Filtered Content that was generated for specified ContentObject.
|
void |
invalidateSummaries(S_ContentObject co)
Invalidates any Summary that was generated for specified ContentObject.
|
void |
invalidateThemes(S_ContentObject co)
Invalidates any Themes that have been generated for specified ContentObject.
|
boolean |
isFullTextIndexingEnabled()
Gets whether full-text indexing is enabled.
|
void |
manuallyInsertIntoContextRouter(S_ContentObject co,
Reader reader)
Insert of a row in the context router table for the
case of manual text indexing.
|
void |
registerBfile(Object bfileObj)
Binds the specified BFILE to this session.
|
void |
syncIndex()
Sync's the index.
|
void |
unregisterBfile(Object bfileObj)
Unbinds the specified BFILE from this session.
|
acquireByteBuffer, deleteFromContextRouter, destroyContent, extractContentForIndexing, getByteBufferSize, getContentByRandomAccess, getContentReader, getContentStream, getLastAccessDate, getNewContentID, getOracleCharacterSet, getSession, registerRandomAccessor, releaseByteBuffer, resolveCharacterSet, retrieveSerializedObject, selectMedia, setContentProperties, storeSerializedObject, unregisterRandomAccessor, updateContentByRandomAccess, updateLastAccessDate, validateMedia, validateMediaAndSetContent, verifyCanDestroyContent
protected OracleContentStorageManager(S_LibrarySession session) throws IfsException
session
- the sesion to which this CSM belongs; requiredIfsException
- if the operation failspublic void dispose()
dispose
in interface ContentStorageManager
dispose
in class S_LibrarySessionContentStorageManager
public void registerBfile(Object bfileObj) throws IfsException
registerBfile
in interface ContentStorageManager
registerBfile
in class S_LibrarySessionContentStorageManager
bfileObj
- the BFILEIfsException
- if the operation failspublic void unregisterBfile(Object bfileObj) throws IfsException
unregisterBfile
in interface ContentStorageManager
unregisterBfile
in class S_LibrarySessionContentStorageManager
bfileObj
- the BFILEIfsException
- if the operation failspublic boolean isFullTextIndexingEnabled() throws IfsException
Each invocation of this method queries the database.
S_LibrarySession.isFullTextIndexingEnabled()
caches the value
returned by this method, and should almost always be used instead of
this method.
isFullTextIndexingEnabled
in interface ContentStorageManager
isFullTextIndexingEnabled
in class S_LibrarySessionContentStorageManager
IfsException
- if the operation failspublic String getFullTextIndexName()
getFullTextIndexName
in interface ContentStorageManager
getFullTextIndexName
in class S_LibrarySessionContentStorageManager
public static String getIndexName()
public static ContextTable[] getContextTables(S_LibrarySession sess) throws IfsException
IfsException
public void insertIntoContextRouter(Long coId, Long coClassId, Long cid, S_Media media, S_ContentVaultEntry cve, long contentSize, String ianaCharacterSet, String oracleLanguage, boolean text, boolean indirectFullTextIndexing) throws IfsException
insertIntoContextRouter
in interface ContentStorageManager
insertIntoContextRouter
in class S_LibrarySessionContentStorageManager
coId
- the ContentObject id; requiredcoClassId
- the ContentObject class id; requiredcid
- the content id; requiredmedia
- the Media where the content is stored; requiredcve
- the ContentVaultEntry (can be null)contentSize
- the content size; requiredianaCharacterSet
- the Iana character set codeoracleLanguage
- the Oracle language codetext
- whether the context is a text formatindirectFullTextIndexing
- whether to perform indirect full-text
indexingIfsException
- if the operation failspublic void manuallyInsertIntoContextRouter(S_ContentObject co, Reader reader) throws IfsException
Postgres uses a different Full text search insert mode known as "manual text indexing". This is driven by an agent. Oracle does not currently support this mode.
co
- the ContentObject; requiredreader
- the manually obtained text reader to be indexedIfsException
- if the operation failspublic void syncIndex() throws IfsException
syncIndex
in interface ContentStorageManager
syncIndex
in class S_LibrarySessionContentStorageManager
IfsException
- if the operation failsprotected void extractContentForIndexing(S_ContentObject co) throws IfsException
extractContentForIndexing
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void generateThemes(S_ContentObject co, boolean fullThemes) throws IfsException
generateThemes
in interface ContentStorageManager
generateThemes
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectfullThemes
- whether full themes are desiredIfsException
- if the operation failspublic ContextTheme[] getThemes(S_ContentObject co) throws IfsException
getThemes
in interface ContentStorageManager
getThemes
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void invalidateThemes(S_ContentObject co) throws IfsException
invalidateThemes
in interface ContentStorageManager
invalidateThemes
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void generateSummary(S_ContentObject co, String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, String summaryLevel) throws IfsException
generateSummary
in interface ContentStorageManager
generateSummary
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectpointOfView
- the point Of viewsizeAsPercent
- the size As PercentsizeAsNumParagraphs
- the size As number of paragraphssummaryLevel
- the summary levelIfsException
- if the operation failspublic Reader getSummary(S_ContentObject co, String pointOfView) throws IfsException
getSummary
in interface ContentStorageManager
getSummary
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectpointOfView
- the point Of viewIfsException
- if the operation failspublic void invalidateSummaries(S_ContentObject co) throws IfsException
invalidateSummaries
in interface ContentStorageManager
invalidateSummaries
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void filterContent(S_ContentObject co, boolean plaintext) throws IfsException
filterContent
in interface ContentStorageManager
filterContent
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectplaintext
- whether to use plain textIfsException
- if the operation failspublic Reader getFilteredContent(S_ContentObject co) throws IfsException
getFilteredContent
in interface ContentStorageManager
getFilteredContent
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void invalidateFilteredContent(S_ContentObject co) throws IfsException
invalidateFilteredContent
in interface ContentStorageManager
invalidateFilteredContent
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic void destroyTextRenditions(S_ContentObject co) throws IfsException
destroyTextRenditions
in interface ContentStorageManager
destroyTextRenditions
in class S_LibrarySessionContentStorageManager
co
- the ContentObjectIfsException
- if the operation failspublic int deleteOldFilteredContent(S_LibrarySession session, long age) throws IfsException
deleteOldFilteredContent
in interface ContentStorageManager
deleteOldFilteredContent
in class S_LibrarySessionContentStorageManager
session
- the S_LibrarySessionage
- the number of seconds that constitutes
an "old" entryIfsException
- if the operation failsCopyright © 2023. All rights reserved.