public interface GraphSchema
Modifier and Type | Method and Description |
---|---|
void |
createCombinedEdgeType(String type,
String fromType,
String toType)
为指定边类型创建从from到to的CombinedEdgeType集合。
|
void |
createEdgeType(String type,
List<CombinedEdgeType> combinedEdgeTypes,
boolean direct,
boolean allowRepeat,
String combineKey,
Map<String,PropertyType> classMap)
添加边类型。为图中新增一个边类型,并创建从from到to的CombinedEdgeType集合。
|
default void |
createEdgeType(String type,
List<CombinedEdgeType> combinedEdgeTypes,
boolean direct,
String combineKey,
Map<String,PropertyType> classMap)
添加边类型。为图中新增一个基于 combineKey 进行去重的边类型,为空表示基于边类型进行去重,并创建从from到to的CombinedEdgeType。
|
default void |
createEdgeType(String type,
String fromType,
String toType,
boolean direct,
boolean allowRepeat,
String combineKey,
Map<String,PropertyType> classMap)
添加边类型。为图中新增一个边类型,并创建从from到to的CombinedEdgeType。
|
default void |
createEdgeType(String type,
String fromType,
String toType,
boolean direct,
String combineKey,
Map<String,PropertyType> classMap)
添加边类型。为图中新增一个基于 combineKey 进行去重的边类型,为空表示基于边类型进行去重,并创建从from到to的CombinedEdgeType。
|
void |
createProperty(String type,
boolean isVertex,
String propertyName,
boolean isIndex,
PropertyType propertyType)
为某个类型增加属性列。
|
void |
createPropIndex(String type,
boolean isVertex,
String property)
为某个类型的某个属性添加简单索引。
|
void |
createVertexType(String type,
String pkName,
Map<String,PropertyType> classMap)
添加点类型。为图新增一个点类型。
|
void |
dropCombinedEdgeType(String type,
String fromType,
String toType)
删除边类型中的一对起止点类型。
|
void |
dropEdgeType(String type)
删除边类型。删除图中已存在的一个边类型。
|
void |
dropProperty(String type,
boolean isVertex,
String propertyName)
删除某个类型的某个属性。
|
void |
dropPropIndex(String type,
boolean isVertex,
String property)
删除某个类型的某个属性索引。
|
void |
dropVertexType(String type)
删除点类型。删除图中已存在的一个点类型。
|
void |
editDirect(String type,
boolean direct)
更新某个边类型的方向。无向or有向。
|
void |
editGraphDesc(String desc)
修改图描述
|
void |
editPropertyDesc(String type,
boolean isVertex,
String propName,
String desc)
修改属性描述
|
void |
editTypeDesc(String type,
boolean isVertex,
String desc)
修改类型描述
|
List<CombinedEdgeType> |
getCombinedEdgeType(String type)
根据边类型获取起始点和终止点类型名。
|
boolean |
getEdgeDirect(String type)
获取某个边类型的方向。
|
Collection<String> |
getEdgeTypes()
获取所有的边类型名。
|
String |
getGraphDesc()
获取图描述
|
String |
getPropertyDesc(String type,
boolean isVertex,
String propName)
获取属性描述
|
Map<String,PropertyType> |
getPropertyKeys(String type,
boolean isVertex)
获取某个点/边类型下的属性名和属性类型。
|
String |
getPropertyPk(String type)
获取某个点类型下的外部唯一标识。
|
String |
getTypeDesc(String type,
boolean isVertex)
获取类型描述
|
Collection<String> |
getVertexTypes()
获取所有的点类型名。
|
void |
renamePropertyName(String type,
boolean isVertex,
String oldPropName,
String newPropName)
更新某个类型的某个属性名。
|
void |
renameTypeName(String type,
boolean isVertex,
String newType)
更新某个类型名。
|
void createCombinedEdgeType(String type, String fromType, String toType)
type
- 边类型,不能为空。fromType
- 起始点类型名,不能为空。toType
- 终止点类型名,不能为空。ParamException
- 参数格式不正确,当边类型名为空、起始点类型名为空、终止点类型名为空时将抛出异常。EdgeNotFoundException
- 边在图中不存在时将抛出异常。TypeNotFoundException
- 起始点类型或终止点类型在图中不存在时将抛出异常。TypeErrorException
- from到to的映射已存在时将抛出异常。DatabaseException
- 数据库内部异常。void createEdgeType(String type, List<CombinedEdgeType> combinedEdgeTypes, boolean direct, boolean allowRepeat, String combineKey, Map<String,PropertyType> classMap)
type
- 边类型,不能为空。combinedEdgeTypes
- 起始点类型和终止点类型组合集合,不能为空。direct
- 边的方向allowRepeat
- 是否允许边重复。true允许重复,即不开启边去重。false不允许重复,即开启边去重。边去重会影响导入性能,慎重开启。 。combineKey
- 基于属性进行重复,为空表示基于边类型进行重复,只有在 allowRepeat 为 false 时有效。
当allowRepeat 为 true 时,填nullclassMap
- 属性类型的映射,其中key是属性名,value是属性类型,属性类型不能为空。ParamException
- 参数格式不正确,当边类型名为空、起始点类型名为空、终止点类型名为空、属性类型为空、
allowRepeat为true时combineKey不为null或combineKey在classMap中不存在时将抛出异常。TypeFoundException
- 边类型在图中已存在时将抛出异常。TypeNotFoundException
- 起始点类型或终止点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。default void createEdgeType(String type, List<CombinedEdgeType> combinedEdgeTypes, boolean direct, String combineKey, Map<String,PropertyType> classMap)
type
- 边类型,不能为空。combinedEdgeTypes
- 起始点类型和终止点类型组合集合,不能为空。direct
- 边的方向combineKey
- 基于属性进行去重,为空表示基于边类型进行去重。classMap
- 属性类型的映射,其中key是属性名,value是属性类型,属性类型不能为空。ParamException
- 参数格式不正确,当边类型名为空、起始点类型名为空、终止点类型名为空、属性类型为空、
combineKey在classMap中不存在时将抛出异常。TypeFoundException
- 边类型在图中已存在时将抛出异常。TypeNotFoundException
- 起始点类型或终止点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。default void createEdgeType(String type, String fromType, String toType, boolean direct, boolean allowRepeat, String combineKey, Map<String,PropertyType> classMap)
type
- 边类型,不能为空。fromType
- 起始点类型名,不能为空。toType
- 终止点类型名,不能为空。direct
- 边的方向allowRepeat
- 是否允许边重复。true允许重复,即不开启边去重。false不允许重复,即开启边去重。边去重会影响导入性能,慎重开启。combineKey
- 基于属性进行去重,为空表示基于边类型进行去重,只有在 allowRepeat 为 false 时有效。
当allowRepeat 为 true 时,填nullclassMap
- 属性类型的映射,其中key是属性名,value是属性类型,属性类型不能为空。ParamException
- 参数格式不正确,当边类型名为空、起始点类型名为空、终止点类型名为空或属性类型为空时将抛出异常,
combineKey在classMap中不存在时将抛出异常。TypeFoundException
- 边类型在图中已存在时将抛出异常。TypeNotFoundException
- 起始点类型或终止点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。default void createEdgeType(String type, String fromType, String toType, boolean direct, String combineKey, Map<String,PropertyType> classMap)
type
- 边类型,不能为空。fromType
- 起始点类型名,不能为空。toType
- 终止点类型名,不能为空。direct
- 边的方向combineKey
- 基于属性进行去重,为空表示基于边类型进行去重。classMap
- 属性类型的映射,其中key是属性名,value是属性类型,属性类型不能为空。ParamException
- 参数格式不正确,当边类型名为空、起始点类型名为空、终止点类型名为空、属性类型为空、
combineKey在classMap中不存在时将抛出异常。TypeFoundException
- 边类型在图中已存在时将抛出异常。TypeNotFoundException
- 起始点类型或终止点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void createProperty(String type, boolean isVertex, String propertyName, boolean isIndex, PropertyType propertyType)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填false,isVertex需要跟type对应。propertyName
- 属性名,不能为空。isIndex
- 是否要加索引。true添加索引,false不添加索引propertyType
- PropertyType
属性类型,不能为空。ParamException
- 参数格式不正确,当类型为空、属性名为空、属性类型为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。PropertyFoundException
- 属性名在对应类型中已存在时将抛出异常。DatabaseException
- 数据库内部异常。void createPropIndex(String type, boolean isVertex, String property)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填falseproperty
- 属性名,不能为空。ParamException
- 参数格式不正确,当类型为空、属性名为空TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。PropertyNotFoundException
- 属性名在对应类型中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void createVertexType(String type, String pkName, Map<String,PropertyType> classMap)
type
- 点类型,不能为空。pkName
- 外部唯一标识属性名,不能为空。classMap
- 属性类型的映射,其中key是属性名,value是属性类型,允许为空。ParamException
- 参数格式不正确,当类型为空、外部唯一标识属性名为空、属性名为空时将抛出异常。TypeFoundException
- 边类型在图中已存在时将抛出异常。DatabaseException
- 数据库内部异常。void dropCombinedEdgeType(String type, String fromType, String toType)
例:存在以下关系 人--关注-->公司 人--关注-->人 若:type为关注,fromType为人,toType为公司 则:人--关注-->公司(人到公司的关注关系被删除)
type
- 边类型,不能为空。fromType
- 起始点类型,不能为空。toType
- 终止点类型,不能为空。ParamException
- 参数格式不正确,当边类型为空、起始点类型为空或终止点类型为空时将抛出异常。TypeNotFoundException
- 边类型在图中不存在时将抛出异常。TypeErrorException
- from到to的映射不存在时将抛出异常。DatabaseException
- 数据库内部异常。void dropEdgeType(String type)
type
- 边类型,不能为空。ParamException
- 参数格式不正确,当边类型为空时将抛出异常。TypeNotFoundException
- 边类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void dropProperty(String type, boolean isVertex, String propertyName)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填false,isVertex需要跟type对应。propertyName
- 属性名,不能为空。ParamException
- 参数格式不正确,当类型为空、属性名为空、属性类型为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。PropertyNotFoundException
- 属性名在对应类型中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void dropPropIndex(String type, boolean isVertex, String property)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填false,isVertex需要跟type对应。property
- 属性名ParamException
- 参数格式不正确,当类型为空、属性名为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。PropertyNotFoundException
- 属性名在对应类型中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void dropVertexType(String type)
type
- 点类型,不能为空。ParamException
- 参数格式不正确,当类型为空时将抛出异常。TypeNotFoundException
- 点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void editDirect(String type, boolean direct)
type
- 边类型,不能为空。direct
- 方向ParamException
- 参数格式不正确,当边类型为空时将抛出异常。TypeNotFoundException
- 边类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。void editGraphDesc(String desc)
desc
- 描述信息void editPropertyDesc(String type, boolean isVertex, String propName, String desc)
type
- 点边类型isVertex
- 是否为点propName
- 属性名desc
- 描述信息void editTypeDesc(String type, boolean isVertex, String desc)
type
- 点边类型isVertex
- 是否为点desc
- 描述信息List<CombinedEdgeType> getCombinedEdgeType(String type)
type
- 边类型,不能为空。ParamException
- 参数格式不正确,当边类型为空时将抛出异常。EdgeNotFoundException
- 边在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。boolean getEdgeDirect(String type)
type
- 边类型,不能为空。ParamException
- 参数格式不正确,当类型为空时将抛出异常。TypeNotFoundException
- 边类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。Collection<String> getEdgeTypes()
DatabaseException
- 数据库内部异常。String getPropertyDesc(String type, boolean isVertex, String propName)
type
- 点边类型isVertex
- 是否为点propName
- 属性名String
属性描述Map<String,PropertyType> getPropertyKeys(String type, boolean isVertex)
type
- 点/边类型,不能为空。isVertex
- 点类型为true,边类型为false,isVertex需要跟type对应。ParamException
- 参数格式不正确,当类型为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。String getPropertyPk(String type)
type
- 点类型,不能为空。String
点类型下的外部唯一标识ParamException
- 参数格式不正确,当类型为空时将抛出异常。TypeNotFoundException
- 点类型在图中不存在时将抛出异常。DatabaseException
- 数据库内部异常。String getTypeDesc(String type, boolean isVertex)
type
- 点边类型isVertex
- 是否为点String
属性描述Collection<String> getVertexTypes()
DatabaseException
- 数据库内部异常。void renamePropertyName(String type, boolean isVertex, String oldPropName, String newPropName)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填false,isVertex需要跟type对应。oldPropName
- 原属性名,不能为空。newPropName
- 新属性名,不能为空。ParamException
- 参数格式不正确,当点/边类型为空、原属性名为空、新属性名为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。PropertyNotFoundException
- 原属性名在对应类型中不存在时将抛出异常。PropertyFoundException
- 新属性名在对应类型中已存在时将抛出异常。DatabaseException
- 数据库内部异常。void renameTypeName(String type, boolean isVertex, String newType)
type
- 点/边类型,不能为空。isVertex
- 点类型填true,边类型填false,isVertex需要跟type对应。newType
- 新类型名,不能为空。ParamException
- 参数格式不正确,当类型为空、新类型名为空时将抛出异常。TypeNotFoundException
- 点/边类型在图中不存在时将抛出异常。TypeFoundException
- 新类型名在图中已存在时将抛出异常。DatabaseException
- 数据库内部异常。Copyright © 2024. All rights reserved.