01_user_documentation:06_graph:03_graphs:10_registry
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 01_user_documentation:06_graph:03_graphs:10_registry [2025/11/21 15:45] – gaetan | 01_user_documentation:06_graph:03_graphs:10_registry [2025/11/21 17:07] (current) – gaetan | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The registry graph is used by GroIMP as registry for platform elements. Each project get its own registry that is a children of the Main registry. For the project, the registry stores how different resources are linked to the way GroIMP loads them — including which Java classes are used and with which parameters. | The registry graph is used by GroIMP as registry for platform elements. Each project get its own registry that is a children of the Main registry. For the project, the registry stores how different resources are linked to the way GroIMP loads them — including which Java classes are used and with which parameters. | ||
| - | ====== Structure ====== | + | ===== Structure ===== |
| + | |||
| + | The registry use the [[: | ||
| + | |||
| + | <code java> | ||
| + | for (Item n = (Item) getBranch (); n != null; n = (Item) n.getSuccessor ()){ | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Plugin registry (TODO: refactor this section) ===== | ||
| + | |||
| + | |||
| + | The platform is structured by the registry, which has a tree structure. All elements loaded by the platform have to be defined in the platform registry. Upon startup GroIMP load the platform registry based on all the '' | ||
| + | |||
| + | Hence, new items to the platform must be added in the '' | ||
| + | The platform registry consists of a tree of items. Each item has a name and can be referenced in a file system. The path for selecting an item is similar to a unix path (//i.e.// ''/ | ||
| + | |||
| + | ==== Platform registry structure ==== | ||
| + | |||
| + | The main directories in the registry are: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | │ application/ | ||
| + | │ attributes/ | ||
| + | │ | ||
| + | └─── objects/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ cmdline/ | ||
| + | │ | ||
| + | └─── ui/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ export/ | ||
| + | │ help/ | ||
| + | │ | ||
| + | └─── io/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | └─── hooks/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ │ objects/ | ||
| + | │ └─── layouts/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ └─── workbench/ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | │ | ||
| + | </ | ||
| + | |||
| + | ==== Main repositories ==== | ||
| + | |||
| + | === Application === | ||
| + | |||
| + | On start GroIMP launch the method in the application repository. Currently '' | ||
| + | |||
| + | === Attributes === | ||
| + | The attributes repository contains the Attributes (classes derived from '' | ||
| + | GroIMP objects need to describe their attribute for them to be accessible in the GUI. (see [[: | ||
| + | |||
| + | === Objects === | ||
| + | |||
| + | All objects are inserted in this repository. | ||
| + | The objects added to a project are usually added to one of its resources sub directories (files, images, objects, datasets, ...). Resource directories where associated object factories have been registered (FileFactory, | ||
| + | |||
| + | It also where math, 2d and 3d objects are registered with their factories, so they can be created in a GroIMP project. | ||
| + | |||
| + | === UI === | ||
| + | |||
| + | This is where the ui components are registered, including Panels, ui commands, layouts. | ||
| + | |||
| + | All panels should be registered in the ''/ | ||
| + | |||
| + | === IO === | ||
| + | |||
| + | This is where the readable file types, mimetypes and streamholders are registered. | ||
| + | New data, file or mime types, should be added to this repository. (see [[: | ||
| + | |||
| + | === Hooks === | ||
| + | |||
| + | This is where the executables are registered. The startup , postboot, shutdown, and close hooks are run at the designated GroIMP event. | ||
| + | Once elements have been defined in other repositories, | ||
| + | For instance, the menu entries of the main window (the ones available from the default GroIMP window) are inserted in ''/ | ||
| + | |||
| + | ==== Registry tags ==== | ||
| + | |||
| + | Each tag is see a node in the registry tree, and children nodes inherit their parents added tags. | ||
| + | |||
| + | The complete list of predefined registry elements is found in _Platform-Core_ in the class '' | ||
| + | |||
| + | === Most used tags === | ||
| + | |||
| + | The most used tags (defined in _Root_ and added in _Platform_) are: | ||
| + | |||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | - ''< | ||
| + | |||
| + | === Add a tag === | ||
| + | |||
| + | |||
| + | By default the registry can only read tags predefined in //Root//, but it is possible to add some to a specific node in the registry tree. A node can uses all of its parents predefined tags. For instance, the registry node ''< | ||
| + | |||
| + | Tags are added as a key, value elements in a given node. Where the key is the tag name, and the value the associated java method which defined the effects of the tag. They are added in their parent node tag with the variable '' | ||
| + | |||
| + | Example: | ||
| + | |||
| + | <code xml> | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Display or hide an object in GUI === | ||
| + | |||
| + | Registry object added (prefered linked) under / | ||
| + | |||
| + | Currently there are two conditions used: <exists /> and < | ||
| + | |||
| + | - <exists name=" | ||
| + | - < | ||
| - | The registry | ||
01_user_documentation/06_graph/03_graphs/10_registry.1763736321.txt.gz · Last modified: 2025/11/21 15:45 by gaetan
