public class Relationship
extends java.lang.Object
implements java.io.Serializable
Information about how blocks are related to each other. A Block
object contains 0 or more Relation objects in a list,
Relationships. For more information, see Block.
The Type element provides the type of the relationship for all
blocks in the IDs array.
| Constructor and Description |
|---|
Relationship() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getIds()
An array of IDs for related blocks.
|
java.lang.String |
getType()
The type of relationship that the blocks in the IDs array have with the
current block.
|
int |
hashCode() |
void |
setIds(java.util.Collection<java.lang.String> ids)
An array of IDs for related blocks.
|
void |
setType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
void |
setType(java.lang.String type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Relationship |
withIds(java.util.Collection<java.lang.String> ids)
An array of IDs for related blocks.
|
Relationship |
withIds(java.lang.String... ids)
An array of IDs for related blocks.
|
Relationship |
withType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
Relationship |
withType(java.lang.String type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
public java.lang.String getType()
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD. A relationship of type VALUE is a list that contains
the ID of the VALUE block that's associated with the KEY of a key-value
pair. A relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.
Constraints:
Allowed Values: VALUE, CHILD, COMPLEX_FEATURES
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD. A relationship of type
VALUE is a list that contains the ID of the VALUE block that's
associated with the KEY of a key-value pair. A relationship of
type CHILD is a list of IDs that identify WORD blocks in the case
of lines Cell blocks in the case of Tables, and WORD blocks in
the case of Selection Elements.
RelationshipTypepublic void setType(java.lang.String type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD. A relationship of type VALUE is a list that contains
the ID of the VALUE block that's associated with the KEY of a key-value
pair. A relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.
Constraints:
Allowed Values: VALUE, CHILD, COMPLEX_FEATURES
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD. A relationship of
type VALUE is a list that contains the ID of the VALUE block
that's associated with the KEY of a key-value pair. A
relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables,
and WORD blocks in the case of Selection Elements.
RelationshipTypepublic Relationship withType(java.lang.String type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD. A relationship of type VALUE is a list that contains
the ID of the VALUE block that's associated with the KEY of a key-value
pair. A relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VALUE, CHILD, COMPLEX_FEATURES
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD. A relationship of
type VALUE is a list that contains the ID of the VALUE block
that's associated with the KEY of a key-value pair. A
relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables,
and WORD blocks in the case of Selection Elements.
RelationshipTypepublic void setType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD. A relationship of type VALUE is a list that contains
the ID of the VALUE block that's associated with the KEY of a key-value
pair. A relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.
Constraints:
Allowed Values: VALUE, CHILD, COMPLEX_FEATURES
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD. A relationship of
type VALUE is a list that contains the ID of the VALUE block
that's associated with the KEY of a key-value pair. A
relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables,
and WORD blocks in the case of Selection Elements.
RelationshipTypepublic Relationship withType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD. A relationship of type VALUE is a list that contains
the ID of the VALUE block that's associated with the KEY of a key-value
pair. A relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables, and WORD
blocks in the case of Selection Elements.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VALUE, CHILD, COMPLEX_FEATURES
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD. A relationship of
type VALUE is a list that contains the ID of the VALUE block
that's associated with the KEY of a key-value pair. A
relationship of type CHILD is a list of IDs that identify WORD
blocks in the case of lines Cell blocks in the case of Tables,
and WORD blocks in the case of Selection Elements.
RelationshipTypepublic java.util.List<java.lang.String> getIds()
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
public void setIds(java.util.Collection<java.lang.String> ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public Relationship withIds(java.lang.String... ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
Returns a reference to this object so that method calls can be chained together.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public Relationship withIds(java.util.Collection<java.lang.String> ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
Returns a reference to this object so that method calls can be chained together.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.