Hardocs / desktop-app

Hardocs desktop app presenting current docs editing functionalities.
GNU General Public License v2.0
3 stars 2 forks source link

Data management and persistence of metadata and schemas #108

Open jurra opened 3 years ago

jurra commented 3 years ago

Design considerations expressed in yaml for better reading

global means stored centrally in the application for now in json local means stored in the project itself

  1. Global storage of metadata schemas so that users can select standards from the stored list
  2. Local storage of records related to a metadata standard
  3. Local storage of metadata standards related to the records
  4. Set or configure default standard (datacite)
  5. Add new records with different standards

# DATA MODELS

# This is the data structure of metadata records
# When the user selects a schema, the schema will be stored centrally(globally in hardocs) 
# and locally in the project
# A hardocs project can have a reference to different metadata schemas
$schemas:  # Collection of schemas stored globally
  - schema1:
  - schema2:
  ...

schema:
  # id: 
  name:     # For now this is going to be provided by the user
  url:      # provider by the user
  version:  # provided by the user
  doi:      # ??? # provided manually

  $path:     # Automatically generated
  $fileName: # Generated automatically

record:
  $schema:    # Generated automatically
  $path:      # Generated automatically
  $fileName:  # Will be generated automatically

doc:
  # id
  $title:
  $fileName:
  $path:

# STATE MANAGEMENT 
store:
  docs:
    doc1:
      type: record
      schema:
        # id: 
        name:     # For now this is going to be provided by the user
        url:      # provider by the user
        version:  # provided by the user
        doi:      # ??? # provided manually

    doc2:
      type: doc
      doc:
        # id
        $title:
        $fileName:
        $path:

    doc3:
      type: record
       ...
    doc4:
      type: doc
       ...
    doc5:
      type: doc
       ...

# PHYSICAL STORAGE OF THE PROJECT
hardocs-fs-structure:
  .hardocs: # Stores configuration of the project and structure

  docs: # Stores unstructured documents html now later, also markdown, or wikis, etc, etc....
    - html: # Here we store things in html
    - markdown: # Here we store things in markdown
  records:  # metadata records
    - dublinCore:
      - schema1:
      # Ignore subschemas for now.....
      - sub-schema1:
      - sub-schema2:
      - record1:
      - record2: 
    - dataCite:
      - schema1:
      - schema2:
      - record1:
      - record2: