Package com.gpudb.protocol
Class GetGraphEntitiesResponse
- java.lang.Object
-
- com.gpudb.protocol.GetGraphEntitiesResponse
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class GetGraphEntitiesResponse extends Object implements org.apache.avro.generic.IndexedRecord
A set of results returned byGPUdb.getGraphEntities.
-
-
Constructor Summary
Constructors Constructor Description GetGraphEntitiesResponse()Constructs a GetGraphEntitiesResponse object with default parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<Double>getEntitiesDouble()Compact double-packed payload for WKT (geo/XY) graphs.List<Long>getEntitiesInt()Flat array of entity data for integer-identifier graphs with a repeating stride.List<String>getEntitiesString()Flat array of entity data for name-identifier (string) graphs only.List<Float>getEntitiesWeight()Per-edge weight values, populated only when the request option 'include_weights' is 'true' andoptions entityTypeis 'edge'.Map<String,String>getInfo()Additional information map.List<String>getLabels()Array of distinct label strings.booleangetResult()Indicates a successful retrieval.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.GetGraphEntitiesResponsesetEntitiesDouble(List<Double> entitiesDouble)Compact double-packed payload for WKT (geo/XY) graphs.GetGraphEntitiesResponsesetEntitiesInt(List<Long> entitiesInt)Flat array of entity data for integer-identifier graphs with a repeating stride.GetGraphEntitiesResponsesetEntitiesString(List<String> entitiesString)Flat array of entity data for name-identifier (string) graphs only.GetGraphEntitiesResponsesetEntitiesWeight(List<Float> entitiesWeight)Per-edge weight values, populated only when the request option 'include_weights' is 'true' andoptions entityTypeis 'edge'.GetGraphEntitiesResponsesetInfo(Map<String,String> info)Additional information map.GetGraphEntitiesResponsesetLabels(List<String> labels)Array of distinct label strings.GetGraphEntitiesResponsesetResult(boolean result)Indicates a successful retrieval.StringtoString()
-
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getResult
public boolean getResult()
Indicates a successful retrieval.- Returns:
- The current value of
result.
-
setResult
public GetGraphEntitiesResponse setResult(boolean result)
Indicates a successful retrieval.- Parameters:
result- The new value forresult.- Returns:
thisto mimic the builder pattern.
-
getEntitiesInt
public List<Long> getEntitiesInt()
Flat array of entity data for integer-identifier graphs with a repeating stride. For node entities (stride 2): [node_id, label_index, ...]. For edge entities (stride 4): [edge_id, node1_id, node2_id, label_index, ...]. Populated when the graph uses integer identifiers; empty otherwise. The label_index is a 1-based index into thelabelsarray; 0 indicates no label. When the request option 'concise_edge_connectivity' is 'true', this array is also used (regardless of graph identifier type) for edge entities and carries [edge_id, node1_index, node2_index, edge_label_index] where node1_index/node2_index are 0-based positions into the node array returned from a paired node call on the same graph.- Returns:
- The current value of
entitiesInt.
-
setEntitiesInt
public GetGraphEntitiesResponse setEntitiesInt(List<Long> entitiesInt)
Flat array of entity data for integer-identifier graphs with a repeating stride. For node entities (stride 2): [node_id, label_index, ...]. For edge entities (stride 4): [edge_id, node1_id, node2_id, label_index, ...]. Populated when the graph uses integer identifiers; empty otherwise. The label_index is a 1-based index into thelabelsarray; 0 indicates no label. When the request option 'concise_edge_connectivity' is 'true', this array is also used (regardless of graph identifier type) for edge entities and carries [edge_id, node1_index, node2_index, edge_label_index] where node1_index/node2_index are 0-based positions into the node array returned from a paired node call on the same graph.- Parameters:
entitiesInt- The new value forentitiesInt.- Returns:
thisto mimic the builder pattern.
-
getEntitiesString
public List<String> getEntitiesString()
Flat array of entity data for name-identifier (string) graphs only. For node entities (stride 2): [node_name, label_index, ...]. For edge entities (stride 4): [edge_id, node1_name, node2_name, label_index, ...]. Populated only when the graph uses string identifiers. Empty for integer-identifier graphs (data goes toentitiesInt) and for WKT/geo-XY graphs (data always goes toentitiesDouble— 'POINT(x y)' strings are never emitted). The label_index is a string representation of a 1-based index into thelabelsarray; '0' indicates no label.- Returns:
- The current value of
entitiesString.
-
setEntitiesString
public GetGraphEntitiesResponse setEntitiesString(List<String> entitiesString)
Flat array of entity data for name-identifier (string) graphs only. For node entities (stride 2): [node_name, label_index, ...]. For edge entities (stride 4): [edge_id, node1_name, node2_name, label_index, ...]. Populated only when the graph uses string identifiers. Empty for integer-identifier graphs (data goes toentitiesInt) and for WKT/geo-XY graphs (data always goes toentitiesDouble— 'POINT(x y)' strings are never emitted). The label_index is a string representation of a 1-based index into thelabelsarray; '0' indicates no label.- Parameters:
entitiesString- The new value forentitiesString.- Returns:
thisto mimic the builder pattern.
-
getEntitiesDouble
public List<Double> getEntitiesDouble()
Compact double-packed payload for WKT (geo/XY) graphs. WKT graphs ALWAYS use this array — 'POINT(x y)' strings are never emitted anywhere. Stride 3 for nodes: [x, y, label_index, ...]. Stride 6 for edges (non-concise): [edge_id, x0, y0, x1, y1, label_index, ...]. Empty for non-WKT graphs and when concise mode emits edges intoentitiesIntinstead. label_index/edge_id occupy double slots (representable exactly up to 2^53). When 'concise_edge_connectivity' is 'true' and entity_type is 'node', tombstoned (deleted) WKT slots emit [0.0, 0.0, 0.0] to keep position indices stable. Roughly 4x smaller on the wire than 'POINT(x y)' strings and avoids any client-side regex parse.- Returns:
- The current value of
entitiesDouble.
-
setEntitiesDouble
public GetGraphEntitiesResponse setEntitiesDouble(List<Double> entitiesDouble)
Compact double-packed payload for WKT (geo/XY) graphs. WKT graphs ALWAYS use this array — 'POINT(x y)' strings are never emitted anywhere. Stride 3 for nodes: [x, y, label_index, ...]. Stride 6 for edges (non-concise): [edge_id, x0, y0, x1, y1, label_index, ...]. Empty for non-WKT graphs and when concise mode emits edges intoentitiesIntinstead. label_index/edge_id occupy double slots (representable exactly up to 2^53). When 'concise_edge_connectivity' is 'true' and entity_type is 'node', tombstoned (deleted) WKT slots emit [0.0, 0.0, 0.0] to keep position indices stable. Roughly 4x smaller on the wire than 'POINT(x y)' strings and avoids any client-side regex parse.- Parameters:
entitiesDouble- The new value forentitiesDouble.- Returns:
thisto mimic the builder pattern.
-
getEntitiesWeight
public List<Float> getEntitiesWeight()
Per-edge weight values, populated only when the request option 'include_weights' is 'true' andoptions entityTypeis 'edge'. Stride 1, aligned 1:1 with the edge records emitted inentitiesIntorentitiesString(i.e. the i-th weight corresponds to the i-th edge record). Empty when the graph has no weights component, when requesting nodes, or when the option is not set. Single-precision float matches the graph server's native weight storage.- Returns:
- The current value of
entitiesWeight.
-
setEntitiesWeight
public GetGraphEntitiesResponse setEntitiesWeight(List<Float> entitiesWeight)
Per-edge weight values, populated only when the request option 'include_weights' is 'true' andoptions entityTypeis 'edge'. Stride 1, aligned 1:1 with the edge records emitted inentitiesIntorentitiesString(i.e. the i-th weight corresponds to the i-th edge record). Empty when the graph has no weights component, when requesting nodes, or when the option is not set. Single-precision float matches the graph server's native weight storage.- Parameters:
entitiesWeight- The new value forentitiesWeight.- Returns:
thisto mimic the builder pattern.
-
getLabels
public List<String> getLabels()
Array of distinct label strings. The label_index values inentitiesInt,entitiesString, orentitiesDoubleare 1-based indexes into this array; index 0 means no label.- Returns:
- The current value of
labels.
-
setLabels
public GetGraphEntitiesResponse setLabels(List<String> labels)
Array of distinct label strings. The label_index values inentitiesInt,entitiesString, orentitiesDoubleare 1-based indexes into this array; index 0 means no label.- Parameters:
labels- The new value forlabels.- Returns:
thisto mimic the builder pattern.
-
getInfo
public Map<String,String> getInfo()
Additional information map. Contains the following keys: 'identifier_type' — describes the graph's native node identifier type: 'int', 'string', or 'wkt' (geo/XY graph). 'payload_type' — describes which array actually holds this response payload: 'int' (entitiesInt), 'string' (entitiesString), or 'double' (entitiesDouble). WKT graphs ALWAYS use 'double' for both nodes and edges — 'POINT(x y)' strings are never emitted. In concise edge mode payload_type is 'int' regardless of graph type. Clients should dispatch on 'payload_type', not 'identifier_type', to parse the response. 'total_count' — total number of entities available in the graph for the requested entity_type, used for pagination; this is the live (non-deleted) count by default, or the raw count (including deleted slots) when 'concise_edge_connectivity' is true for a node request. 'status_message' — set to 'Cancelled' if the request was cancelled mid-iteration (withresultset to false). 'concise_edge_connectivity' — set to 'true' when the response was produced with the concise option (edges emitted as [edge_id, v0_index, v1_index, label_idx] inentitiesInt; WKT-graph nodes emitted as [x, y, label_idx] inentitiesDouble; non-WKT nodes still in their native array; node output includes deleted slots to keep indices stable). 'include_weights' — set to 'true' whenentitiesWeightis populated.- Returns:
- The current value of
info.
-
setInfo
public GetGraphEntitiesResponse setInfo(Map<String,String> info)
Additional information map. Contains the following keys: 'identifier_type' — describes the graph's native node identifier type: 'int', 'string', or 'wkt' (geo/XY graph). 'payload_type' — describes which array actually holds this response payload: 'int' (entitiesInt), 'string' (entitiesString), or 'double' (entitiesDouble). WKT graphs ALWAYS use 'double' for both nodes and edges — 'POINT(x y)' strings are never emitted. In concise edge mode payload_type is 'int' regardless of graph type. Clients should dispatch on 'payload_type', not 'identifier_type', to parse the response. 'total_count' — total number of entities available in the graph for the requested entity_type, used for pagination; this is the live (non-deleted) count by default, or the raw count (including deleted slots) when 'concise_edge_connectivity' is true for a node request. 'status_message' — set to 'Cancelled' if the request was cancelled mid-iteration (withresultset to false). 'concise_edge_connectivity' — set to 'true' when the response was produced with the concise option (edges emitted as [edge_id, v0_index, v1_index, label_idx] inentitiesInt; WKT-graph nodes emitted as [x, y, label_idx] inentitiesDouble; non-WKT nodes still in their native array; node output includes deleted slots to keep indices stable). 'include_weights' — set to 'true' whenentitiesWeightis populated.- Parameters:
info- The new value forinfo.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-