User:Alsroot/trash/Object Bundles: Difference between revisions

Line 35: Line 35:
Object bundle can be installed to Journal in two forms:
Object bundle can be installed to Journal in two forms:
* files from bundle will be unpacked and installing as separate files, bundle itself will be removed(similar to .xoj)<br>''METADATA'' should not contain ''[Composite]'' section
* files from bundle will be unpacked and installing as separate files, bundle itself will be removed(similar to .xoj)<br>''METADATA'' should not contain ''[Composite]'' section
* bundles will be installed as composite object i.e. as a directory of packaged to bundle files<br>''METADATA'' should contain ''[Composite]'' section
* bundles will be installed as a composite object i.e. as a directory of packaged to the bundle files<br>''METADATA'' should contain ''[Composite]'' section


Any field in METADATA file can have ''_file'' suffix, in that case content of this field(substring w/o ''_file'' suffix) will be fetched from file inside of the bundle.
Any field in METADATA file can have ''_file'' suffix, in that case content of this field(substring w/o ''_file'' suffix) will be fetched from file inside of the bundle.
Line 41: Line 41:
==== [Metadata] section ====
==== [Metadata] section ====


This section is mandatory. It describes Datastore metadata fields of final entry in Journal.
This section is mandatory. It describes Datastore metadata fields of final entry in Journal. If bundle is composite(section ''[Composite]'' presents) this section defines Journal entry to represent composite object, otherwise Journal entry for ''[Metadata]/file'' file.


{| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;"
{| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;"
Line 49: Line 49:
! Notes
! Notes
|-
|-
| ''journal_file''
| ''file''
| mandatory
| mandatory
| if exists, this file will be unpacked while uploading bundle to Journal and current section defines its metadata<br>otherwise defines metadata for bundle itself and bundle will be stored as is in Journal
| if bundle is composite, ''file' defines access point to composite object (e.g. index.html for library bundles); otherwise it defines file which will be installed to Journal
|-
|-
| ''mime_type''
| ''mime_type''
| mandatory
| mandatory
| define metadata for a file which will be stored in Journal(according to ''journal_file'')
| define metadata for a file which will be stored in Journal, for composite objects it defines type of ''file'' file(e.g. text/html for libraries)
|-
|-
| ''*''
| ''*''
Line 64: Line 64:


METADATA file could have several ''[Manifest]'' sections, in that case they should be parted by different suffixes e.g. ''[Manifest2]'', ''[Manifest.additional]'' etc. Multi-object bundles could be utilized in >0.86 for collections of objects or actions.
METADATA file could have several ''[Manifest]'' sections, in that case they should be parted by different suffixes e.g. ''[Manifest2]'', ''[Manifest.additional]'' etc. Multi-object bundles could be utilized in >0.86 for collections of objects or actions.
==== [Composite] section ====
If this section exists bundle will be installed as composite object i.e. all bundle files will be represented by one Journal entry(could be useful in case of libraries).
{| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;"
|-style="background:#787878; color: white;"
! Field
! Flags
! Notes
|-
|}


=== MANIFEST file ===
=== MANIFEST file ===