Package org.eclipse.birt.report.engine.content

# Interface IForeignContent

All Superinterfaces:
  `org.eclipse.birt.report.engine.css.engine.CSSStylableElement`, `IContent`, `IElement`, `IStyledElement`

public interface IForeignContent extends IContent
The content of foreign object is not handle by report engine. It is the object's responsibility to convert itself to standard content type. Such as object described in HTML/RTF or other format. For foreign object in "text/html" format, the PDF writer output the standard content while the HTML writer output the raw value directly.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`EXTERNAL_TYPE`
the content is the output of a extenal item, it is byte[]
`static final String`
`HTML_TYPE`
the content is an string which contains HTML content
`static final String`
`IMAGE_TYPE`
the content is an image content which define the image
`static final String`
`TEMPLATE_TYPE`
the content is an template.
`static final String`
`TEXT_TYPE`
the content is an string which contains plain text
`static final String`
`UNKNOWN_TYPE`
the content is unkown
`static final String`
`VALUE_TYPE`
the object value

### Fields inherited from interface org.eclipse.birt.report.engine.content.IContent

`AUTOTEXT_CONTENT, CELL_CONTENT, CONTAINER_CONTENT, DATA_CONTENT, DOCUMENT_EXTENSION, FOREIGN_CONTENT, GROUP_CONTENT, IMAGE_CONTENT, LABEL_CONTENT, LAYOUT_EXTENSION, LIST_BAND_CONTENT, LIST_CONTENT, LIST_GROUP_CONTENT, PAGE_CONTENT, REPORT_CONTENT, ROW_CONTENT, SERIALIZE_CONTENT, TABLE_BAND_CONTENT, TABLE_CONTENT, TABLE_GROUP_CONTENT, TEXT_CONTENT`

## Method Summary

Modifier and Type
Method
Description
`String`
`getAltText()`
Get the alternative text
`String`
`getAltTextKey()`
Get the alternative text key
`String`
`getRawKey()`
Get the raw content key
`String`
`getRawType()`
Get the original format of the object.
`Object`
`getRawValue()`
the orignal content describe in raw format.
`boolean`
`isJTidy()`
Is JTidy to be used
`void`
`setAltText(String altText)`
Set the alternative text
`void`
`setAltTextKey(String key)`
Set the alternative text key
`void`
`setJTidy(boolean jTidy)`
Set the use of JTidy for document generation
`void`
`setRawKey(String rawKey)`
Set the raw content key
`void`
`setRawType(String type)`
Set the raw type
`void`
`setRawValue(Object value)`
Set the raw content value

### Methods inherited from interface org.eclipse.birt.report.engine.css.engine.CSSStylableElement

`getComputedStyle, getCSSEngine, getStyle`

### Methods inherited from interface org.eclipse.birt.report.engine.content.IContent

`accept, cloneContent, getACL, getBookmark, getContentType, getExtension, getExtensions, getGenerateBy, getHeight, getHelpText, getHyperlinkAction, getInlineStyle, getInstanceID, getName, getReportContent, getResultSet, getTagType, getTOC, getUserProperties, getWidth, getX, getY, hasChildren, isDirectionRTL, isLastChild, isRTL, readContent, setACL, setBookmark, setExtension, setExtensions, setGenerateBy, setHasChildren, setHeight, setHelpText, setHyperlinkAction, setInlineStyle, setInstanceID, setLastChild, setName, setReportContent, setTagType, setTOC, setUserProperties, setWidth, setX, setY, writeContent`

### Methods inherited from interface org.eclipse.birt.report.engine.content.IElement

`getChildren, getParent, setParent`

### Methods inherited from interface org.eclipse.birt.report.engine.content.IStyledElement

`getComputedStyle, getStyle, getStyleClass, setStyleClass`

## Field Details

### HTML_TYPE

static final String HTML_TYPE
the content is an string which contains HTML content

See Also:
  - Constant Field Values

### TEXT_TYPE

static final String TEXT_TYPE
the content is an string which contains plain text

See Also:
  - Constant Field Values

### TEMPLATE_TYPE

static final String TEMPLATE_TYPE
the content is an template. In this condition the raw value should be a Object[2], the first object is the template text, the second object is the value map.

See Also:
  - Constant Field Values

### EXTERNAL_TYPE

static final String EXTERNAL_TYPE
the content is the output of a extenal item, it is byte[]

See Also:
  - Constant Field Values

### IMAGE_TYPE

static final String IMAGE_TYPE
the content is an image content which define the image

See Also:
  - Constant Field Values

### UNKNOWN_TYPE

static final String UNKNOWN_TYPE
the content is unkown

See Also:
  - Constant Field Values

### VALUE_TYPE

static final String VALUE_TYPE
the object value

See Also:
  - Constant Field Values

## Method Details

### getRawType

String getRawType()
Get the original format of the object. such as: "text/html", "text/rtf", "xml/svg" etc.

Returns:
  type of the content

### setRawType

void setRawType(String type)
Set the raw type

Parameters:
  `type` - raw type of content

### getRawKey

String getRawKey()
Get the raw content key

Returns:
  the raw content key

### setRawKey

void setRawKey(String rawKey)
Set the raw content key

Parameters:
  `rawKey` - raw content key

### getRawValue

Object getRawValue()
the orignal content describe in raw format.

Returns:
  Returns the content. Caller knows how to cast this object

### setRawValue

void setRawValue(Object value)
Set the raw content value

Parameters:
  `value` - raw content value

### getAltText

String getAltText()
Description copied from interface: `IContent`
Get the alternative text

Specified by:
  `getAltText` in interface `IContent`
Returns:
  Returns the altText.

### getAltTextKey

String getAltTextKey()
Description copied from interface: `IContent`
Get the alternative text key

Specified by:
  `getAltTextKey` in interface `IContent`
Returns:
  the alternative text key

### setAltText

void setAltText(String altText)
Description copied from interface: `IContent`
Set the alternative text

Specified by:
  `setAltText` in interface `IContent`
Parameters:
  `altText` - alternative text

### setAltTextKey

void setAltTextKey(String key)
Description copied from interface: `IContent`
Set the alternative text key

Specified by:
  `setAltTextKey` in interface `IContent`
Parameters:
  `key` - alternative text key

### setJTidy

void setJTidy(boolean jTidy)
Set the use of JTidy for document generation

Parameters:
  `jTidy` - JTidy usage

### isJTidy

boolean isJTidy()
Is JTidy to be used

Returns:
  is JTidy to be used