-
Notifications
You must be signed in to change notification settings - Fork 8
Inheritance
Inheritance works by augmenting parents with metadata from children.
Each parent within a hierarchy contributes metadata to children, thus allowing children to customise metadata upstream, either by overriding or appending. The concept is drawn from CSS and is more commonly known as Cascading, however the usage within Open Metadata more closely resembles that of traditional inheritance which is very similar.
In a given directory there are three metadata entries.
/projects/spiderman/shot1 -> length, description-
lengthis a numerical value, an integer -
descriptionis text
Inheritance works by appending any metadata from parent directories. So:
/projects/spiderman -> directorHere, spiderman contains additional director. Thus, querying the contents of an inherited shot1 would result in:
length=1.87
description="Prelude to upcoming events"
director="Michael Bay"In a more complex scenario, there may be multiple entries within a single entry. This is nesting or hierarchical entries.
/projects/spiderman -> /apps/maya/environment/PYTHONPATH
/projects/spiderman/shot1 -> /apps/maya/args/-hideConsoleHere, shot1 augments its parent spiderman metadata with an additional args entry. Thus the metadata for spiderman is:
apps/maya/environment/PYTHONPATH="/projects/spiderman/scripts"Whereas metadata for shot1 looks like this:
apps/maya/environment/PYTHONPATH="/projects/spiderman/scripts"
apps/maya/args/-hideConsole