public class PostgresContentStorageManager extends S_LibrarySessionContentStorageManager
An 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:
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXTROUTERTABLE_TSVECTOR_COLUMN
Name of the context router table's column containing the tsvector.
|
CONTEXTROUTERTABLE_TABLENAME, INDEXINGSTATE_AWAITING_EXTRACTION, INDEXINGSTATE_COMPLETE| Modifier | Constructor and Description |
|---|---|
protected |
PostgresContentStorageManager(S_LibrarySession session)
Constructs a CSM.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFromContextRouter(Long coId)
Deletes a row from the context router table and clean up
word tables if needed.
|
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.
|
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.
|
Reader |
getFilteredContent(S_ContentObject co)
Gets the filtered content for specified ContentObject.
|
String |
getFullTextIndexName()
Gets the name of the full text index.
|
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)
Schedules an insert of 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 bfile)
Binds the specified BFILE to this session.
|
void |
syncIndex()
Sync's the index.
|
void |
unregisterBfile(Object bfile)
Unbinds the specified BFILE from this session.
|
acquireByteBuffer, destroyContent, dispose, extractContentForIndexing, getByteBufferSize, getContentByRandomAccess, getContentReader, getContentStream, getContextTables, getIndexName, getLastAccessDate, getNewContentID, getOracleCharacterSet, getSession, registerRandomAccessor, releaseByteBuffer, resolveCharacterSet, retrieveSerializedObject, selectMedia, setContentProperties, storeSerializedObject, unregisterRandomAccessor, updateContentByRandomAccess, updateLastAccessDate, validateMedia, validateMediaAndSetContent, verifyCanDestroyContentpublic static final String CONTEXTROUTERTABLE_TSVECTOR_COLUMN
protected PostgresContentStorageManager(S_LibrarySession session) throws IfsException
session - the sesion to which this CSM belongs; requiredIfsException - if the operation failspublic void registerBfile(Object bfile) throws IfsException
registerBfile in interface ContentStorageManagerregisterBfile in class S_LibrarySessionContentStorageManagerbfile - the BFILEIfsException - if the operation failspublic void unregisterBfile(Object bfile) throws IfsException
unregisterBfile in interface ContentStorageManagerunregisterBfile in class S_LibrarySessionContentStorageManagerbfile - 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 ContentStorageManagerisFullTextIndexingEnabled in class S_LibrarySessionContentStorageManagerIfsException - if the operation failspublic String getFullTextIndexName()
getFullTextIndexName in interface ContentStorageManagergetFullTextIndexName in class S_LibrarySessionContentStorageManagerpublic 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
Postgres uses a different Full text search insert mode known as "manual text indexing". This is handled by an agent. This method for Postgres just enqueues a RetainedEvent that is processed by an agent to insert the row.
insertIntoContextRouter in interface ContentStorageManagerinsertIntoContextRouter in class S_LibrarySessionContentStorageManagercoId - 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 handled by an agent.
co - the ContentObject; requiredreader - the manually obtained text reader to be indexedIfsException - if the operation failspublic void deleteFromContextRouter(Long coId) throws IfsException
deleteFromContextRouter in interface ContentStorageManagerdeleteFromContextRouter in class S_LibrarySessionContentStorageManagercoId - the ContentObject ID to be cleaned upIfsException - if the operation failspublic void syncIndex()
throws IfsException
syncIndex in interface ContentStorageManagersyncIndex in class S_LibrarySessionContentStorageManagerIfsException - if the operation failsprotected void extractContentForIndexing(S_ContentObject co) throws IfsException
extractContentForIndexing in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void generateThemes(S_ContentObject co, boolean fullThemes) throws IfsException
generateThemes in interface ContentStorageManagergenerateThemes in class S_LibrarySessionContentStorageManagerco - the ContentObjectfullThemes - whether full themes are desiredIfsException - if the operation failspublic ContextTheme[] getThemes(S_ContentObject co) throws IfsException
getThemes in interface ContentStorageManagergetThemes in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void invalidateThemes(S_ContentObject co) throws IfsException
invalidateThemes in interface ContentStorageManagerinvalidateThemes in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void generateSummary(S_ContentObject co, String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, String summaryLevel) throws IfsException
generateSummary in interface ContentStorageManagergenerateSummary in class S_LibrarySessionContentStorageManagerco - 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 ContentStorageManagergetSummary in class S_LibrarySessionContentStorageManagerco - the ContentObjectpointOfView - the point Of viewIfsException - if the operation failspublic void invalidateSummaries(S_ContentObject co) throws IfsException
invalidateSummaries in interface ContentStorageManagerinvalidateSummaries in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void filterContent(S_ContentObject co, boolean plaintext) throws IfsException
filterContent in interface ContentStorageManagerfilterContent in class S_LibrarySessionContentStorageManagerco - the ContentObjectplaintext - whether to use plain textIfsException - if the operation failspublic Reader getFilteredContent(S_ContentObject co) throws IfsException
getFilteredContent in interface ContentStorageManagergetFilteredContent in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void invalidateFilteredContent(S_ContentObject co) throws IfsException
invalidateFilteredContent in interface ContentStorageManagerinvalidateFilteredContent in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic void destroyTextRenditions(S_ContentObject co) throws IfsException
destroyTextRenditions in interface ContentStorageManagerdestroyTextRenditions in class S_LibrarySessionContentStorageManagerco - the ContentObjectIfsException - if the operation failspublic int deleteOldFilteredContent(S_LibrarySession session, long age) throws IfsException
deleteOldFilteredContent in interface ContentStorageManagerdeleteOldFilteredContent in class S_LibrarySessionContentStorageManagersession - the S_LibrarySessionage - the number of seconds that constitutes
an "old" entryIfsException - if the operation failsCopyright © 2025. All rights reserved.