public class ParUtil
extends java.lang.Object
Constructor and Description |
---|
ParUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkId(Graph graph,
long vertexId,
java.util.function.Predicate<Element> vertexCondition)
点检查,包含属性过滤以及停止检查
|
static boolean |
checkId(Graph graph,
long vertexId,
java.util.Set<java.lang.Integer> vertexTypes)
点检查,包含类型过滤以及停止检查
|
static boolean |
checkId(Graph graph,
long vertexId,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
点检查,包含属性过滤和类型过滤以及停止检查
|
static boolean |
checkLocal(Graph graph,
long vertexId)
检查点是否在对应机器上以及停止检查
|
static boolean |
checkVertex(Graph graph,
Vertex vertex,
java.util.function.Predicate<Element> vertexCondition)
点检查,包含属性过滤以及停止检查
|
static boolean |
checkVertex(Graph graph,
Vertex vertex,
java.util.Set<java.lang.Integer> vertexTypes)
点检查,包含类型过滤以及停止检查
|
static boolean |
checkVertex(Graph graph,
Vertex vertex,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
点检查,包含属性过滤和类型过滤以及停止检查
|
static Direction |
convertDirection(java.lang.String direction)
方向转换
|
static java.util.Set<java.lang.Integer> |
convertEdgeTypeName(Graph graph,
java.util.Set<java.lang.String> edgeTypeNames)
转换边类型名到边类型index
|
static java.util.Set<java.lang.Integer> |
convertEdgeTypeName(Graph graph,
java.lang.String... edgeTypeNames)
转换边类型名到边类型index
|
static java.util.Set<java.lang.Integer> |
convertVertexTypeName(Graph graph,
java.util.Set<java.lang.String> vertexTypeNames)
转换点类型名到点类型index
|
static java.util.Set<java.lang.Integer> |
convertVertexTypeName(Graph graph,
java.lang.String... vertexTypeNames)
转换点类型名到点类型index
|
static java.util.Map<java.lang.String,java.lang.Object> |
extendCompute(Graph graph,
long vertexId,
ExtendParam param,
java.util.List<java.lang.String> rules)
单点扩展计算
|
static java.util.Map<java.lang.String,java.lang.Object> |
extendCompute(Graph graph,
long vertexId,
ExtendParam param,
java.lang.String rule)
单点扩展计算
|
static java.util.Map<java.lang.String,java.lang.Object> |
extendCompute(Graph graph,
long vertexId,
java.lang.String structure,
java.util.List<java.lang.String> rules)
单点扩展计算
|
static java.util.Map<java.lang.String,java.lang.Object> |
extendCompute(Graph graph,
long vertexId,
java.lang.String structure,
java.lang.String rule)
单点扩展计算
|
static java.util.Map<java.lang.String,java.lang.Object> |
extendCompute(Graph graph,
long vertexId,
java.lang.String structure,
java.lang.String filter,
java.util.List<java.lang.String> rules)
单点扩展计算
|
static ResourceIterator<Edge> |
extendEdge(Graph graph,
long vertexId)
获取边迭代器
|
static void |
extendEdge(Graph graph,
long vertexId,
com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
边迭代计算
|
static ResourceIterator<Edge> |
extendEdge(Graph graph,
long vertexId,
ExtendParam param)
获取边迭代器
|
static void |
extendEdge(Graph graph,
long vertexId,
ExtendParam param,
com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
边迭代计算
|
static ResourceIterator<Edge> |
extendEdge(Graph graph,
long vertexId,
java.lang.String structure)
获取边迭代器
|
static void |
extendEdge(Graph graph,
long vertexId,
java.lang.String structure,
com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
边迭代计算
|
static java.util.List<Edge> |
extendEdgeList(Graph graph,
long vertexId)
获取边列表
|
static java.util.List<Edge> |
extendEdgeList(Graph graph,
long vertexId,
ExtendParam param)
获取边列表
|
static java.util.List<Edge> |
extendEdgeList(Graph graph,
long vertexId,
java.lang.String structure)
获取边列表
|
static Edge |
extendSingleEdge(Graph graph,
long vertexId)
获取单条边
|
static Edge |
extendSingleEdge(Graph graph,
long vertexId,
ExtendParam param)
获取单条边
|
static Edge |
extendSingleEdge(Graph graph,
long vertexId,
java.lang.String structure)
获取单条边
|
static java.util.Map<java.lang.Long,java.util.List<java.lang.Object>> |
getProperty(Graph graph,
java.util.List<java.lang.Long> ids,
java.lang.String... propertyNames)
批量获取点属性
|
static java.util.Map<java.lang.Long,java.lang.Object> |
getProperty(Graph graph,
java.util.List<java.lang.Long> ids,
java.lang.String propertyName)
批量获取点属性
|
static long |
getVertexCount(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.function.Predicate<Element> vertexCondition)
获取点属性过滤后的点数
|
static long |
getVertexCount(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.Set<java.lang.Integer> vertexTypes)
获取点类型过滤后的点数
|
static long |
getVertexCount(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
获取点类型属性过滤后的点数
|
static java.util.Set<java.lang.Long> |
getVertexIds(Graph graph,
java.util.function.Predicate<Element> vertexCondition)
通过属性过滤获取一批点id
|
static java.util.Set<java.lang.Long> |
getVertexIds(Graph graph,
java.util.Set<java.lang.Integer> vertexTypes)
通过类型过滤获取一批点id
|
static java.util.Set<java.lang.Long> |
getVertexIds(Graph graph,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
通过类型属性过滤获取一批点id
|
static java.util.Set<java.lang.Long> |
getVertexIdsFast(Graph graph,
java.util.function.Predicate<Element> vertexCondition)
通过属性过滤获取一批点id,多线程加速
|
static java.util.Set<java.lang.Long> |
getVertexIdsFast(Graph graph,
java.util.Set<java.lang.Integer> vertexTypes)
通过类型过滤获取一批点id,多线程加速
|
static java.util.Set<java.lang.Long> |
getVertexIdsFast(Graph graph,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
通过类型属性过滤获取一批点id,多线程加速
|
static java.util.List<java.lang.Long> |
getVertexList(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.function.Predicate<Element> vertexCondition)
获取点属性过滤后的点列表
|
static java.util.List<java.lang.Long> |
getVertexList(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.Set<java.lang.Integer> vertexTypes)
获取点类型过滤后的点列表
|
static java.util.List<java.lang.Long> |
getVertexList(Graph graph,
java.util.List<java.lang.Long> ids,
java.util.Set<java.lang.Integer> vertexTypes,
java.util.function.Predicate<Element> vertexCondition)
获取点类型属性过滤后的点列表
|
static Direction |
reverseDirection(Direction direction)
反转方向
|
public static boolean checkId(Graph graph, long vertexId, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexId
- 点idvertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static boolean checkId(Graph graph, long vertexId, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象vertexId
- 点idvertexTypes
- 点类型列表public static boolean checkId(Graph graph, long vertexId, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexId
- 点idvertexCondition
- 点属性过滤public static boolean checkVertex(Graph graph, Vertex vertex, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertex
- 点对象vertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static boolean checkVertex(Graph graph, Vertex vertex, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象vertex
- 点对象vertexTypes
- 点类型列表public static boolean checkVertex(Graph graph, Vertex vertex, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertex
- 点对象vertexCondition
- 点属性过滤public static boolean checkLocal(Graph graph, long vertexId)
graph
- 图对象vertexId
- 点idpublic static ResourceIterator<Edge> extendEdge(Graph graph, long vertexId, ExtendParam param)
graph
- 图对象vertexId
- 点idparam
- 拓展参数public static ResourceIterator<Edge> extendEdge(Graph graph, long vertexId, java.lang.String structure)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构public static ResourceIterator<Edge> extendEdge(Graph graph, long vertexId)
graph
- 图对象vertexId
- 点idpublic static java.util.List<Edge> extendEdgeList(Graph graph, long vertexId, ExtendParam param)
graph
- 图对象vertexId
- 点idparam
- 拓展参数public static java.util.List<Edge> extendEdgeList(Graph graph, long vertexId, java.lang.String structure)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构public static java.util.List<Edge> extendEdgeList(Graph graph, long vertexId)
graph
- 图对象vertexId
- 点idpublic static void extendEdge(Graph graph, long vertexId, ExtendParam param, com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
graph
- 图对象vertexId
- 点idparam
- 拓展参数consumer
- 计算逻辑public static void extendEdge(Graph graph, long vertexId, java.lang.String structure, com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构consumer
- 计算逻辑public static void extendEdge(Graph graph, long vertexId, com.graphdbapi.parkit.consumer.Consumer<Edge> consumer)
graph
- 图对象vertexId
- 点idconsumer
- 计算逻辑public static Edge extendSingleEdge(Graph graph, long vertexId, ExtendParam param)
graph
- 图对象vertexId
- 点idparam
- 拓展参数public static Edge extendSingleEdge(Graph graph, long vertexId, java.lang.String structure)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构public static Edge extendSingleEdge(Graph graph, long vertexId)
graph
- 图对象vertexId
- 点idpublic static java.util.Map<java.lang.String,java.lang.Object> extendCompute(Graph graph, long vertexId, ExtendParam param, java.util.List<java.lang.String> rules)
graph
- 图对象vertexId
- 点idparam
- 拓展参数rules
- 计算逻辑public static java.util.Map<java.lang.String,java.lang.Object> extendCompute(Graph graph, long vertexId, ExtendParam param, java.lang.String rule)
graph
- 图对象vertexId
- 点idparam
- 拓展参数rule
- 计算逻辑public static java.util.Map<java.lang.String,java.lang.Object> extendCompute(Graph graph, long vertexId, java.lang.String structure, java.util.List<java.lang.String> rules)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构rules
- 计算逻辑public static java.util.Map<java.lang.String,java.lang.Object> extendCompute(Graph graph, long vertexId, java.lang.String structure, java.lang.String filter, java.util.List<java.lang.String> rules)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构filter
- 过滤条件rules
- 计算逻辑public static java.util.Map<java.lang.String,java.lang.Object> extendCompute(Graph graph, long vertexId, java.lang.String structure, java.lang.String rule)
graph
- 图对象vertexId
- 点idstructure
- 拓展结构rule
- 计算逻辑public static long getVertexCount(Graph graph, java.util.List<java.lang.Long> ids, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象ids
- 点集合vertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static long getVertexCount(Graph graph, java.util.List<java.lang.Long> ids, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象ids
- 点集合vertexTypes
- 点类型列表public static long getVertexCount(Graph graph, java.util.List<java.lang.Long> ids, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象ids
- 点集合vertexCondition
- 点属性过滤public static java.util.List<java.lang.Long> getVertexList(Graph graph, java.util.List<java.lang.Long> ids, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象ids
- 点集合vertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static java.util.List<java.lang.Long> getVertexList(Graph graph, java.util.List<java.lang.Long> ids, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象ids
- 点集合vertexTypes
- 点类型列表public static java.util.List<java.lang.Long> getVertexList(Graph graph, java.util.List<java.lang.Long> ids, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象ids
- 点集合vertexCondition
- 点属性过滤public static java.util.Map<java.lang.Long,java.lang.Object> getProperty(Graph graph, java.util.List<java.lang.Long> ids, java.lang.String propertyName)
graph
- 图对象ids
- 起始点集合propertyName
- 属性名称public static java.util.Map<java.lang.Long,java.util.List<java.lang.Object>> getProperty(Graph graph, java.util.List<java.lang.Long> ids, java.lang.String... propertyNames)
graph
- 图对象ids
- 起始点集合propertyNames
- 属性名称集合public static java.util.Set<java.lang.Long> getVertexIds(Graph graph, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static java.util.Set<java.lang.Long> getVertexIds(Graph graph, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象vertexTypes
- 点类型列表public static java.util.Set<java.lang.Long> getVertexIds(Graph graph, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexCondition
- 点属性过滤public static java.util.Set<java.lang.Long> getVertexIdsFast(Graph graph, java.util.Set<java.lang.Integer> vertexTypes, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexTypes
- 点类型列表vertexCondition
- 点属性过滤public static java.util.Set<java.lang.Long> getVertexIdsFast(Graph graph, java.util.Set<java.lang.Integer> vertexTypes)
graph
- 图对象vertexTypes
- 点类型列表public static java.util.Set<java.lang.Long> getVertexIdsFast(Graph graph, java.util.function.Predicate<Element> vertexCondition)
graph
- 图对象vertexCondition
- 点属性过滤public static Direction convertDirection(java.lang.String direction)
direction
- 方向名称 ["OUT", "IN", "BOTH"]public static Direction reverseDirection(Direction direction)
direction
- 初始方向public static java.util.Set<java.lang.Integer> convertVertexTypeName(Graph graph, java.util.Set<java.lang.String> vertexTypeNames)
graph
- 图对象vertexTypeNames
- 点类型名集合public static java.util.Set<java.lang.Integer> convertVertexTypeName(Graph graph, java.lang.String... vertexTypeNames)
graph
- 图对象vertexTypeNames
- 点类型名集合public static java.util.Set<java.lang.Integer> convertEdgeTypeName(Graph graph, java.util.Set<java.lang.String> edgeTypeNames)
graph
- 图对象edgeTypeNames
- 点类型名集合public static java.util.Set<java.lang.Integer> convertEdgeTypeName(Graph graph, java.lang.String... edgeTypeNames)
graph
- 图对象edgeTypeNames
- 点类型名集合