Difference between revisions of "Binary Container Format"

From Developer Documents
Jump to navigation Jump to search
(Created page with "Simantics binary container format is a format for storing binary encoded data to filesystem. <pre> type DataContainer { format : String, version : Integer, content : ...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Simantics binary container format is a format for storing binary encoded data to filesystem.
 
Simantics binary container format is a format for storing binary encoded data to filesystem.
 
<pre>
 
<pre>
type DataContainer {
+
type DataContainer = {
 
     format : String,
 
     format : String,
 
     version : Integer,
 
     version : Integer,
 +
    metadata : Map(String, Variant),
 
     content : Variant
 
     content : Variant
 
}
 
}
 
</pre>
 
</pre>
  
In addition to actual content data that is stored as a Variant, it contains format name that tells how the data is used: for example "aprosModel", "aprosSymbol" and version number. Applications use format name to decide if the file can be used for the operation the user is requested and version number to choose how to handle the data.  
+
In addition to the actual content data that is stored as a Variant, a file contains a format name that tells how the data is used: for example "aprosModel", "aprosSymbol" and a version number. Applications use format name to decide if the file can be used for the operation the user has requested and version number to choose how to handle the data.  
  
Version number is increased by one every time the data type of the content or the semantics of the data (how it should be handled in the application) are changed.
+
Version number is increased by one every time the data type of the content or the semantics of the data (how it should be handled in the application) is changed.

Latest revision as of 09:45, 16 May 2012

Simantics binary container format is a format for storing binary encoded data to filesystem.

type DataContainer = {
    format : String,
    version : Integer,
    metadata : Map(String, Variant),
    content : Variant
}

In addition to the actual content data that is stored as a Variant, a file contains a format name that tells how the data is used: for example "aprosModel", "aprosSymbol" and a version number. Applications use format name to decide if the file can be used for the operation the user has requested and version number to choose how to handle the data.

Version number is increased by one every time the data type of the content or the semantics of the data (how it should be handled in the application) is changed.