|
|||||||||
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.PublicObject | +--oracle.ifs.beans.TiePublicObject | +--oracle.ifs.beans.Document
The Document class is a subclass of PublicObject that supports getting and setting Content. Content is any unstructured data. This is facilitated by referring to a ContentObject. ContentObjects allow getting and setting of content, as well as supporting content meta data. This class contains convenience covers to make using a content object easier. Document content is set using a ContentObject Definition, although it can also be set by using a DocumentDefinition. A DocumentDefinition supports setting content from a variety of sources, including a local file and an InputStream. You use a DocumentDefinition both for creating a new document and updating an existing one.
ContentObject
,
DocumentDefinition
Field Summary | |
static java.lang.String |
CLASS_NAME
This class name for this class. |
static java.lang.String |
CONTENTOBJECT_ATTRIBUTE
The ContentObject that contains this document's content. |
static java.lang.String |
READBYOWNER_ATTRIBUTE
An indicator of whether the Document Owner has read the current content. |
Method Summary | |
void |
filterContent(boolean plaintext)
Generates a HTML or plaintext version of the document, via the Context INSO filters. |
java.lang.String |
generateFilename()
Generates a filename which is the objectname plus the format extension. |
void |
generateSummary(java.lang.String pointOfView,
long sizeAsPercent,
long sizeAsNumParagraphs,
java.lang.String summaryLevel)
Generates one or more summaries for a document by submitting a request to Context to generate summaries. |
void |
generateThemes(boolean fullThemes)
Generates the Themes for this Document by submitting a request to Context to generate Themes. |
java.lang.String |
getCharacterSet()
Returns the ContentObject's character encoding, or null if not specified. |
ContentObject |
getContentObject()
Gets the content for this Document. |
java.io.Reader |
getContentReader()
Gets the document content as a Reader |
long |
getContentSize()
Gets the size of this document's content. |
java.io.InputStream |
getContentStream()
Gets the document content as an InputStream. |
java.io.Reader |
getFilteredContent()
Gets the plaintext or HTML content of the document, previously generated by a call to filterContent() |
Format |
getFormat()
Gets the format for this Document. |
java.lang.String |
getLanguage()
Gets the ContentObject's language identifier, or null if not specified. |
java.io.Reader |
getSummary(java.lang.String pointOfView)
Gets a specific summary of a document, previously generated by a call to generateSummary(). |
ContextTheme[] |
getThemes()
Gets the Themes for a document, previously generated by a call to generateThemes(). |
boolean |
isReadByOwner()
Returns true if the owner of the document has read the content via this document. |
boolean |
isReadByUser()
Returns true if the current user has read the content to which this document refers. |
void |
setCharacterSet(java.lang.String charset)
Sets the characterset for the content referred to by this Document. |
void |
setContent(DocumentDefinition def)
Sets the content of this Document. |
void |
setFormat(Format format)
Sets the format for this Document. |
void |
setLanguage(java.lang.String language)
Sets the language for the content referred to by this Document. |
void |
setReadByUser(boolean readState)
Sets read indication (for the current user) for the content referred to by this Document. |
Methods inherited from class oracle.ifs.beans.LibraryObject |
equals, free, free, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getClassId, getClassObject, getDefinition, getId, getLabel, getName, getSession, 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 CONTENTOBJECT_ATTRIBUTE
public static final java.lang.String READBYOWNER_ATTRIBUTE
Method Detail |
public ContentObject getContentObject() throws IfsException
IfsException
- if operation fails.public void setFormat(Format format) throws IfsException
Format
- the desired Format object.IfsException
- if operation fails.public Format getFormat() throws IfsException
IfsException
- if operation fails.public java.lang.String getCharacterSet() throws IfsException
if
- the operation failspublic void setCharacterSet(java.lang.String charset) throws IfsException
charset
- JAVA name for the new charcterset.IfsException
- if operation fails.public java.lang.String getLanguage() throws IfsException
IfsException
- if the operation failspublic void setLanguage(java.lang.String language) throws IfsException
language
- JAVA name for the new language.IfsException
- if operation fails.public long getContentSize() throws IfsException
IfsException
- if operation fails.public java.io.InputStream getContentStream() throws IfsException
IfsException
- if operation fails.public java.io.Reader getContentReader() throws IfsException
IfsException
- if operation fails.public boolean isReadByUser() throws IfsException
IfsException
- if operation fails.public boolean isReadByOwner() throws IfsException
IfsException
- if operation fails.public void setReadByUser(boolean readState) throws IfsException
readState
- desired read indication for current user on this Document's contentIfsException
- if operation fails.public java.lang.String generateFilename() throws IfsException
IfsException
- if operation fails.public void generateThemes(boolean fullThemes) 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 TRUEIfsException
- if operation fails.public ContextTheme[] getThemes() throws IfsException
A document 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 document.
IfsException
- if operation fails.public void generateSummary(java.lang.String pointOfView, long sizeAsPercent, long sizeAsNumParagraphs, java.lang.String summaryLevel) throws IfsException
If GENERIC is passed for pointOfView, then Context will generate a single generic summary of the document, based on all the document Themes. If a specific Theme is passed for pointOfView, then Context 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 Context 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 Context generates a sentence-level summary of the document. If summaryLevel is set to "P", then Context 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 document paragraphs (or sentences) that will be included in the summary, as a percentage of the total number of paragraphs (or sentences) present in the document. The default is 10. To use the default value, pass 0 for sizeAsPercent.
The parameter sizeAsNumParagraphs specifies the maximum number of document 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 document paragraphs or sentencesIfsException
- if operation fails.public java.io.Reader getSummary(java.lang.String pointOfView) throws IfsException
pointOfView
- get the summary that is based on this particular
point of viewIfsException
- if operation fails.public void filterContent(boolean plaintext) throws IfsException
plaintext
- when TRUE, indicates that a plaintext version of
the document must be generated, otherwise an HTML version will be
generatedIfsException
- if operation fails.public java.io.Reader getFilteredContent() throws IfsException
IfsException
- if operation fails.public void setContent(DocumentDefinition def) throws IfsException
LibraryObject.update
.def
- DocumentDefinition object describing desired updates.IfsException
- if operation fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |