I have an UML diagram that describe a classification tree with a three level hierarchy of
classes: Just imagine
Ais the top level class and
B IS_A A and
C IS_A B.
Each class has it's own properties and the classes at the lower level of the hierarchy inherits the properties of the parent class.
Which is the best way to implement this using neo4j?
My preferred is to create a node with label
:A, another with label
:A:B and the last with label
But it mixes up all the properties and I cannot see only the :A subset of properties of an A:B:C node.
Another approach is to create just one A nodes, one B nodes and one C nodes and relate them with an IS_A relationship.
Then I can create a new node named 'doe` and a relationship IS_ISTANCE_OF between this and A or B or C. But I don't like.
Well, the question is more complicated.
The tree, which is more complex, represent a list of hw devices: the top level is the provider, the second level is the device, the third level is the model, the fourth level is the version.
There is another tree: User and roles: a user can have multiple roles.
But Imagine I have three kind of roles: owner, employee, administrator
I want to associate to each type of fourth level devices a set of permission for each abstract role.
Then I want to connect a User with each of the possible roles he can cover.
Finally, I want to know what are the permissions of the user JohnDoe with a specific role, on a specific level4 device.
I hope to have explained the goal.
You are correct; there is a low to unpack there.
Well, I'm working on it, but I have more substantial troubles, where the manual suggest a syntax but it returns an error. I'll post it. Stay well and recover!
And, if you want to give a look at this