@@ -21,7 +21,7 @@ Provides support for encoding and decoding of external models.
2121An external model is defined as:
2222
2323@li a third-party format that is not owned or controlled by
24- Dogen, such as Dia;
24+ Dogen, such as Dia or org-mode.
2525@li a Dogen format designed for interoperability (JSON).
2626
2727External models are converted into an intermediate format called
@@ -32,28 +32,18 @@ technical space.
3232
3333A @e codec must be created for each external model that is to be
3434injected, providing a transformation between the native formats
35- and the codec model. The codecs are created in their own models,
36- following the naming convention codec.X for a given codec X.
37- They then register against the codec registrar. Note that for a
38- given file extension, there can only be one and only one codec to
39- manage it.
35+ and the codec model. The codecs are created as transforms in the
36+ present model, and should reuse common infrastructure where possible.
37+ There should also be a "native" model representing the original
38+ codec format as much as possible (e.g. "dogen.dia"). The idea for
39+ those models is just to provide a faithful representation of the
40+ native codec domain model (though it may not necessarily be
41+ complete).
4042
41- * transforms
42- ** encoding_transform
43- :PROPERTIES:
44- :masd.codec.stereotypes: dogen::handcrafted::typeable::header_only
45- :END:
46- ** registrar
47- :PROPERTIES:
48- :masd.codec.stereotypes: dogen::handcrafted::typeable
49- :END:
50- ** registrar_error
51- :PROPERTIES:
52- :masd.codec.stereotypes: masd::exception
53- :END:
54-
55- A registration error has occurred.
43+ In general, codecs use file extensions to determine the type of the
44+ codec.
5645
46+ * transforms
5747** model_production_chain
5848:PROPERTIES:
5949:masd.codec.stereotypes: dogen::handcrafted::typeable
@@ -94,10 +84,6 @@ Raw set of variability overrides.
9484:PROPERTIES:
9585:masd.codec.stereotypes: masd::exception
9686:END:
97- ** decoding_transform
98- :PROPERTIES:
99- :masd.codec.stereotypes: dogen::handcrafted::typeable::header_only
100- :END:
10187** model_set_production_chain
10288:PROPERTIES:
10389:masd.codec.stereotypes: dogen::handcrafted::typeable
@@ -126,7 +112,52 @@ Raw set of variability overrides.
126112:PROPERTIES:
127113:masd.codec.stereotypes: dogen::handcrafted::typeable
128114:END:
115+ ** file_to_artefact_transform
116+ :PROPERTIES:
117+ :masd.codec.stereotypes: dogen::handcrafted::typeable
118+ :END:
119+ ** json_artefact_to_model_transform
120+ :PROPERTIES:
121+ :masd.codec.stereotypes: dogen::handcrafted::typeable
122+ :END:
123+ ** model_to_json_artefact_transform
124+ :PROPERTIES:
125+ :masd.codec.stereotypes: dogen::handcrafted::typeable
126+ :END:
127+ ** dia_artefact_to_model_transform
128+ :PROPERTIES:
129+ :masd.codec.stereotypes: dogen::handcrafted::typeable
130+ :END:
131+ ** org_artefact_to_model_transform
132+ :PROPERTIES:
133+ :masd.codec.stereotypes: dogen::handcrafted::typeable
134+ :END:
135+ ** model_to_org_artefact_transform
136+ :PROPERTIES:
137+ :masd.codec.stereotypes: dogen::handcrafted::typeable
138+ :END:
139+ ** artefact_to_file_transform
140+ :PROPERTIES:
141+ :masd.codec.stereotypes: dogen::handcrafted::typeable
142+ :END:
143+ ** artefact_to_model_chain
144+ :PROPERTIES:
145+ :masd.codec.stereotypes: dogen::handcrafted::typeable
146+ :END:
147+ ** model_to_artefact_chain
148+ :PROPERTIES:
149+ :masd.codec.stereotypes: dogen::handcrafted::typeable
150+ :END:
129151* entities
152+ :PROPERTIES:
153+ :masd.codec.dia.comment: true
154+ :END:
155+
156+ Object model that is codec-agnostic but aims to provide
157+ a representation of the core entities needed by all codecs.
158+
159+ Not all codecs will make use of all entities.
160+
130161** model
131162:PROPERTIES:
132163:masd.codec.stereotypes: Element
@@ -252,13 +283,6 @@ Ability to contain tagged values.
252283:PROPERTIES:
253284:masd.codec.type: std::list<identification::entities::tagged_value>
254285:END:
255- *** tagged_values_overrides
256- :PROPERTIES:
257- :masd.codec.type: std::list<identification::entities::tagged_value>
258- :END:
259-
260- Meta-data sourced externally that can be used to override meta-data in model.
261-
262286** Stereotypable
263287:PROPERTIES:
264288:masd.codec.stereotypes: masd::object_template
@@ -329,9 +353,37 @@ Properties related to the origin of the modeling element.
329353
330354Provenance details of this codec element.
331355
356+ ** TaggableOverridable
357+ :PROPERTIES:
358+ :masd.codec.stereotypes: masd::object_template
359+ :END:
360+
361+ Ability to contain tagged values.
362+
363+ *** tagged_values_overrides
364+ :PROPERTIES:
365+ :masd.codec.type: std::list<identification::entities::tagged_value>
366+ :END:
367+
368+ Meta-data sourced externally that can be used to override meta-data in model.
369+
370+ ** Commentable
371+ :PROPERTIES:
372+ :masd.codec.stereotypes: masd::object_template
373+ :END:
374+
375+ Has the ability to have an associated comment.
376+
377+ *** comment
378+ :PROPERTIES:
379+ :masd.codec.type: comment
380+ :END:
381+
382+ Properties associated with the codec comment.
383+
332384** Element
333385:PROPERTIES:
334- :masd.codec.parent: entities::Taggable, entities::Stereotypable, entities::Documentable, entities::Nameable, entities::Configurable, entities::DeterminableOrigin
386+ :masd.codec.parent: entities::Taggable, entities::Stereotypable, entities::Documentable, entities::Nameable, entities::Configurable, entities::DeterminableOrigin, entities::TaggableOverridable, entities::Commentable
335387:masd.codec.stereotypes: masd::object_template
336388:END:
337389
@@ -355,6 +407,107 @@ graph.
355407
356408Contains the list of referenced models for a particular model name.
357409
410+ ** comment
411+ :PROPERTIES:
412+ :masd.codec.stereotypes: Documentable, Taggable
413+ :END:
414+
415+ Represents a comment block as read out from the codec representation.
416+
417+ *** applies_to_container
418+ :PROPERTIES:
419+ :masd.codec.type: bool
420+ :END:
421+
422+ Content of the field as it belonged to the containing object.
423+
424+ *** original_content
425+ :PROPERTIES:
426+ :masd.codec.type: std::string
427+ :END:
428+
429+ Content, as read from the codec representation.
430+
431+ ** object
432+ :PROPERTIES:
433+ :masd.codec.stereotypes: Commentable
434+ :END:
435+
436+ Represents an "raw" codec object which may or may not contain a modeling element of interest.
437+
438+ *** id
439+ :PROPERTIES:
440+ :masd.codec.type: std::string
441+ :END:
442+
443+ Original ID available in the codec representation, if any.
444+
445+ *** name
446+ :PROPERTIES:
447+ :masd.codec.type: std::string
448+ :END:
449+
450+ Original name in codec representation. May be qualified or simple; its nature is codec dependent.
451+
452+ *** object_type
453+ :PROPERTIES:
454+ :masd.codec.type: std::string
455+ :END:
456+
457+ Native codec representation for the object type. Its interpretation is codec dependent.
458+
459+ *** stereotypes
460+ :PROPERTIES:
461+ :masd.codec.type: std::string
462+ :END:
463+
464+ Original steoreotypes assigned to the object, if any.
465+
466+ *** container_id
467+ :PROPERTIES:
468+ :masd.codec.type: std::string
469+ :END:
470+
471+ Codec ID of the container of this object, if any.
472+
473+ *** connection
474+ :PROPERTIES:
475+ :masd.codec.type: boost::optional<std::pair<std::string,std::string>>
476+ :END:
477+
478+ Connections this object may have with other objects, if any.
479+
480+ *** attributes
481+ :PROPERTIES:
482+ :masd.codec.type: std::list<attribute>
483+ :END:
484+
485+ All attributes associated with this object.
486+
487+ ** artefact
488+ *** path
489+ :PROPERTIES:
490+ :masd.codec.type: boost::filesystem::path
491+ :END:
492+
493+ Path to the file representing this artefact, if any.
494+
495+ *** codec_name
496+ :PROPERTIES:
497+ :masd.codec.type: std::string
498+ :END:
499+
500+ Name of the codec to process this artefact.
501+
502+ *** content
503+ :PROPERTIES:
504+ :masd.codec.type: std::string
505+ :END:
506+
507+ #+begin_src mustache
508+ Contents of the artefact.
509+
510+ #+end_src
358511* helpers
359512** references_resolver
360513:PROPERTIES:
0 commit comments