carnival-data / carnival

JVM property graph data unification framework
https://carnival-data.github.io/carnival/
GNU General Public License v3.0
7 stars 2 forks source link

vertex instanceOf #70

Closed augustearth closed 2 years ago

augustearth commented 2 years ago

Add support for declaring that a vertex is an instance of a class. Auto-create a relationship between instances and the class.

@VertexDefinition
static enum VX {
    A_CLASS,
    B_CLASS (
        superClass: VX.A_CLASS
    ),
    B (
        instanceOf: VX.B_CLASS
    )
}

When a B vertex is created, a IS_INSTANCE_OF relationship should be automatically created with the vertex representing B_CLASS.