diff --git a/com.io7m.laurel.documentation/pom.xml b/com.io7m.laurel.documentation/pom.xml
index c506887..4d0cd03 100644
--- a/com.io7m.laurel.documentation/pom.xml
+++ b/com.io7m.laurel.documentation/pom.xml
@@ -134,6 +134,36 @@
+
+ unpack-sources-schema
+ package
+
+ unpack-dependencies
+
+
+ **/database.sql
+ ${project.groupId}
+ sources
+ false
+ ${project.build.directory}/documentation/
+
+
+
+
+ unpack-sources-schema-epub
+ package
+
+ unpack-dependencies
+
+
+ **/database.sql
+ ${project.groupId}
+ sources
+ false
+ ${project.build.directory}/epub/
+
+
+
make-classpathpackage
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml
index eabe5a1..89746ee 100644
--- a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml
+++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml
@@ -11,7 +11,7 @@
-
+
Captions must conform to the following format:
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml
index def21c0..1fdf863 100644
--- a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml
+++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml
@@ -253,4 +253,15 @@
+
+
+ Categories must conform to the following format:
+
+
+
+
+
+
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml
index d90b37f..96c1af6 100644
--- a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml
+++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml
@@ -2,8 +2,71 @@
-
- File model...
-
+
+
+
+ The applications stores the dataset in a structure known as the file model.
+
+
+
+
+
+
+ The file model's underlying representation is an
+ SQLite database. The database contains
+ all of the
+ images,
+ captions,
+ categories,
+ metadata,
+ and the
+ undo history.
+
+
+
+
+ The database uses the following schema:
+
+
+
+
+
+ The schema_version table's single row MUST
+ contain com.io7m.laurel in the
+ version_application_id column.
+
+
+ Limitations in SQLite mean that it is, unfortunately, impractical to enforce invariants such as
+ category and
+ caption formats at the database level.
+
+
+
+
+
+
+ When an undoable command is successfully executed on the file model, the
+ parameters of the original command, and the data that was modified, is stored in the
+ undo table. When a command is undone, that same
+ data is moved to the redo table.
+
+
+ The data and parameters are serialized to
+
+ Java Properties
+
+ format, but the precise names and types of the keys is currently unspecified. This means that, although
+ applications other than Laurel can open and manipulate datasets, they will currently
+ need to do some mild reverse engineering to manipulate the history.
+
+
+
+
+ Tables are required to be STRICT.
+ Flexible typing is a bug and not a feature, regardless of how many times the SQLite documentation extols the
+ virtues of being able to accidentally insert malformed data into database tables.
+
+
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml
index 7a882b1..4073ff3 100644
--- a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml
+++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml
@@ -3,7 +3,23 @@
-
- History...
-
+
+
+
+ The application stores the complete, persistent history of every change ever made to the dataset.
+
+
+
+
+
+ The undo and redo stacks are stored in the file model.
+
+
+ Each command that is executed on the file model is invertible. That is, each command
+ knows how to perform an action, and how to revert that action. By storing the complete sequence of executed
+ commands, it is effectively possible to take a dataset and repeatedly undo operations until the dataset is back at
+ the blank starting state.
+
+
+
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-metadata.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-metadata.xml
new file mode 100644
index 0000000..7486402
--- /dev/null
+++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-metadata.xml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+ Metadata in the application is a simple string key/value store. Keys are unique.
+
+
+
+
+
+ It is recommended that creators annotate datasets with the standard
+
+ Dublin Core
+
+ metadata terms, summarized in the following table:
+
+
+
+
+ Name
+ Description
+
+
+
+ dc:title
+
+
+ The dataset title.
+
+
+
+
+ dc:creator
+
+
+ The dataset creator.
+
+
+
+
+ dc:subject
+
+
+ The dataset subject.
+
+
+
+
+ dc:description
+
+
+ A human-readable description of the dataset.
+
+
+
+
+ dc:publisher
+
+
+ A organization publishing the dataset.
+
+
+
+
+ dc:contributor
+
+
+ The contributors to the dataset.
+
+
+
+
+ dc:date
+
+
+ The dataset publication or creation date.
+
+
+
+
+ dc:type
+
+
+ The type (recommended: "dataset").
+
+
+
+
+ dc:format
+
+
+ The format (recommended: "com.io7m.laurel").
+
+
+
+
+ dc:identifier
+
+
+ The dataset identifier.
+
+
+
+
+ dc:source
+
+
+ The dataset source URI.
+
+
+
+
+ dc:language
+
+
+ The dataset language.
+
+
+
+
+ dc:rights
+
+
+ The dataset rights/license.
+
+
+