Module atomic_lib::populate

source ·
Expand description

Populating a Store means adding resources to it. Some of these are the core Atomic Data resources, such as the Property class. These base models are required for having a functioning store. Other populate methods help to set up an Atomic Server, by creating a basic file hierarcy and creating default collections.

Functions§

  • Creates a Drive resource at the base URL. Does not set rights. Use set_drive_rights for that.
  • Populates a store with some of the most fundamental Properties and Classes needed to bootstrap the whole. This is necessary to prevent a loop where Property X (like the shortname Property) cannot be added, because it’s Property Y (like description) has to be fetched before it can be added, which in turn has property Property X (shortname) which needs to be fetched before. https://github.com/atomicdata-dev/atomic-server/issues/60
  • Generates collections for classes, such as /agent and /collection. Requires a self_url to be set in the store.
  • Imports the Atomic Data Core items (the entire atomicdata.dev Ontology / Vocabulary)
  • Adds rights to the default agent to the Drive resource (at the base URL). Optionally give Public Read rights.