Package com.google.cloud.language.v1
Class DependencyEdge.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
com.google.cloud.language.v1.DependencyEdge.Builder
- All Implemented Interfaces:
DependencyEdgeOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- DependencyEdge
public static final class DependencyEdge.Builder
extends com.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
implements DependencyEdgeOrBuilder
Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017Protobuf type
google.cloud.language.v1.DependencyEdge-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Represents the head of this token in the dependency tree.The parse label for the token.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintRepresents the head of this token in the dependency tree.getLabel()The parse label for the token.intThe parse label for the token.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(DependencyEdge other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setHeadTokenIndex(int value) Represents the head of this token in the dependency tree.setLabel(DependencyEdge.Label value) The parse label for the token.setLabelValue(int value) The parse label for the token.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DependencyEdge.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<DependencyEdge.Builder>
-
mergeFrom
public DependencyEdge.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DependencyEdge.Builder>- Throws:
IOException
-
getHeadTokenIndex
public int getHeadTokenIndex()Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index.
int32 head_token_index = 1;- Specified by:
getHeadTokenIndexin interfaceDependencyEdgeOrBuilder- Returns:
- The headTokenIndex.
-
setHeadTokenIndex
Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index.
int32 head_token_index = 1;- Parameters:
value- The headTokenIndex to set.- Returns:
- This builder for chaining.
-
clearHeadTokenIndex
Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index.
int32 head_token_index = 1;- Returns:
- This builder for chaining.
-
getLabelValue
public int getLabelValue()The parse label for the token.
.google.cloud.language.v1.DependencyEdge.Label label = 2;- Specified by:
getLabelValuein interfaceDependencyEdgeOrBuilder- Returns:
- The enum numeric value on the wire for label.
-
setLabelValue
The parse label for the token.
.google.cloud.language.v1.DependencyEdge.Label label = 2;- Parameters:
value- The enum numeric value on the wire for label to set.- Returns:
- This builder for chaining.
-
getLabel
The parse label for the token.
.google.cloud.language.v1.DependencyEdge.Label label = 2;- Specified by:
getLabelin interfaceDependencyEdgeOrBuilder- Returns:
- The label.
-
setLabel
The parse label for the token.
.google.cloud.language.v1.DependencyEdge.Label label = 2;- Parameters:
value- The label to set.- Returns:
- This builder for chaining.
-
clearLabel
The parse label for the token.
.google.cloud.language.v1.DependencyEdge.Label label = 2;- Returns:
- This builder for chaining.
-