I'm evaluating some potential implementations of a complex object hierarchy model for my current project. I'm wondering if there is an xpath-style meta-language or something like this that would allow me to query these object linkages.
Furthermore, I'm sure there is some very specific jargon used for the problem I am asking about - I just don't know it.
The requirements:
- Must be done in Java (or at least compiled to Java bytecode).
- Objects will be hierarchically related to each other with n possible links. obj1->obj2->obj3->...
- We need to be able to look up any object in the hierarchy based on an objects properties or its relationship to other objects.
- Objects will be of the same type.
- Hierarchical lookups should be able to happen at runtime.
I think I could roll my own solution here, but I'm curious if someone smarter than me has already come up with something.
After seeing some answers come in, I think I might need to clarify my question a bit more. Specifically, this tool would be used to traverse a set of Objects that are different versions of a parent object.
For example:
[Object 1 prop1="foo" prop2="bar" prop3="zoop"]
↓ Inherits from above object ↓
[Object 2 prop1="foo and something" prop2="bar" prop3="zoop"]
↓ Inherits from above object ↓
[Object 3 prop1="foo and something" prop2="bar" prop3="zoop 24"]