Class EntityAnnotation (2.1.1)

public final class EntityAnnotation extends GeneratedMessageV3 implements EntityAnnotationOrBuilder

Set of detected entity features.

Protobuf type google.cloud.vision.v1p2beta1.EntityAnnotation

Static Fields

BOUNDING_POLY_FIELD_NUMBER

public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
TypeDescription
int

CONFIDENCE_FIELD_NUMBER

public static final int CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

LOCALE_FIELD_NUMBER

public static final int LOCALE_FIELD_NUMBER
Field Value
TypeDescription
int

LOCATIONS_FIELD_NUMBER

public static final int LOCATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

MID_FIELD_NUMBER

public static final int MID_FIELD_NUMBER
Field Value
TypeDescription
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

SCORE_FIELD_NUMBER

public static final int SCORE_FIELD_NUMBER
Field Value
TypeDescription
int

TOPICALITY_FIELD_NUMBER

public static final int TOPICALITY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static EntityAnnotation getDefaultInstance()
Returns
TypeDescription
EntityAnnotation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static EntityAnnotation.Builder newBuilder()
Returns
TypeDescription
EntityAnnotation.Builder

newBuilder(EntityAnnotation prototype)

public static EntityAnnotation.Builder newBuilder(EntityAnnotation prototype)
Parameter
NameDescription
prototypeEntityAnnotation
Returns
TypeDescription
EntityAnnotation.Builder

parseDelimitedFrom(InputStream input)

public static EntityAnnotation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static EntityAnnotation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EntityAnnotation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EntityAnnotation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static EntityAnnotation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static EntityAnnotation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EntityAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<EntityAnnotation> parser()
Returns
TypeDescription
Parser<EntityAnnotation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBoundingPoly()

public BoundingPoly getBoundingPoly()

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

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

Returns
TypeDescription
BoundingPoly

The boundingPoly.

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

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

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

Returns
TypeDescription
BoundingPolyOrBuilder

getConfidence()

public float getConfidence()

Deprecated. Use score instead. 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
TypeDescription
float

The confidence.

getDefaultInstanceForType()

public EntityAnnotation getDefaultInstanceForType()
Returns
TypeDescription
EntityAnnotation

getDescription()

public String getDescription()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Entity textual description, expressed in its locale language.

string description = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.v1p2beta1.LocationInfo locations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v1p2beta1.LocationInfo locations = 8;

Returns
TypeDescription
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.v1p2beta1.LocationInfo locations = 8;

Returns
TypeDescription
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.v1p2beta1.LocationInfo locations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v1p2beta1.LocationInfo locations = 8;

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder>

getMid()

public String getMid()

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

string mid = 1;

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for mid.

getParserForType()

public Parser<EntityAnnotation> getParserForType()
Returns
TypeDescription
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.v1p2beta1.Property properties = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v1p2beta1.Property properties = 9;

Returns
TypeDescription
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.v1p2beta1.Property properties = 9;

Returns
TypeDescription
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.v1p2beta1.Property properties = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v1p2beta1.Property properties = 9;

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1p2beta1.PropertyOrBuilder>

getScore()

public float getScore()

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

float score = 4;

Returns
TypeDescription
float

The score.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
float

The topicality.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasBoundingPoly()

public boolean hasBoundingPoly()

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

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

Returns
TypeDescription
boolean

Whether the boundingPoly field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public EntityAnnotation.Builder newBuilderForType()
Returns
TypeDescription
EntityAnnotation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EntityAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
EntityAnnotation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public EntityAnnotation.Builder toBuilder()
Returns
TypeDescription
EntityAnnotation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException