org.ow2.weblab.portlet.tool
Class MediaUnitHighLighter

java.lang.Object
  extended by org.ow2.weblab.portlet.tool.MediaUnitHighLighter

public class MediaUnitHighLighter
extends java.lang.Object

A MediaUnitHighlighter render a highlighted Weblab media unit. Text of the media unit is highlighted with elements of the legend. Render is done in HTML representation using jQuery for overlapping. HTML text generated is highlighted like specified in the legend

Author:
emilien

Method Summary
static java.lang.String getHtmlRepresentation(org.ow2.weblab.core.model.MediaUnit mediaUnit, java.lang.String context, MediaUnitLegend legend, int startOffset, int endOffset, javax.portlet.PortletURL actionURL, java.util.ResourceBundle resourceBundle, boolean showInstanceLink, boolean showToolTips, org.ow2.weblab.core.helper.impl.Statements mediaUnitWTMap)
          get a HTML representation text parts of the media unit where annotations about entities are located inside span tag. span class corresponding context and the entity type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHtmlRepresentation

public static java.lang.String getHtmlRepresentation(org.ow2.weblab.core.model.MediaUnit mediaUnit,
                                                     java.lang.String context,
                                                     MediaUnitLegend legend,
                                                     int startOffset,
                                                     int endOffset,
                                                     javax.portlet.PortletURL actionURL,
                                                     java.util.ResourceBundle resourceBundle,
                                                     boolean showInstanceLink,
                                                     boolean showToolTips,
                                                     org.ow2.weblab.core.helper.impl.Statements mediaUnitWTMap)
get a HTML representation text parts of the media unit where annotations about entities are located inside span tag. span class corresponding context and the entity type. Each span tag has a background color, define in the legend. Possibility to get parts of text with offsets.
For Example <div id="com_eads_weblab_div_content" class="com_eads_weblab_div_content"> <div> a part of text with an <span class='com_eads_weblab_annotation'> annotation</span> </div> </div>

Returns:
HTML code


Copyright © 2004-2011. All Rights Reserved.