org.ow2.weblab.portlet.bean
Class TextZone

java.lang.Object
  extended by org.ow2.weblab.portlet.bean.TextZone

public class TextZone
extends java.lang.Object

Class representing a text zone. A text zone reference a entities list.

Author:
emilien

Constructor Summary
TextZone(int textStartOffset, int textEndOffset)
          public constructor with parameters.
 
Method Summary
 boolean equals(TextZone tz)
          test if a text zone equal this text zone by offset.
 java.util.List<NamedEntity> getEntitiesReferences()
           
 NamedEntity getEntityReference()
          get the first entity referenced by the text zone.
 int getTextEndOffset()
           
 int getTextStartOffset()
           
 boolean isOverLap()
          check if the text zone is an overlap zone (at least two entities referenced).
 boolean reference(NamedEntity ne)
          check a named entitie is referenced in this text zone.
 boolean referenceEntities()
          check if the text zone reference at least one entity.
 void setEntitiesList(java.util.List<NamedEntity> entitiesList)
           
 void setTextEndOffset(int textEndOffset)
           
 void setTextStartOffset(int textStartOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextZone

public TextZone(int textStartOffset,
                int textEndOffset)
public constructor with parameters.

Parameters:
textStartOffset -
textEndOffset -
Method Detail

equals

public boolean equals(TextZone tz)
test if a text zone equal this text zone by offset.

Parameters:
tz -
Returns:
true if tz offset equal this offset.

reference

public boolean reference(NamedEntity ne)
check a named entitie is referenced in this text zone.

Parameters:
ne - the NamedEntity.
Returns:
true if the zone reference ne.

isOverLap

public boolean isOverLap()
check if the text zone is an overlap zone (at least two entities referenced).

Returns:
true if the text zone reference at least two entities.

referenceEntities

public boolean referenceEntities()
check if the text zone reference at least one entity.

Returns:
true if the text zone reference at least one entity.

getEntityReference

public NamedEntity getEntityReference()
get the first entity referenced by the text zone.

Returns:
the first entity referenced by the text zone.

getTextStartOffset

public int getTextStartOffset()

setTextStartOffset

public void setTextStartOffset(int textStartOffset)

getTextEndOffset

public int getTextEndOffset()

setTextEndOffset

public void setTextEndOffset(int textEndOffset)

getEntitiesReferences

public java.util.List<NamedEntity> getEntitiesReferences()

setEntitiesList

public void setEntitiesList(java.util.List<NamedEntity> entitiesList)


Copyright © 2004-2011. All Rights Reserved.