Package com.graphdbapi.values.api
Interface Node
-
- All Superinterfaces:
Entity<Long>
,PropertyEntity
public interface Node extends Entity<Long>
点实体。 点的id是唯一的。
-
-
Method Summary
-
Methods inherited from interface com.graphdbapi.values.api.PropertyEntity
getAllProperties, getProperties, getProperty, getProperty, getPropertyKeys, hasProperty, removeProperty, setProperty
-
-
-
-
Method Detail
-
delete
void delete()
删除此点
-
getRelationships
Iterable<Relationship> getRelationships()
返回此点上的所有边的迭代器- Returns:
- 边的迭代器
-
hasRelationship
boolean hasRelationship()
查看此点是否存在边- Returns:
- true (有边) or false(无边)
-
getRelationships
Iterable<Relationship> getRelationships(RelationshipType... types)
返回此点指定某些类型的边的迭代器- Parameters:
types
- 边的某些类型- Returns:
- 符合条件的边迭代器
-
getRelationships
Iterable<Relationship> getRelationships(Direction direction, RelationshipType... types)
返回此点指定某些类型指定方向的边的迭代器- Parameters:
types
- 边的某些类型direction
- 边的方向- Returns:
- 符合条件的边迭代器
-
hasRelationship
boolean hasRelationship(RelationshipType... types)
查看此点是否存在某类边- Parameters:
types
- 边的某些类型- Returns:
- true (有边) or false(无边)
-
hasRelationship
boolean hasRelationship(Direction direction, RelationshipType... types)
查看此点是否存在某类指定方向的边- Parameters:
types
- 边的某些类型direction
- 边的方向- Returns:
- true (有边) or false(无边)
-
getRelationships
Iterable<Relationship> getRelationships(Direction dir)
返回此点指定方向的边迭代器- Parameters:
dir
- 边的方向- Returns:
- 符合条件的边的迭代器
-
hasRelationship
boolean hasRelationship(Direction dir)
查看此点是否存在指定方向的边- Parameters:
dir
- 边的方向- Returns:
- true (有边) or false(无边)
-
getRelationships
Iterable<Relationship> getRelationships(RelationshipType type, Direction dir)
返回此点指定方向的某些类型的边迭代器- Parameters:
dir
- 边的方向type
- 边的某些类型- Returns:
- 符合条件的边的迭代器
-
getSingleRelationship
Relationship getSingleRelationship(RelationshipType type, Direction dir)
返回此点指定方向和边类型的一条边- Parameters:
type
- 边的类型dir
- 边的方向- Returns:
- 符合条件的唯一边
-
createRelationshipTo
Relationship createRelationshipTo(Node otherNode, RelationshipType type)
创建并返回此点与另一点的指定边类型的边- Parameters:
otherNode
- 新边的终止点type
- 新边的类型- Returns:
- 被创建的新边
-
getRelationshipTypes
Iterable<RelationshipType> getRelationshipTypes()
返回此点边类型的迭代器- Returns:
- 此点边类型的迭代器
-
getDegree
int getDegree()
返回所有与此点连接的边数量- Returns:
- 所有边的数量
-
getDegree
int getDegree(RelationshipType type)
返回指定类型此点的边数量- Parameters:
type
- 边的类型- Returns:
- 符合条件的边的数量
-
getDegree
int getDegree(Direction direction)
返回此点指定方向的边数量- Parameters:
direction
- 边方向- Returns:
- 符合条件的边的数量
-
getDegree
int getDegree(RelationshipType type, Direction direction)
返回此点指定类型指定方向的边数量- Parameters:
direction
- 边方向type
- 边的类型- Returns:
- 符合条件的边的数量
-
isType
boolean isType(NodeType type)
判断是否为指定的点类型- Parameters:
type
- 点的类型- Returns:
- true (是) or false(否)
-
getNodeType
String getNodeType()
返回此点的类型名- Returns:
- 点的类型名
-
getPkValue
String getPkValue()
返回此点的主键值- Returns:
- 点主键值
-
-