Yesterday, I added subtyping to Enhanced API. Suppose an application has UserGroups, Users and Roles, where both UserGroups and Users are Vertices and Roles are BinaryEdges. There can be different predefined Roles, such as ADMINISTRATOR, EDITOR, MEMBER, GUEST.
With subtyping it is possible to say that each of the types ADMINISTRATOR, EDITOR, MEMBER, GUEST is a subtype of ROLE. We can now call the method user.getAllBinaryEdges(ROLE, Direction.OUTGOING), and all roles of that user will be returned. It is also possible to ask if a user has any role by calling user.hasAnyBinaryEdge(ROLE, Direction.OUTGOING). The same applies for Properties. Suppose a user has the properties: UserName, FullName, NickName. With subtyping it is possible to say that each of the types UserName, FullName, NickName is a subtype of Name. We can now call the method user.getAllProperties(Name) and all names of that user will be returned. It is also possible to ask if a user has any name by calling user.hasAnyProperty(Name). Niels _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

