Next: , Previous: , Up: Relational schema   [Contents][Index]


4.4 catalog.txt

The /etc/mediatex/mdtx-COLL/catalogXXX.txt files handle the descriptive meta-data of a collection.

Using the “$ mediatex upload[+] [file file [as target]]* [catalog file] [rules file] to coll coll” query, PUBLISHER (see Who) should provide related descriptive meta-data file for the new archive, using the same grammar language.

The format of this file is oriented to describe a simple movie database. It does not conform to any specific descriptive meta-data schema, like the Dublin Core (http://dublincore.org/). However, the translation from and to all meta-data formats remains possible, by adding characteristics to the objects.

Relational schema:

mediatex-figures/catalog.txt

Example:

# Categories:

Top Category "media"
  "topo" = "Welcome !"
Top Category "image": "media"
Top Category "drawing": "image"
Top Category "animal"
Category "hand": "drawing", "animal"

# Humans:

Human	 "Me" "": "drawing"
  "another thing?" = "no"

# Archives:

Archive	 022a34b2f9b893fba5774237e1aa80ea:24075
  "format" = "PNG"
Archive	 b281449c229bcc4a3556cdcc0d3ebcec:815
  "format" = "XPM"
  "licence" = "GPLv3"

# Documents:

Document "panthere": "animal", "drawing", "hand"
  With "designer" = "Me" ""
  "info" = "[P]erenial [A]rchive [N]etwork [There]"
  022a34b2f9b893fba5774237e1aa80ea:24075
  b281449c229bcc4a3556cdcc0d3ebcec:815

Grammar:

file: stanzas 
    | //empy file 

stanzas: stanzas stanza
       | stanza

stanza: defCategory
      | defHuman
      | defDocument
      | defArchive

caracs: caracs carac
      | carac

carac: string = string

defCategory: newCategory : categories caracs
           | newCategory : categories
           | newCategory caracs
           | newCategory

newCategory: TOP CATEGORY string
           | CATEGORY string

categories: categories , category
          | category

category: string

defHuman: newHuman : categories caracs
        | newHuman : categories
        | newHuman caracs
        | newHuman

newHuman: HUMAN human

human: string string

defArchive: newArchive archCaracs
         | newArchive

newArchive: ARCHIVE archive

archive: hash : number

defDocument: newDocument docCategories docWiths docCaracs docArchives 

newDocument: DOCUMENT document

document: string

docCategories: : categories
             | 

docCaracs: caracs
         | 

docWiths: roles
        | 

roles: roles role
     | role

role: WITH string = human

docArchives: archives
           | 

archives: archives archive
        | archive

hash:   [[:xdigit:]]{32}     
string: \"(\\\"|[^\n\"]){0,511}\" 
number: [[:digit:]]+

Code:

src/memory/catalogTree.h
src/memory/catalogTree.c
src/parser/catalogFile.l
src/parser/catalogFile.y

Next: , Previous: , Up: Relational schema   [Contents][Index]