Class Relation (0.3.0)

public final class Relation extends GeneratedMessage implements RelationOrBuilder

Defines the relationship between the entity (a) and another entity (b).

Protobuf type google.backstory.Relation

Implements

RelationOrBuilder

Static Fields

DIRECTION_FIELD_NUMBER

public static final int DIRECTION_FIELD_NUMBER
Field Value
Type Description
int

ENTITY_FIELD_NUMBER

public static final int ENTITY_FIELD_NUMBER
Field Value
Type Description
int

ENTITY_LABEL_FIELD_NUMBER

public static final int ENTITY_LABEL_FIELD_NUMBER
Field Value
Type Description
int

ENTITY_TYPE_FIELD_NUMBER

public static final int ENTITY_TYPE_FIELD_NUMBER
Field Value
Type Description
int

RELATIONSHIP_FIELD_NUMBER

public static final int RELATIONSHIP_FIELD_NUMBER
Field Value
Type Description
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Relation getDefaultInstance()
Returns
Type Description
Relation

getDescriptor()

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

newBuilder()

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

newBuilder(Relation prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public Relation getDefaultInstanceForType()
Returns
Type Description
Relation

getDirection()

public Relation.Directionality getDirection()

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Returns
Type Description
Relation.Directionality

The direction.

getDirectionValue()

public int getDirectionValue()

Directionality of relationship between primary entity (a) and the related entity (b).

.google.backstory.Relation.Directionality direction = 4;

Returns
Type Description
int

The enum numeric value on the wire for direction.

getEntity()

public Noun getEntity()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
Noun

The entity.

getEntityLabel()

public Relation.EntityLabel getEntityLabel()

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Returns
Type Description
Relation.EntityLabel

The entityLabel.

getEntityLabelValue()

public int getEntityLabelValue()

Label to identify the Noun of the relation.

.google.backstory.Relation.EntityLabel entity_label = 6;

Returns
Type Description
int

The enum numeric value on the wire for entityLabel.

getEntityOrBuilder()

public NounOrBuilder getEntityOrBuilder()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
NounOrBuilder

getEntityType()

public EntityMetadata.EntityType getEntityType()

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Returns
Type Description
EntityMetadata.EntityType

The entityType.

getEntityTypeValue()

public int getEntityTypeValue()

Type of the related entity (b) in this relationship.

.google.backstory.EntityMetadata.EntityType entity_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for entityType.

getParserForType()

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

getRelationship()

public Relation.Relationship getRelationship()

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Returns
Type Description
Relation.Relationship

The relationship.

getRelationshipValue()

public int getRelationshipValue()

Type of relationship.

.google.backstory.Relation.Relationship relationship = 3;

Returns
Type Description
int

The enum numeric value on the wire for relationship.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUid()

public ByteString getUid()

UID of the relationship.

bytes uid = 5;

Returns
Type Description
ByteString

The uid.

hasEntity()

public boolean hasEntity()

Entity (b) that the primary entity (a) is related to.

.google.backstory.Noun entity = 1;

Returns
Type Description
boolean

Whether the entity field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Relation.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Relation.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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