com.languagecomputer.api.text
Class DefaultEntity

java.lang.Object
  extended by com.languagecomputer.api.text.DefaultText
      extended by com.languagecomputer.api.text.DefaultEntity
All Implemented Interfaces:
Entity, Text

public class DefaultEntity
extends DefaultText
implements Entity

Default implementation of an Entity.

Since:
1.0
Author:
Kirk Roberts
See Also:
DefaultText

Field Summary
 
Fields inherited from interface com.languagecomputer.api.text.Entity
TYPE
 
Constructor Summary
DefaultEntity()
          Creates a new DefaultEntity.
 
Method Summary
 String getType()
          Returns the type of this Entity.
 void setAnnotationType(AnnotationType annType)
          Not necessary: defaults to Entity.TYPE.
 void setType(String type)
          Sets the type of this Entity.
 String toString()
          Returns a String representation of a DefaultEntity.
 
Methods inherited from class com.languagecomputer.api.text.DefaultText
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations, setDocument, setEndCharOffset, setRawString, setStartCharOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.languagecomputer.api.text.Text
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations
 

Constructor Detail

DefaultEntity

public DefaultEntity()
Creates a new DefaultEntity.

Method Detail

setAnnotationType

public void setAnnotationType(AnnotationType annType)
Not necessary: defaults to Entity.TYPE.

Overrides:
setAnnotationType in class DefaultText
Parameters:
annType - AnnotationType to use for this DefaultEntity.
See Also:
Text.getAnnotationType(), AnnotationType

setType

public void setType(String type)
Sets the type of this Entity.

Parameters:
type - The entity type String.
See Also:
Entity.getType()

getType

public String getType()
Returns the type of this Entity.

Specified by:
getType in interface Entity
Returns:
The String representation of this Entity's type.

toString

public String toString()
Returns a String representation of a DefaultEntity.

Overrides:
toString in class DefaultText


Copyright © 2009. All Rights Reserved.