public final class Entity
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Natural Language API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags| Constructor and Description |
|---|
Entity() |
| Modifier and Type | Method and Description |
|---|---|
Entity |
clone() |
java.util.List<EntityMention> |
getMentions()
The mentions of this entity in the input document.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Metadata associated with the entity.
|
java.lang.String |
getName()
The representative name for the entity.
|
java.lang.Float |
getSalience()
The salience score associated with the entity in the [0, 1.0] range.
|
Sentiment |
getSentiment()
For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment
is set to true, this field will contain the aggregate sentiment expressed for this entity in
the provided document.
|
java.lang.String |
getType()
The entity type.
|
Entity |
set(java.lang.String fieldName,
java.lang.Object value) |
Entity |
setMentions(java.util.List<EntityMention> mentions)
The mentions of this entity in the input document.
|
Entity |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Metadata associated with the entity.
|
Entity |
setName(java.lang.String name)
The representative name for the entity.
|
Entity |
setSalience(java.lang.Float salience)
The salience score associated with the entity in the [0, 1.0] range.
|
Entity |
setSentiment(Sentiment sentiment)
For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment
is set to true, this field will contain the aggregate sentiment expressed for this entity in
the provided document.
|
Entity |
setType(java.lang.String type)
The entity type.
|
getFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuespublic java.util.List<EntityMention> getMentions()
null for nonepublic Entity setMentions(java.util.List<EntityMention> mentions)
mentions - mentions or null for nonepublic java.util.Map<java.lang.String,java.lang.String> getMetadata()
null for nonepublic Entity setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
metadata - metadata or null for nonepublic java.lang.String getName()
null for nonepublic Entity setName(java.lang.String name)
name - name or null for nonepublic java.lang.Float getSalience()
null for nonepublic Entity setSalience(java.lang.Float salience)
salience - salience or null for nonepublic Sentiment getSentiment()
null for nonepublic Entity setSentiment(Sentiment sentiment)
sentiment - sentiment or null for nonepublic java.lang.String getType()
null for nonepublic Entity setType(java.lang.String type)
type - type or null for nonepublic Entity set(java.lang.String fieldName, java.lang.Object value)
set in class com.google.api.client.json.GenericJsonpublic Entity clone()
clone in class com.google.api.client.json.GenericJson