Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.beans
Class ContentObject

    java.lang.Object

      |

      +--oracle.ifs.beans.LibraryObject

            |

            +--oracle.ifs.beans.TieLibraryObject

                  |

                  +--oracle.ifs.beans.SystemObject

                        |

                        +--oracle.ifs.beans.TieSystemObject

                              |

                              +--oracle.ifs.beans.ContentObject

All Implemented Interfaces:
  IfsEventHandler, LibraryObjectInterface, SystemObjectInterface, Traceable

Direct Known Subclasses:
  TieContentObject

public class ContentObject
extends TieSystemObject

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.

See Also:
  `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

### CLASS_NAME

    public static final java.lang.String CLASS_NAME

  This class name for this class. Useful for methods that take a class name argument.

### FORMAT_ATTRIBUTE

    public static final java.lang.String FORMAT_ATTRIBUTE

  The Format that describes the content.

### MEDIA_ATTRIBUTE

    public static final java.lang.String MEDIA_ATTRIBUTE

  The Media instance where the content is stored.

### CONTENT_ATTRIBUTE

    public static final java.lang.String CONTENT_ATTRIBUTE

  The row id pointing to the content for this ContentObject in Media's database table.

### CONTENTSIZE_ATTRIBUTE

    public static final java.lang.String CONTENTSIZE_ATTRIBUTE

  The size of the content.

### CHARACTERSET_ATTRIBUTE

    public static final java.lang.String CHARACTERSET_ATTRIBUTE

  The Java name of the character encoding of the content (if applicable).

### LANGUAGE_ATTRIBUTE

    public static final java.lang.String LANGUAGE_ATTRIBUTE

  The Oracle name of the language of the content (if applicable).

### READONLY_ATTRIBUTE

    public static final java.lang.String READONLY_ATTRIBUTE

  An indicator if the content is read-only or updateable.

Method Detail

### getFormat

    public Format getFormat()
                     throws IfsException

  Gets the Format object.
  Returns:
    the Format object.
  Throws:
    `IfsException` - if the operation fails.

### getContentSize

    public long getContentSize()
                        throws IfsException

  Gets the size of the content.
  Returns:
    the size of the underlying content.
  Throws:
    `IfsException` - if the operation fails.

### getCharacterSet

    public java.lang.String getCharacterSet()
                                     throws IfsException

  Gets the Character set in which this content is encoded, or null if charset not specified.
  Returns:
    the Character set.
  Throws:
    `IfsException` - if the operation fails.

### getLanguage

    public java.lang.String getLanguage()
                                 throws IfsException

  Gets the language of this content, or null if language not specified.
  Returns:
    the language.
  Throws:
    `IfsException` - if the operation fails.

### isReadOnly

    public boolean isReadOnly()
                       throws IfsException

  Returns true if the content is read-only. The value is set when the content object is created (you can specify it in the ContentObjectDefinition). The value is also true if the content object is shared between two objects (Documents). Once set, only an admin user can change it, however, a new content object can be cloned from this one - the clone does not have to be read only.
  Returns:
    true if the content is read-only.
  Throws:
    `IfsException` - if the operation fails.

### setReadOnly

    public void setReadOnly(boolean readonly)
                     throws IfsException

  Sets the read-only state of the content. Only an admin user can change the read-only state of this object.
  Parameters:
    `readonly` - true if content is readonly, false otherwise
  Throws:
    `IfsException` - if the operation fails.

### getContentStream

    public java.io.InputStream getContentStream(LibraryObject refObj)
                                         throws IfsException

  Gets the content as an `InputStream`.
  Parameters:
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Returns:
    an InputStream of the document contents
  Throws:
    `IfsException` - if the operation fails.

### getContentReader

    public java.io.Reader getContentReader(LibraryObject refObj)
                                    throws IfsException

  Gets the content as an `Reader`. For most media, this method only works if the content object has an associated CharacterSet.
  Parameters:
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Returns:
    an InputStream of the document contents
  Throws:
    `IfsException` - if the operation fails.

### generateThemes

    public void generateThemes(boolean fullThemes,
                               LibraryObject refObj)
                        throws IfsException

  Generates the Themes for this content by submitting a request to InterMedia Text to generate Themes.

  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.

  Parameters:
    `fullThemes` - generates theme hierarchy information if TRUE
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Throws:
    `IfsException` - if the operation fails.

### getThemes

    public ContextTheme[] getThemes(LibraryObject refObj)
                             throws IfsException

  Gets the Themes for this content, previously generated by a call to generateThemes().

  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.

  Parameters:
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access (typically a Document).
  Returns:
    an array of objects encapsulating a InterMedia Theme and its associated Weight
  Throws:
    `IfsException` - if the operation fails.

### generateSummary

    public void generateSummary(java.lang.String pointOfView,
                                long sizeAsPercent,
                                long sizeAsNumParagraphs,
                                java.lang.String summaryLevel,
                                LibraryObject refObj)
                         throws IfsException

  Generates one or more summaries for this content by submitting a request to InterMedia to generate summaries.

  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.

  Parameters:
    `pointOfView` - the specific Theme(s) based on which the summary is generated
    `sizeAsPercent` - size of summary as a percentage of document size
    `sizeAsNumParagraphs` - size of summary specified as number of paragraphs or sentences
    `summaryLevel` - specifies whether summary is generated by selecting paragraphs or sentences
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Throws:
    `IfsException` - if the operation fails.

### getSummary

    public java.io.Reader getSummary(java.lang.String pointOfView,
                                     LibraryObject refObj)
                              throws IfsException

  Gets a specific summary of this content, previously generated by a call to generateSummary().
  Parameters:
    `pointOfView` - get the summary that is based on this particular point of view
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Returns:
    a Reader for fetching the summary
  Throws:
    `IfsException` - if the operation fails.

### filterContent

    public void filterContent(boolean plaintext,
                              LibraryObject refObj)
                       throws IfsException

  Generates an HTML or plaintext version of the content, via the InterMedia INSO filters. The format of the content to be filtered must be supported by the InterMedia filters.
  Parameters:
    `plaintext` - when TRUE, indicates that a plaintext version of the document must be generated, otherwise an HTML version will be generated
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Throws:
    `IfsException` - if the operation fails.

### getFilteredContent

    public java.io.Reader getFilteredContent(LibraryObject refObj)
                                      throws IfsException

  Gets the plaintext or HTML content of the document, previously generated by a call to filterContent()
  Parameters:
    `refObj` - the LibraryObject which refers to this ContentObject and can verify access.
  Returns:
    a Reader for fetching the plaintext or HTML content
  Throws:
    `IfsException` - if the operation fails.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD