expressir 2.1.15 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/docs/development.md DELETED
@@ -1,90 +0,0 @@
1
- ## Development Plan
2
-
3
- This document is a draft to understand the basic of the original library, and
4
- how the whole tool chain is working at the moment. Once, we've an understanding
5
- then let's look at the potential area of improvement, and plan out a high level
6
- plan to start the development.
7
-
8
- ### What is it, expressir?
9
-
10
- * Expressir is a ruby tool to harvest iso express data model
11
- * Express is one of the language to represent data model
12
- * Expressir tool is used to manipulate iso express data model
13
- * The input for the expressir is a standard xml document
14
- * XML Spec: http://stepmod.sourceforge.net/express_model_spec/
15
- * Expressir does the job of representing express model as ruby class
16
- * REXML-based parser that reads EXPRESS as XML and creates the dictionary (i.e.
17
- instances of the EXPRESS Ruby Classes) and then calls a mapper, that may be
18
- specified as an option at runtime
19
- * Mappers that read the EXPRESS dictionary and perform the conversion to the
20
- desired language or format
21
- * Express to UML2 Mapper - Convert the express model to UML2
22
- * Express to OWL Structure - Convert the express model to OWL Structure
23
- * Ruby API generator for express language
24
- * Current Ruby API is super slow, it takes 2 hours to generate 400 entity
25
-
26
- ### How does the original version work?
27
-
28
- At the core the `expressir.rb` is responsible for everything at moment, it takes
29
- an Express XML file as an input and then it parses that XML file and build the
30
- correct ruby interface for further processing.
31
-
32
- This `expressir.rb` also expect one mapping file `deafult to mapping.rb`, and it
33
- also expect the file to specify a custom method `map_from_express` to take the
34
- `Ruby Express Representation` and convert this ruby representation to the
35
- desire output format.
36
-
37
- The library also provides couple mapping for UM2, OWL and SysML, so anyone can
38
- export their data to any of those format if necessary, and the use cases for
39
- those library are as following:
40
-
41
- ```ruby
42
- ruby expressir.rb expxml=<schema.xml> map=<mapping_owl.rb>
43
- ```
44
-
45
- ### What are potential improvement area?
46
-
47
- * The interface is not well defined, someone needs to dig deeper to understand
48
- just the basic of the library and how to use for their use cases. This is
49
- something that could be improved as initial step.
50
- * At the moment, these are some ruby files, so potentially we could group those
51
- together as a CLI tool and group some of the common functionality, and provide
52
- a straight forward interface for users.
53
- * The good part about this library is author had the extensibility in mind from
54
- the beginning, so we should keep that functionality as flexible as possible.
55
- * There are lot of boilerplate code in the library, but it's understandable as
56
- it was written quite long time ago, so maybe most of the tool was not even
57
- available back then, so this is the another area we could improve.
58
- * Another improvement we could do in terms of actual codebase, we should be able
59
- to refactor this library and cleanup as much as possible.
60
-
61
- ### What are the initial changes?
62
-
63
- Initially, we can start by creating a ruby cli gem, group these functionality
64
- together. This could be named as `expressir`, and this gem will be shipped with an
65
- executable called `expressir`.
66
-
67
- Second of all, let's add some dedicated interface for the default type, so user
68
- does not need to know all the details but the name of the interface, for example
69
- we could expose the transformation as follows:
70
-
71
- ```sh
72
- # Convert to owl
73
- expressir express2owl file=[express_xml_file] [**options]
74
-
75
- # Convert to UML
76
- expressir express2uml file=[express_xml_file] [**options]
77
-
78
- # Convert to SysML
79
- expressir express2sysml file=[express_xml_file] [**options]
80
-
81
- # Custom conversion
82
- expressir express2custom file=[express_xml_file] mapping=[custom_mapping.rb]
83
- ```
84
-
85
- Third of all once this library is functional as the original version then we
86
- will go through each of the existing types, and refactor those as necessary.
87
-
88
- ### References
89
-
90
- * https://martinfowler.com/bliki/MovingToNokogiri.html