|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.beans.LibraryObject | +--oracle.ifs.beans.TieLibraryObject | +--oracle.ifs.beans.SystemObject | +--oracle.ifs.beans.TieSystemObject | +--oracle.ifs.beans.ContentObject
The ContentObject class is a subclass of PublicObject that supports getting and setting Content. Content is any unstructured data. This class has two additional attributes that support content: Format and Media. Format helps a client understand how to render the content by providing a MIME type. Media describes a location for storing the content.
ContentObject content is set using a ContentObjectDefinition. A ContentObjectDefinition supports setting content from a variety of sources, including a local file and an InputStream. One uses a ContentObjectDefinition both for creating a new document and updating an existing one.
ContentObjectDefinition
Field Summary | |
static java.lang.String |
CHARACTERSET_ATTRIBUTE
The Java name of the character encoding of the content (if applicable). |
static java.lang.String |
CLASS_NAME
This class name for this class. |
static java.lang.String |
CONTENT_ATTRIBUTE
The row id pointing to the content for this ContentObject in Media's database table. |
static java.lang.String |
CONTENTSIZE_ATTRIBUTE
The size of the content. |
static java.lang.String |
FORMAT_ATTRIBUTE
The Format that describes the content. |
static java.lang.String |
LANGUAGE_ATTRIBUTE
The Oracle name of the language of the content (if applicable). |
static java.lang.String |
MEDIA_ATTRIBUTE
The Media instance where the content is stored. |
static java.lang.String |
READONLY_ATTRIBUTE
An indicator if the content is read-only or updateable. |
Fields inherited from class oracle.ifs.beans.SystemObject |
ACTIVE_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE |
Method Summary | |
void |
filterContent(boolean plaintext,
LibraryObject refObj)
Generates an HTML or plaintext version of the content, via the InterMedia INSO filters. |
void |
generateSummary(java.lang.String pointOfView,
long sizeAsPercent,
long sizeAsNumParagraphs,
java.lang.String summaryLevel,
LibraryObject refObj)
Generates one or more summaries for this content by submitting a request to InterMedia to generate summaries. |
void |
generateThemes(boolean fullThemes,
LibraryObject refObj)
Generates the Themes for this content by submitting a request to InterMedia Text to generate Themes. |
java.lang.String |
getCharacterSet()
Gets the Character set in which this content is encoded, or null if charset not specified. |
java.io.Reader |
getContentReader(LibraryObject refObj)
Gets the content as an Reader . |
long |
getContentSize()
Gets the size of the content. |
java.io.InputStream |
getContentStream(LibraryObject refObj)
Gets the content as an InputStream . |
java.io.Reader |
getFilteredContent(LibraryObject refObj)
Gets the plaintext or HTML content of the document, previously generated by a call to filterContent() |
Format |
getFormat()
Gets the Format object. |
java.lang.String |
getLanguage()
Gets the language of this content, or null if language not specified. |
java.io.Reader |
getSummary(java.lang.String pointOfView,
LibraryObject refObj)
Gets a specific summary of this content, previously generated by a call to generateSummary(). |
ContextTheme[] |
getThemes(LibraryObject refObj)
Gets the Themes for this content, previously generated by a call to generateThemes(). |
boolean |
isReadOnly()
Returns true if the content is read-only. |
void |
setReadOnly(boolean readonly)
Sets the read-only state of the content. |
Methods inherited from class oracle.ifs.beans.SystemObject |
getPolicyBundle, getPropertyBundle, isActive, putPolicy, putProperty, putProperty, removeAllPolicies, removeAllProperties, removePolicy, removePolicy, removeProperty, setActive, setPolicyBundle, setPropertyBundle |
Methods inherited from class oracle.ifs.beans.LibraryObject |
equals, free, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getLabel, getName, getSession, handleEvent, hasNameAttribute, invokeServerMethod, isInstanceOf, isTraced, lookupInstanceLabel, postEvent, postEvent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setName, toString, trace, update |
Methods inherited from interface oracle.ifs.common.LibraryObjectInterface |
getId |
Methods inherited from interface oracle.ifs.common.Traceable |
getTraceLogger, isTraced, trace |
Field Detail |
public static final java.lang.String CLASS_NAME
public static final java.lang.String FORMAT_ATTRIBUTE
public static final java.lang.String MEDIA_ATTRIBUTE
public static final java.lang.String CONTENT_ATTRIBUTE
public static final java.lang.String CONTENTSIZE_ATTRIBUTE
public static final java.lang.String CHARACTERSET_ATTRIBUTE
public static final java.lang.String LANGUAGE_ATTRIBUTE
public static final java.lang.String READONLY_ATTRIBUTE
Method Detail |
public Format getFormat() throws IfsException
IfsException
- if the operation fails.public long getContentSize() throws IfsException
IfsException
- if the operation fails.public java.lang.String getCharacterSet() throws IfsException
IfsException
- if the operation fails.public java.lang.String getLanguage() throws IfsException
IfsException
- if the operation fails.public boolean isReadOnly() throws IfsException
IfsException
- if the operation fails.public void setReadOnly(boolean readonly) throws IfsException
readonly
- true if content is readonly, false otherwiseIfsException
- if the operation fails.public java.io.InputStream getContentStream(LibraryObject refObj) throws IfsException
InputStream
.refObj
- the LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public java.io.Reader getContentReader(LibraryObject refObj) throws IfsException
Reader
. For most media, this
method only works if the content object has an associated CharacterSet.refObj
- the LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public void generateThemes(boolean fullThemes, 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 LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public ContextTheme[] getThemes(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 LibraryObject which
refers to this ContentObject
and can verify access (typically a Document).IfsException
- if the operation fails.public void generateSummary(java.lang.String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, java.lang.String summaryLevel, 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 LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public java.io.Reader getSummary(java.lang.String pointOfView, LibraryObject refObj) throws IfsException
pointOfView
- get the summary that is
based on this particular point of viewrefObj
- the LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public void filterContent(boolean plaintext, 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 LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.public java.io.Reader getFilteredContent(LibraryObject refObj) throws IfsException
refObj
- the LibraryObject which
refers to this ContentObject and can verify access.IfsException
- if the operation fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |