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.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Entity() |
| Modifier and Type | Method and Description |
|---|---|
Entity |
clone() |
List<EntityMention> |
getMentions()
The mentions of this entity in the input document.
|
Map<String,String> |
getMetadata()
Metadata associated with the entity.
|
String |
getName()
The representative name for the entity.
|
Sentiment |
getSentiment()
For calls to AnalyzeEntitySentiment this field will contain the aggregate sentiment expressed
for this entity in the provided document.
|
String |
getType()
The entity type.
|
Entity |
set(String fieldName,
Object value) |
Entity |
setMentions(List<EntityMention> mentions)
The mentions of this entity in the input document.
|
Entity |
setMetadata(Map<String,String> metadata)
Metadata associated with the entity.
|
Entity |
setName(String name)
The representative name for the entity.
|
Entity |
setSentiment(Sentiment sentiment)
For calls to AnalyzeEntitySentiment this field will contain the aggregate sentiment expressed
for this entity in the provided document.
|
Entity |
setType(String type)
The entity type.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic List<EntityMention> getMentions()
null for nonepublic Entity setMentions(List<EntityMention> mentions)
mentions - mentions or null for nonepublic Map<String,String> getMetadata()
null for nonepublic Entity setMetadata(Map<String,String> metadata)
metadata - metadata or null for nonepublic String getName()
null for nonepublic Entity setName(String name)
name - name or null for nonepublic Sentiment getSentiment()
null for nonepublic Entity setSentiment(Sentiment sentiment)
sentiment - sentiment or null for nonepublic String getType()
null for nonepublic Entity setType(String type)
type - type or null for nonepublic Entity set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic Entity clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.