Class EntityAnnotation (3.40.0)

public final class EntityAnnotation extends GeneratedMessageV3 implements EntityAnnotationOrBuilder

Set of detected entity features.

Protobuf type google.cloud.vision.v1p1beta1.EntityAnnotation

Static Fields

BOUNDING_POLY_FIELD_NUMBER

public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
Type Description
int

CONFIDENCE_FIELD_NUMBER

public static final int CONFIDENCE_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

LOCALE_FIELD_NUMBER

public static final int LOCALE_FIELD_NUMBER
Field Value
Type Description
int

LOCATIONS_FIELD_NUMBER

public static final int LOCATIONS_FIELD_NUMBER
Field Value
Type Description
int

MID_FIELD_NUMBER

public static final int MID_FIELD_NUMBER
Field Value
Type Description
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
Type Description
int

SCORE_FIELD_NUMBER

public static final int SCORE_FIELD_NUMBER
Field Value
Type Description
int

TOPICALITY_FIELD_NUMBER

public static final int TOPICALITY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EntityAnnotation getDefaultInstance()
Returns
Type Description
EntityAnnotation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static EntityAnnotation.Builder newBuilder()
Returns
Type Description
EntityAnnotation.Builder

newBuilder(EntityAnnotation prototype)

public static EntityAnnotation.Builder newBuilder(EntityAnnotation prototype)
Parameter
Name Description
prototype EntityAnnotation
Returns
Type Description
EntityAnnotation.Builder

parseDelimitedFrom(InputStream input)

public static EntityAnnotation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EntityAnnotation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EntityAnnotation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EntityAnnotation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EntityAnnotation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EntityAnnotation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EntityAnnotation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EntityAnnotation> parser()
Returns
Type Description
Parser<EntityAnnotation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBoundingPoly()

public BoundingPoly getBoundingPoly()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
BoundingPoly

The boundingPoly.

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
BoundingPolyOrBuilder

getConfidence()

public float getConfidence()

The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

float confidence = 5;

Returns
Type Description
float

The confidence.

getDefaultInstanceForType()

public EntityAnnotation getDefaultInstanceForType()
Returns
Type Description
EntityAnnotation

getDescription()

public String getDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getLocale()

public String getLocale()

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Returns
Type Description
String

The locale.

getLocaleBytes()

public ByteString getLocaleBytes()

The language code for the locale in which the entity textual description is expressed.

string locale = 2;

Returns
Type Description
ByteString

The bytes for locale.

getLocations(int index)

public LocationInfo getLocations(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfo

getLocationsCount()

public int getLocationsCount()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8;

Returns
Type Description
int

getLocationsList()

public List<LocationInfo> getLocationsList()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8;

Returns
Type Description
List<LocationInfo>

getLocationsOrBuilder(int index)

public LocationInfoOrBuilder getLocationsOrBuilder(int index)

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8;

Parameter
Name Description
index int
Returns
Type Description
LocationInfoOrBuilder

getLocationsOrBuilderList()

public List<? extends LocationInfoOrBuilder> getLocationsOrBuilderList()

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8;

Returns
Type Description
List<? extends com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder>

getMid()

public String getMid()

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Returns
Type Description
String

The mid.

getMidBytes()

public ByteString getMidBytes()

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

string mid = 1;

Returns
Type Description
ByteString

The bytes for mid.

getParserForType()

public Parser<EntityAnnotation> getParserForType()
Returns
Type Description
Parser<EntityAnnotation>
Overrides

getProperties(int index)

public Property getProperties(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p1beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
Property

getPropertiesCount()

public int getPropertiesCount()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p1beta1.Property properties = 9;

Returns
Type Description
int

getPropertiesList()

public List<Property> getPropertiesList()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p1beta1.Property properties = 9;

Returns
Type Description
List<Property>

getPropertiesOrBuilder(int index)

public PropertyOrBuilder getPropertiesOrBuilder(int index)

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p1beta1.Property properties = 9;

Parameter
Name Description
index int
Returns
Type Description
PropertyOrBuilder

getPropertiesOrBuilderList()

public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

repeated .google.cloud.vision.v1p1beta1.Property properties = 9;

Returns
Type Description
List<? extends com.google.cloud.vision.v1p1beta1.PropertyOrBuilder>

getScore()

public float getScore()

Overall score of the result. Range [0, 1].

float score = 4;

Returns
Type Description
float

The score.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTopicality()

public float getTopicality()

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

float topicality = 6;

Returns
Type Description
float

The topicality.

hasBoundingPoly()

public boolean hasBoundingPoly()

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

.google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7;

Returns
Type Description
boolean

Whether the boundingPoly field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EntityAnnotation.Builder newBuilderForType()
Returns
Type Description
EntityAnnotation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EntityAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EntityAnnotation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public EntityAnnotation.Builder toBuilder()
Returns
Type Description
EntityAnnotation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException