public class S_ContentObject extends S_TieSystemObject
S_LibraryObject.MapInfo
CASCADE_OP_COPY_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_COPY_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_DELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_DELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_DELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_DELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_DELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_DELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_FREE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_FREE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_FREE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_FREE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_FREE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_FREE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_FREE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_FREE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_FREE_SYSTEMOBJECT_TO_CATEGORY, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_FREE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_FREE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDEFINED, CASCADE_OP_UNDELETE_FAMILY_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP, CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT, CASCADE_OP_UNDELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT, CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_FAMILY, CASCADE_OP_UNDELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION, CASCADE_OP_UPDATE_CATEGORY_TO_PUBLICOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SCHEMAOBJECT, CASCADE_OP_UPDATE_CATEGORY_TO_SYSTEMOBJECT, CASCADE_OP_UPDATE_PUBLICOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SCHEMAOBJECT_TO_CATEGORY, CASCADE_OP_UPDATE_SYSTEMOBJECT_TO_CATEGORY, DEFAULT_RENDERER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
S_ContentObject(S_LibrarySession session,
Long classId)
Construct a S_ContentObject object.
|
protected |
S_ContentObject(S_LibrarySession session,
S_LibraryObjectData data)
Construct a S_ContentObject object.
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
contentSpecified(S_LibraryObjectDefinition sdef)
Used to check if any action needed with regard to inserting/updating content.
|
protected void |
deriveDefinition(S_LibraryObjectDefinition def)
Add to the S_LibraryObjectDefinition
for this class.
|
protected void |
extendedPostFree(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed after freeing
an object.
|
protected void |
extendedPreCopy(OperationState opState,
S_LibraryObjectDefinition sdef)
Handles copying the content
|
protected void |
extendedPreFree(OperationState opState,
S_LibraryObjectDefinition def)
Processing appropriate for freeing this object
|
protected void |
extendedPreInsert(OperationState opState,
S_LibraryObjectDefinition def)
Update any system attributes appropriate for creating this object
|
protected void |
extendedPreUpdate(OperationState opState,
S_LibraryObjectDefinition def)
Update any system attributes appropriate for creating this object
|
void |
filterContent(boolean plaintext,
S_LibraryObject refObj)
Generates an HTML or plaintext version of the content, via the
InterMedia INSO filters.
|
protected void |
freeReadIndicationRows(Long contentid)
Free all references to this target object in the read indication table.
|
void |
generateSummary(String pointOfView,
long sizeAsPercent,
long sizeAsNumParagraphs,
String summaryLevel,
S_LibraryObject refObj)
Generates one or more summaries for this content by submitting a
request to InterMedia to generate summaries.
|
void |
generateThemes(boolean fullThemes,
S_LibraryObject refObj)
Generates the Themes for this content by submitting a request to
InterMedia Text to generate Themes.
|
String |
getCharacterSet()
Gets the Iana character set of the content or null if not specified.
|
RandomAccessor |
getContentByRandomAccess(S_Document refObj)
Gets a RandomAccessor for randomly reading the content of this
ContentObject.
|
Long |
getContentId() |
protected S_ContentQuota |
getContentQuota(S_LibraryObject refObj)
Get the ContentQuota object associated with the referencing object.
|
protected S_ContentQuota |
getContentQuota(S_LibraryObjectDefinition def)
Get the current user's ContentQuota
|
Reader |
getContentReader(S_LibraryObject refObj)
returns a Reader representing the content.
|
long |
getContentSize()
returns the size (in bytes) of the content.
|
InputStream |
getContentStream(S_LibraryObject refObj) |
S_ContentVaultEntry |
getContentVaultEntry()
Gets the ContentVaultEntry object that describes the row in content storage
that is currently active.
|
Reader |
getFilteredContent(S_LibraryObject refObj)
Gets the plaintext or HTML content of the document, previously
generated by a call to filterContent()
|
S_Format |
getFormatObject() |
String |
getLanguage()
Gets the language of the content or null if not specified.
|
Date |
getLastAccessDate()
Gets when the content of this ContentObject was most recently written
or read.
|
S_Media |
getMediaObject() |
Long |
getPartitionValue()
Gets the partition value for this ContentObject.
|
Reader |
getSummary(String pointOfView,
S_LibraryObject refObj)
Gets a specific summary of this content, previously generated by a
call to generateSummary().
|
ContextTheme[] |
getThemes(S_LibraryObject refObj)
Gets the Themes for this content, previously generated by a call to
generateThemes().
|
protected static ArrayList |
getUnreferencedContentObjectList(S_LibrarySession session,
int batchSize)
Delete unlocked temp bfile entries.
|
boolean |
isReadByUser()
Fetches read indication for this document's content for the current user.
|
protected boolean |
isReadOnly() |
protected boolean |
isText(S_LibraryObjectDefinition def) |
protected void |
postEventToContentQuota(S_ContentQuota quota,
long payload)
Post a SPECIAL event to the current user's ContentQuota,
so that the quota agent can take action if necessary.
|
protected void |
postEventToContentQuota(S_ContentQuota quota,
S_LibraryObjectDefinition def)
Post a SPECIAL event to the current user's ContentQuota,
so that the quota agent can take action if necessary.
|
void |
setReadByUser(boolean hasread,
S_LibraryObject refObj)
sets/resets read indication for this CONTENTOBJECT for the current user.
|
protected void |
setReadByUserNoCheck(boolean hasread,
S_LibraryObject refObj)
sets the read indication without checking getContent permission.
|
protected void |
setReadOnlyForSharing()
sets the READONLY attr to true, if not set already.
|
protected void |
verifyNotReadOnly()
Verifies that this object is not read only.
|
addCategory, cascadeFree, createCategories, extendedPostInsert, extendedPostUpdate, getCategories, getCategories, getCategories, handleCascade, removeCategories, updateCategories, verifyCanCreate, verifyCanFree, verifyCanUpdate
added, applyValueDefault, associatedPostFree, associatedPostInsert, associatedPreInsert, canPurge, cascadeCopy, cascadeUpdate, checkRequiredForInsert, checkSettable, clearArrayTypeAttributeValues, clearMapTypeAttributeValues, clonePublicObjectAttribute, constructIdArray, constructIdArray, copy, copy, copyVectorToLibraryObjectArray, createDefaultPolicyPropertyBundle, createDefaultPropertyBundle, createDefaultPropertyBundle, createInstance, deleteRows, deriveOwnerUniqueName, deriveOwnerUniqueName, deriveUppercasedAttribute, determineClassDomain, determinePolicy, determinePolicy, determineValueDefault, determineValueDomain, dispose, DYNInvalidateState, DYNLockRows, equals, equals, executePolicyOperation, findPolicyFromPropertyBundleAv, free, free, getAttribute, getAttributeByUpperCaseName, getAuditCertificateName, getAuditDomainContext, getAuditEventFolderContext, getClassData, getClassId, getClassName, getClassObject, getContentStorageManager, getData, getDefinition, getEffectivePolicyActionContexts, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getId, getLibraryConnection, getName, getObjectReferenceAttribute, getPropertyBundle, getPropertyValue, getResourceString, getResourceString, getService, getSession, getSessionInterface, getTraceLogger, handleEvent, hashCode, hasNameAttribute, insertReferenceAttributes, insertRow, insertRows, invalidateState, invokeOperation, invokePolicyMethod, isAuditCertificateSecured, isBroadcastCreateEventEnabled, isInstanceOf, isPersistent, issueCascade, isTraced, lockRows, postEvent, postEvent, postFree, postInsert, postUpdate, preFree, preInsert, preUpdate, privilegedUpdate, removed, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, toString, trace, update, updateRows, validateStringArray, verifyCanGetContent, verifyCanSetContent, verifyCanSetPolicy, verifyPersistent, verifyWriteableTransactionInProgress
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
protected S_ContentObject(S_LibrarySession session, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessiondata
- Data componentIfsException
protected S_ContentObject(S_LibrarySession session, Long classId) throws IfsException
session
- current LibrarySessionIfsException
protected void deriveDefinition(S_LibraryObjectDefinition def) throws IfsException
deriveDefinition
in class S_SystemObject
def
- the S_LibraryObjectDefinition that contains
the definition of the target object.IfsException
- if operation fails.protected void extendedPreCopy(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
extendedPreCopy
in class S_LibraryObject
opState
- the OperationStatesdef
- any modifications to make to the copied objectIfsException
- if operation fails.protected void extendedPreInsert(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
extendedPreInsert
in class S_SystemObject
opState
- current operation statedef
- current object definition to be updated with system attributesIfsException
- if operation fails.protected void extendedPreUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
extendedPreUpdate
in class S_SystemObject
opState
- the operation statedef
- current object definition to be updated with system attributesIfsException
- if operation fails.protected void extendedPreFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
extendedPreFree
in class S_LibraryObject
opState
- the operation statedef
- current object definition to be freedIfsException
- if operation fails.protected void extendedPostFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
S_LibraryObject
extendedPostFree
in class S_LibraryObject
opState
- current operation statedef
- object definitionIfsException
- if operation fails.protected void freeReadIndicationRows(Long contentid) throws IfsException
contentid
- id of the entry in the content tableIfsException
- if operation fails.public InputStream getContentStream(S_LibraryObject refObj) throws IfsException
IfsException
public Reader getContentReader(S_LibraryObject refObj) throws IfsException
refObj
- the S_LibraryObject through which
access to this content is allowed. This is typically a Document.
This may through if this content does not have an associated character
set.IfsException
- if the operation failspublic RandomAccessor getContentByRandomAccess(S_Document refObj) throws IfsException
refObj
- a Document that references this ContentObjectIfsException
- if the operation failsprotected void setReadByUserNoCheck(boolean hasread, S_LibraryObject refObj) throws IfsException
hasread
- true if has read, false if not.refObj
- the refering object though which this object is allowed
access to content.IfsException
- if the operation failspublic void setReadByUser(boolean hasread, S_LibraryObject refObj) throws IfsException
hasread
- true if has read, false if not.IfsException
- if the operation failspublic boolean isReadByUser() throws IfsException
IfsException
- if the operation failspublic long getContentSize() throws IfsException
IfsException
- if the operation failspublic S_Media getMediaObject() throws IfsException
IfsException
- if the S_Media is nullpublic S_ContentVaultEntry getContentVaultEntry() throws IfsException
IfsException
- if operation failspublic S_Format getFormatObject() throws IfsException
IfsException
public String getCharacterSet() throws IfsException
IfsException
public String getLanguage() throws IfsException
IfsException
protected boolean isReadOnly() throws IfsException
IfsException
protected void setReadOnlyForSharing() throws IfsException
IfsException
- if operation failspublic Long getContentId() throws IfsException
IfsException
public Long getPartitionValue() throws IfsException
IfsException
- if the operation failspublic Date getLastAccessDate() throws IfsException
Requires the session to be in administration mode.
IfsException
- if the operation failspublic void generateThemes(boolean fullThemes, S_LibraryObject refObj) throws IfsException
Each Theme may either be a single Theme word/phrase or a hierarchical list of parent Themes. If fullThemes is set to TRUE, every Theme will also have the full hierarchy of its parent Themes generated.
fullThemes
- generates theme hierarchy information if TRUErefObj
- the S_LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public ContextTheme[] getThemes(S_LibraryObject refObj) throws IfsException
Content may have up to fifty Themes. Each Theme may either be a single Theme word/phrase or a string of parent Themes, separated by colons (':').
There is a Weight associated with every Theme. A Weight is a numerical value that measures the importance of the Theme relative to other Themes for the content.
refObj
- the S_LibraryObject which
refers to this ContentObject
and can verify access (typically a Document).IfsException
- if the operation fails.public void generateSummary(String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, String summaryLevel, S_LibraryObject refObj) throws IfsException
If GENERIC is passed for pointOfView, then InterMedia will generate a single generic summary of the document, based on all the document Themes. If a specific Theme is passed for pointOfView, then InterMedia will generate a summary based on that Theme. Only the Themes generated for the document by a previous call to generateThemes() may be used as input for pointOfView. If a null value is passed for pointOfView, then InterMedia will generate a generic summary of the document, in addition to up to 50 other summaries, each based on one of Themes of the document. Only the Themes generated for the document by a previous call to generateThemes() may be used as input for pointOfView.
Summaries are generated either by selecting specific sentences from the document, or by selecting specific paragraphs from the document. If summaryLevel is set to "S", then InterMedia generates a sentence-level summary of the document. If summaryLevel is set to "P", then InterMedia generates a paragraph-level summary of the document.
The size of the summary generated for a document may be specified through the parameters sizeAsPercent and sizeAsNumParagraphs.
The parameter sizeAsPercent specifies the maximum number of paragraphs (or sentences) that will be included in the summary, as a percentage of the total number of paragraphs (or sentences) present in the content. The default is 10. To use the default value, pass 0 for sizeAsPercent.
The parameter sizeAsNumParagraphs specifies the maximum number of paragraphs (or sentences) that will be included in the summary. The default is 16. To use the default value, pass 0 for sizeAsNumParagraphs.
When both sizeAsNumParagraphs and sizeAsPercent are specified, the parameter that yields a smaller summary size will be used.
pointOfView
- the specific Theme(s) based on which the summary
is generatedsizeAsPercent
- size of summary as a percentage of document sizesizeAsNumParagraphs
- size of summary specified as number of
paragraphs or sentencessummaryLevel
- specifies whether summary is generated by
selecting paragraphs or sentencesrefObj
- the S_LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public Reader getSummary(String pointOfView, S_LibraryObject refObj) throws IfsException
pointOfView
- get the summary that is
based on this particular point of viewrefObj
- the S_LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public void filterContent(boolean plaintext, S_LibraryObject refObj) throws IfsException
plaintext
- when TRUE, indicates that a plaintext version of
the document must be generated, otherwise an HTML version will be
generatedrefObj
- the S_LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public Reader getFilteredContent(S_LibraryObject refObj) throws IfsException
refObj
- the S_LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.protected void verifyNotReadOnly() throws IfsException
IfsException
- if the object is read only,
or if operation fails.protected S_ContentQuota getContentQuota(S_LibraryObjectDefinition def) throws IfsException
IfsException
- if the operation failsprotected S_ContentQuota getContentQuota(S_LibraryObject refObj) throws IfsException
refObj
- the referencing object (usually a Document)IfsException
- if the operation failsprotected void postEventToContentQuota(S_ContentQuota quota, S_LibraryObjectDefinition def) throws IfsException
def
- definition that contains CONTENTSIZE to be used for a payloadIfsException
- if the operation failsprotected void postEventToContentQuota(S_ContentQuota quota, long payload) throws IfsException
quota
- the content quotapayload
- definition that contains CONTENTSIZE to be used for a payloadIfsException
- if the operation failsprotected static boolean contentSpecified(S_LibraryObjectDefinition sdef) throws IfsException
IfsException
protected boolean isText(S_LibraryObjectDefinition def) throws IfsException
IfsException
protected static ArrayList getUnreferencedContentObjectList(S_LibrarySession session, int batchSize) throws IfsException
session
- the session contextbatchSize
- the batch size to use for the selectIfsException
- if the operation failsCopyright © 2023. All rights reserved.