1.JanusGraph Schema Element
JanusGraphSchemaElement继承自接口Namifiable(此接口的作用是说继承自该接口的元素都能通过名字唯一区分)。在JanusGraphSchemaElement的接口定义时,作者给出了这个接口的作用,那就是为JanusGraph Schema中的Element做标记,以区分这个Element是一个顶点、边、属性还是一个index。另外一个功能就是说可以通过Schema element的name来唯一识别。
所以Janus的Schema Element可以分为JanusGraphSchemaType和Index。
1.1 Janusgraph Schema Type
这个Schema Type又分为RelationType和VertexLabel,因为在Janus中EdgeLabel和PropertyKey都是作为Relation存在。所以RelationType又分为EdgeLabel和PropertyKey。以上我在JanusGraphElement中有详细说明。
1.2 Index
Index的作用大家都明白,在Janus中存在两种index,一种是JanusGraphIndex,另一种是RelationTypeIndex。
1.2.1 Janusgraph Index
这个Index的作用就是为了能够通过图中的Properties快速的检索图中的elements。有两种类型,一种是复合索引(composite index),另一种是混合索引(mixed index)。
1.2.2 RelationType Index
这个Index构建在RelationType上,作用是加速以顶点为中心的索引(vertex-centric index),这个Index目前了解比较少,以后再说。