|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.ref.model.entity.Entity
public class Entity
The Class Entity represents entities that are present in a text.
An entity is composed by five basic attributes:
1) An unique identifier
2) The entity type of the entity
3) The starting index of the entity in the document
4) The length of the entity
5) The document where the entity is contained
Field Summary | |
---|---|
static Entity |
NULL_ENTITY
The Constant NULL_ENTITY. |
Constructor Summary | |
---|---|
Entity(java.lang.String id,
java.lang.String entityType,
int offset,
int length,
java.lang.String value,
Document doc)
Instantiates a new Entity. |
Method Summary | |
---|---|
int |
compareTo(Entity o)
|
boolean |
equals(java.lang.Object o)
|
Document |
getDocument()
Gets the document where the entity belongs. |
java.lang.String |
getEntityType()
Gets the entity type. |
java.lang.String |
getId()
Gets the id of the entity. |
int |
getLength()
Gets the length of the entity. |
int |
getOffset()
Gets the starting index of the entity in the text. |
java.lang.String |
getValue()
Gets the value of the entity. |
int |
hashCode()
|
void |
setDocument(Document document)
Sets the document where the entity belongs. |
void |
setEntityType(java.lang.String entityType)
Sets the entity type. |
void |
setId(java.lang.String id)
Sets the id of the entity. |
void |
setLength(int length)
Sets the length of the entity. |
void |
setOffset(int offset)
Sets the starting index of the entity in the text |
void |
setValue(java.lang.String value)
Sets the value of the entity. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Entity NULL_ENTITY
Constructor Detail |
---|
public Entity(java.lang.String id, java.lang.String entityType, int offset, int length, java.lang.String value, Document doc)
id
- the id of the entityentityType
- the entity typeoffset
- the starting index of the entity in the documentlength
- the length of the entityvalue
- the value of the entitydoc
- the document where the entity belongsMethod Detail |
---|
public java.lang.String getId()
public void setId(java.lang.String id)
id
- the new id of the entitypublic java.lang.String getEntityType()
public void setEntityType(java.lang.String entityType)
entityType
- the new entity typepublic int getOffset()
public void setOffset(int offset)
offset
- starting index of the entity in the textpublic int getLength()
public void setLength(int length)
length
- length of the entitypublic java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the new value of the entitypublic Document getDocument()
public void setDocument(Document document)
document
- the new document where the entity belongspublic java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Entity o)
compareTo
in interface java.lang.Comparable<Entity>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |