org.eclipse.actf.model.ui
Interface IModelService

All Known Subinterfaces:
IWebBrowserACTF

public interface IModelService

Interface to provide access to the model of the content. Users can get this IModelService through IModelServiceHolder that is implemented with IEditorPart.

See Also:
IModelServiceHolder

Field Summary
static String ATTR_WINDOWHANDLE
           
static String[] EXTS_HTML
          HTML extensions
static String[] EXTS_ODF
          ODF extensions
static String[] MIMETYPES_HTML
          HTML MIME type
static String[] MIMETYPES_ODF
          ODF MIME type
 
Method Summary
 ImagePositionInfo[] getAllImagePosition()
          Get all image position information within the content
 Object getAttribute(String key)
          Get corresponding Object with the specified key.
 String getCurrentMIMEType()
          Get MIME type of the content
 Document getDocument()
          Get model of the content as Document.
 String getID()
          Get ID
 Document getLiveDocument()
          Get model of the content as Document.
 IModelServiceHolder getModelServiceHolder()
          Get IModelServiceHolder who owns this implementation
 IModelServiceScrollManager getScrollManager()
          Get IModelServiceScrollManager to scroll the content
 String[] getSupportExtensions()
          Get file extensions that are supported by this IModelService
 String[] getSupportMIMETypes()
          Get MIME types that are supported by this IModelService
 org.eclipse.swt.widgets.Composite getTargetComposite()
          Get the Composite that hold the content
 String getTitle()
          Get title
 String getURL()
          Get content URL as String
 void jumpToNode(Node target)
          Move current position to the specified Node
 void open(File target)
          Open specified File
 void open(String url)
          Open specified URL
 File saveDocumentAsHTMLFile(String file)
          Convert the Document into HTML and save into target file.
 File saveOriginalDocument(String file)
          Save the original Document into target file
 

Field Detail

MIMETYPES_HTML

static final String[] MIMETYPES_HTML
HTML MIME type


MIMETYPES_ODF

static final String[] MIMETYPES_ODF
ODF MIME type


EXTS_HTML

static final String[] EXTS_HTML
HTML extensions


EXTS_ODF

static final String[] EXTS_ODF
ODF extensions


ATTR_WINDOWHANDLE

static final String ATTR_WINDOWHANDLE
See Also:
Constant Field Values
Method Detail

getSupportMIMETypes

String[] getSupportMIMETypes()
Get MIME types that are supported by this IModelService

Returns:
array of MIME type

getSupportExtensions

String[] getSupportExtensions()
Get file extensions that are supported by this IModelService

Returns:
array of file extensions

getCurrentMIMEType

String getCurrentMIMEType()
Get MIME type of the content

Returns:
MIME type of the content

open

void open(String url)
Open specified URL

Parameters:
url - target URL

open

void open(File target)
Open specified File

Parameters:
target - target File

getURL

String getURL()
Get content URL as String

Returns:
content URL as String

getTitle

String getTitle()
Get title

Returns:
title

getID

String getID()
Get ID

Returns:
ID

getDocument

Document getDocument()
Get model of the content as Document. This method returns Document based on the original source of the content.

Returns:
Document

getLiveDocument

Document getLiveDocument()
Get model of the content as Document. This method returns runtime Document inside the Editor.

Returns:
current Document

getTargetComposite

org.eclipse.swt.widgets.Composite getTargetComposite()
Get the Composite that hold the content

Returns:
target Composite

saveOriginalDocument

File saveOriginalDocument(String file)
Save the original Document into target file

Parameters:
file - target file path
Returns:
resulting File

saveDocumentAsHTMLFile

File saveDocumentAsHTMLFile(String file)
Convert the Document into HTML and save into target file. Empty file will be generated if this method is not supported by the implementation.

Parameters:
file - target file path
Returns:
resulting File.

jumpToNode

void jumpToNode(Node target)
Move current position to the specified Node

Parameters:
target - target Node

getScrollManager

IModelServiceScrollManager getScrollManager()
Get IModelServiceScrollManager to scroll the content

Returns:
scroll manager IModelServiceScrollManager

getAllImagePosition

ImagePositionInfo[] getAllImagePosition()
Get all image position information within the content

Returns:
array of ImagePositionInfo

getModelServiceHolder

IModelServiceHolder getModelServiceHolder()
Get IModelServiceHolder who owns this implementation

Returns:
IModelServiceHolder

getAttribute

Object getAttribute(String key)
Get corresponding Object with the specified key. This method is used for implementation unique customization.

Parameters:
key - target key
Returns:
corresponding Object with the specified key