IAR Format 0.3
From OpenSimulator
(→Item XML format) |
m (Robot: Replacing 'OpenSim' to 'OpenSimulator', which is the precise name) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
== Changes == | == Changes == | ||
− | This format is currently in the development version of | + | This format is currently in the development version of OpenSimulator only. Please do not rely on it as the details are subject to change without notice. |
− | The only change from 0.2 is that a 0.3 IAR contains an <assets_included> element in (archive.xml). | + | The only change from 0.2 is that a 0.3 IAR contains an <assets_included> element in (archive.xml). See below. |
== Detail == | == Detail == | ||
− | An inventory archive is a gzipped tar file (tar.gz) with the extension .iar. | + | An inventory archive is a gzipped tar file (tar.gz) with the extension .iar. This can be extracted and created with standard tools ([http://www.7-zip.org/ 7-zip] on Windows). The structure of the archive is as follows |
archive.xml | archive.xml | ||
Line 15: | Line 15: | ||
=== archive.xml === | === archive.xml === | ||
− | This is the archive control file. | + | This is the archive control file. It contains a major and minor version number, to allow compatibility with future format changes. |
− | It also contains an <assets_included> element which can have the contents True or False. | + | It also contains an <assets_included> element which can have the contents True or False. If the string is True, then the archive was saved with assets included. If the switch is False, then the archive was saved with the --noassets option. |
=== assets/ === | === assets/ === | ||
− | This directory contains all the assets in the archive. | + | This directory contains all the assets in the archive. Each filename has the following format |
<uuid>_<asset type>.<asset extension> | <uuid>_<asset type>.<asset extension> | ||
− | The ''uuid'' section must always be present and form a valid uuid - it is used directly as the uuid for that asset. | + | The ''uuid'' section must always be present and form a valid uuid - it is used directly as the uuid for that asset. The ''asset type'' and ''asset extension'' are used to identify the type of asset and the ''asset extension'' allows the asset to be associated with different editors on platforms such as Windows. For instance, a script will always have the asset type and extension script.lsl. A full list of asset types and extensions can be found in the file |
OpenSim/Framework/Serialization/ArchiveConstants.cs | OpenSim/Framework/Serialization/ArchiveConstants.cs | ||
− | in the | + | in the OpenSimulator distribution. |
=== inventory/ === | === inventory/ === | ||
Line 43: | Line 43: | ||
folder A__52bfa79f-d7fd-4140-9a54-e33c0e235b87 | folder A__52bfa79f-d7fd-4140-9a54-e33c0e235b87 | ||
− | This is to allow the archiving of folders with identical names. | + | This is to allow the archiving of folders with identical names. The actual IDs are not important, they exist here only to distinguish identically named folders contained in the same parent folder. The IDs are not used when the archive is loaded. |
Items in inventory folders have the format | Items in inventory folders have the format | ||
Line 51: | Line 51: | ||
For example | For example | ||
− | + | OpenSimulator ball__b9608a97-6766-43fc-ad69-d9fecbc7d560.xml | |
− | Again, the IDs serve only to distinguish identically named items. | + | Again, the IDs serve only to distinguish identically named items. They are not used when the archive is loaded. |
=== Item XML format === | === Item XML format === | ||
Line 81: | Line 81: | ||
</InventoryItem> | </InventoryItem> | ||
− | ===Legacy=== | + | === Legacy === |
'''Note: This is still true for older OARs but not current ones.''' | '''Note: This is still true for older OARs but not current ones.''' | ||
− | The CreatorUUID is in [[ | + | The CreatorUUID is in [[OpenSim Profile Anchors|OpenSimulator Profile Anchor (OSPA)]] format. At the moment, this is simply |
n:=<name> | n:=<name> | ||
− | When the archive is loaded, if an existing user name matches that contained in the CreatorUUID OSPA, then the item creator will be assigned to that user. | + | When the archive is loaded, if an existing user name matches that contained in the CreatorUUID OSPA, then the item creator will be assigned to that user. If no name matches then the registered creator will revert to the user that loaded the item. |
''TODO: explain other elements, ideally accompanied by an XML Schema'' | ''TODO: explain other elements, ideally accompanied by an XML Schema'' |
Latest revision as of 22:38, 3 March 2012
Contents |
[edit] Changes
This format is currently in the development version of OpenSimulator only. Please do not rely on it as the details are subject to change without notice.
The only change from 0.2 is that a 0.3 IAR contains an <assets_included> element in (archive.xml). See below.
[edit] Detail
An inventory archive is a gzipped tar file (tar.gz) with the extension .iar. This can be extracted and created with standard tools (7-zip on Windows). The structure of the archive is as follows
archive.xml assets/ inventory/
[edit] archive.xml
This is the archive control file. It contains a major and minor version number, to allow compatibility with future format changes.
It also contains an <assets_included> element which can have the contents True or False. If the string is True, then the archive was saved with assets included. If the switch is False, then the archive was saved with the --noassets option.
[edit] assets/
This directory contains all the assets in the archive. Each filename has the following format
<uuid>_<asset type>.<asset extension>
The uuid section must always be present and form a valid uuid - it is used directly as the uuid for that asset. The asset type and asset extension are used to identify the type of asset and the asset extension allows the asset to be associated with different editors on platforms such as Windows. For instance, a script will always have the asset type and extension script.lsl. A full list of asset types and extensions can be found in the file
OpenSim/Framework/Serialization/ArchiveConstants.cs
in the OpenSimulator distribution.
[edit] inventory/
This folder contains the inventory structure for the archive.
Each folder has the format
<folder name>__<folder id>
For example
folder A__52bfa79f-d7fd-4140-9a54-e33c0e235b87
This is to allow the archiving of folders with identical names. The actual IDs are not important, they exist here only to distinguish identically named folders contained in the same parent folder. The IDs are not used when the archive is loaded.
Items in inventory folders have the format
<item name>__<item id>.xml
For example
OpenSimulator ball__b9608a97-6766-43fc-ad69-d9fecbc7d560.xml
Again, the IDs serve only to distinguish identically named items. They are not used when the archive is loaded.
[edit] Item XML format
Here's an example of the format used to save items.
<?xml version="1.0" encoding="utf-16"?> <InventoryItem> <Name>boxee</Name> <ID>1bc27214-bd75-4151-ae9c-c9ca79c1a016</ID> <InvType>6</InvType> <CreatorUUID>ospa:n=Justin Clark-Casey</CreatorUUID> <CreationDate>1253888489</CreationDate> <Owner>517d9f5d-2ef2-49ba-a47c-c1658ffe715f</Owner> <Description /> <AssetType>6</AssetType> <AssetID>a66bfff2-4190-4e08-a2df-106317d4a6dd</AssetID> <SaleType>0</SaleType> <SalePrice>0</SalePrice> <BasePermissions>581639</BasePermissions> <CurrentPermissions>581647</CurrentPermissions> <EveryOnePermissions>0</EveryOnePermissions> <NextPermissions>2147483647</NextPermissions> <Flags>0</Flags> <GroupID>00000000-0000-0000-0000-000000000000</GroupID> <GroupOwned>False</GroupOwned> </InventoryItem>
[edit] Legacy
Note: This is still true for older OARs but not current ones.
The CreatorUUID is in OpenSimulator Profile Anchor (OSPA) format. At the moment, this is simply
n:=<name>
When the archive is loaded, if an existing user name matches that contained in the CreatorUUID OSPA, then the item creator will be assigned to that user. If no name matches then the registered creator will revert to the user that loaded the item.
TODO: explain other elements, ideally accompanied by an XML Schema