public class EntityTag
extends java.lang.Object
Constructor and Description |
---|
EntityTag(java.lang.String entityTerm,
EntityType entityType)
Create a new EntityTag
|
EntityTag(java.lang.String entityTerm,
EntityType entityType,
java.lang.String rawType)
Create a new EntityTag
|
Modifier and Type | Method and Description |
---|---|
void |
addAlternate(java.lang.String alternate)
Add an alternate term which is a co-reference to this entity.
|
void |
addRawType(java.lang.String rawType)
Add a raw type to the set of raw types for this entity
|
boolean |
equals(java.lang.Object obj)
Determine when two entity tags are equal.
|
java.util.Set<java.lang.String> |
getAlternates()
Get the set of alternate terms for this entity.
|
java.lang.String |
getEntity()
Get the entity term
|
java.util.Set<java.lang.String> |
getRawTypes()
Get the set of raw types for this entity
|
EntityType |
getType()
Get the type for this entity
|
int |
hashCode()
Get the hash code for this entity
|
void |
merge(EntityTag otherTag)
Merge two entities that are equal.
|
void |
setEntity(java.lang.String entityTerm)
Change the entity to the provided term.
|
void |
setType(EntityType entityType)
Set the entity type for this entity.
|
java.lang.String |
toString()
Return the string representation of this tag
|
public EntityTag(java.lang.String entityTerm, EntityType entityType)
entityTerm
- the entity itselfentityType
- the entity typepublic EntityTag(java.lang.String entityTerm, EntityType entityType, java.lang.String rawType)
entityTerm
- the entity itselfentityType
- the entity typerawType
- the raw type from an extractorpublic void addAlternate(java.lang.String alternate)
alternate
- the alternate termpublic void addRawType(java.lang.String rawType)
rawType
- the new raw typepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to comparepublic java.util.Set<java.lang.String> getAlternates()
public java.lang.String getEntity()
public java.util.Set<java.lang.String> getRawTypes()
public EntityType getType()
public int hashCode()
hashCode
in class java.lang.Object
public void merge(EntityTag otherTag)
otherTag
- the other entity tag to mergepublic void setEntity(java.lang.String entityTerm)
entityTerm
- the new entity termpublic void setType(EntityType entityType)
entityType
- the entity typepublic java.lang.String toString()
toString
in class java.lang.Object