summaryrefslogtreecommitdiffstats
path: root/docs/applicationdomaintypes.md
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-30 19:41:01 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-10-30 19:41:01 +0100
commit8d59bbdebcca2293d5b3b1da903c39845f7ba1a9 (patch)
treea128226b311edf18ccd509fd8a8d6cb90abc3d1a /docs/applicationdomaintypes.md
parent0a2d20c474206553d5c981fd2a772188083101e9 (diff)
downloadsink-8d59bbdebcca2293d5b3b1da903c39845f7ba1a9.tar.gz
sink-8d59bbdebcca2293d5b3b1da903c39845f7ba1a9.zip
docs
Diffstat (limited to 'docs/applicationdomaintypes.md')
-rw-r--r--docs/applicationdomaintypes.md86
1 files changed, 86 insertions, 0 deletions
diff --git a/docs/applicationdomaintypes.md b/docs/applicationdomaintypes.md
new file mode 100644
index 0000000..b0097a6
--- /dev/null
+++ b/docs/applicationdomaintypes.md
@@ -0,0 +1,86 @@
1## Domain Types
2A set of standardized domain types is defined. This is necessary to decouple applications from resources (so a calendar can access events from all resources), and to have a "language" for queries.
3
4The definition of the domain model directly affects:
5* granularity for data retrieval (email property, or individual subject, date, ...)
6* queriable properties for filtering and sorting (sender, id, ...)
7
8The purpose of these domain types is strictly to be the interface and the types are not meant to be used by applications directly, or to be restricted by any other specifications (such as ical). By nature these types will be part of the evolving interface, and will need to be adjusted for every new property that an application accesses.
9
10### Application Domain Types
11This is a proposed set of types that we will need to evolve into what we actually require. Hierarchical types are required to be able to query for a result set of mixed types.
12
13* Entity
14 * Domain Object
15 * Incidence
16 * Event
17 * Todo
18 * Journal
19 * Freebusy
20 * Note
21 * Mail
22 * Contact
23 * Collection
24 * Akonadi Resource
25 * Mail Folder
26 * Calendar
27 * Todolist
28 * Journal
29 * Address Book
30 * Relation
31 * Tag
32 * Contact Group
33 * Thread
34
35#### Properties
36```no-highlight
37Entity: The smallest unit in the akonadi universe
38 id: unique identifier in the akonadi storage. Not persistant over db recreations and can therefore only be referenced from within the akonadi database.
39 revision: revision of the entity
40 resource: reference to AkonadiResource:id
41```
42```no-highlight
43Domain Object:
44 uid: unique identifier of the domain object.
45```
46```no-highlight
47Event:
48 summary: A string containing a short summary of the event.
49 startDate: The start date of the event.
50 startTime: The start time of the event. Optional.
51```
52
53### References/Hierachies
54Some domain objects reference others, and that is often used to build hierarchies.
55Examples are folder hierachies, tags, todo hierarchies, mail threads, contact groups, etc.
56
57These references can be built on two levels:
58* On the akonadi entity level: The referenced object *must* be available in local storage, and we're only linking to that specific instance. If the referenced entity is removed, the reference breaks. The reference always only references a single akonadi entity.
59* On the domain object level: The reference can remain also if no object currently matches the reference. The reference automatically applies to new entities containing an object with the referenced uid. More than one entity can be matched if they contain the same domain object.
60
61#### Examples
62The following hierachies exist among others:
63
64* Parent Collection
65 * Given by the source (path of the folder in IMAP)
66 * Parent folder "owns" the sub entity
67 * Link exists on the akonadi entity level: We specify where the entity lives, this MUST always be a single parent entity.
68* Subtodos
69 * Given by the todo itself
70 * Not necessarly owning (though often implemented as such, similar to threading)
71 * Link exists on domain object level.
72* Mail Threads
73 * Non owning, but a mail always only belongs to one thread.
74 * Hierarchy given by message-id references in headers and subject + date.
75 * Link exists on domain object level.
76* Contact Groups
77 * A contact can belong to many groups and the reference is non-owning.
78 * Link exists on domain object level.
79* Tags
80 * An entity can have many tags
81 * The tag references the entity, not the other way around.
82 * Link exists on domain object level.
83
84#### Example queries:
85* All mail folders of a resource
86* All threads within date-time range