Transforming a Mindmap to Requirements in Java

Print QR Code ISO/IEC18004 in Java Transforming a Mindmap to Requirements
66 Transforming a Mindmap to Requirements
QR Code JIS X 0510 Encoder In Java
Using Barcode generator for Java Control to generate, create Denso QR Bar Code image in Java applications.
Figure 6-10
Bar Code Encoder In Java
Using Barcode creator for Java Control to generate, create bar code image in Java applications.
Mindmap domain model
Bar Code Recognizer In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
Figure 6-11
QR Code ISO/IEC18004 Creator In C#.NET
Using Barcode creator for Visual Studio .NET Control to generate, create QR Code ISO/IEC18004 image in VS .NET applications.
Requirements domain model
Quick Response Code Encoder In Visual Studio .NET
Using Barcode creator for ASP.NET Control to generate, create QR image in ASP.NET applications.
CHAPTER 6 Developing Model-to-Model Transformations
Making QR Code ISO/IEC18004 In .NET Framework
Using Barcode maker for .NET framework Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
Let s say that, for each root Topic on the diagram, we want to create a RequirementGroup For each subtopic of the root Topic, we will add a Requirement to the RequirementGroup Finally, we ll add a dependency relationship between Requirement objects so that we have a Relationship between Topic elements that are of Type::DEPENDENCY Recalling our requirements diagram notation, a RequirementGroup is a rounded rectangle, while child Requirement objects will be a circle connected with solid lines Dependency links will be drawn as dashed lines with open arrow heads Figure 6-12 is an example diagram, to give you a better understanding of where we re headed with this transformation Following the transformation, you can use the generated action to initialize a requirements diagram from our new model instance, to create the diagram in our runtime workspace
Painting QR Code ISO/IEC18004 In Visual Basic .NET
Using Barcode creator for Visual Studio .NET Control to generate, create QR Code image in .NET framework applications.
Yet Another
Creating Barcode In Java
Using Barcode maker for Java Control to generate, create bar code image in Java applications.
A Subtopic
UPC - 13 Creator In Java
Using Barcode generation for Java Control to generate, create UPC - 13 image in Java applications.
A SubSubtopic
Drawing Data Matrix In Java
Using Barcode drawer for Java Control to generate, create DataMatrix image in Java applications.
Topic
Generating UPC-A Supplement 2 In Java
Using Barcode creator for Java Control to generate, create Universal Product Code version A image in Java applications.
Another Subtopic
Encode Code 39 In Java
Using Barcode printer for Java Control to generate, create Code39 image in Java applications.
Another SubSubtopic
Making Leitcode In Java
Using Barcode printer for Java Control to generate, create Leitcode image in Java applications.
Figure 6-12
Recognizing Code 128 Code Set B In .NET Framework
Using Barcode reader for .NET Control to read, scan read, scan image in Visual Studio .NET applications.
Mindmap and requirement diagrams
Barcode Encoder In Visual C#
Using Barcode printer for .NET Control to generate, create barcode image in .NET framework applications.
66 Transforming a Mindmap to Requirements
DataMatrix Encoder In Visual Studio .NET
Using Barcode creation for Visual Studio .NET Control to generate, create Data Matrix image in .NET framework applications.
Although the two diagrams are similar, the structure of their domain models is quite different The subtopics in our mindmap are contained in the canvas element (Map::elements) and linked using noncontainment references In the requirements model, Requirement and RequirementGroup elements have children that are contained by their parents Now let s take a look at the QVT that enables us to transform these models The following is an updated toRequirementsModel() mapping in our mindmap2requirements transformation definition
Encode Bar Code In .NET Framework
Using Barcode printer for .NET framework Control to generate, create bar code image in Visual Studio .NET applications.
transformation mindmap2requirements(in inModel : mindmap, out outModel : requirements); property dependencies : Set(Relationship) = null; property reqCtr : Integer = 1; property grpCtr : Integer = 1; main() { inModelrootObjects()[Map]->map toRequirementsModel(); } mapping mindmap::Map::toRequirementsModel() : requirements::Model { init { thisdependencies := selfdependencies(); } title := selftitle; groups += selfrootTopicsmap toRequirementGroup()->asOrderedSet(); }
Bar Code Maker In .NET
Using Barcode printer for ASP.NET Control to generate, create barcode image in ASP.NET applications.
Notice that a dependency property is declared at the top of the transformation and is initialized using a dependencies() query in the main mapping s init{} block Relationship elements are stored within the same containment feature of our Map as Topic elements, so we can use this query to collect all those Relationships of type DEPENDENCY for use in our toRequirement() mapping This is the dependencies() query:
Create Barcode In C#
Using Barcode printer for .NET Control to generate, create bar code image in VS .NET applications.
query mindmap::Map::dependencies() : Set(mindmap::Relationship) { return selfelements->select(oclIsTypeOf(mindmap::Relationship)) ->select(c | coclAsType(mindmap::Relationship)type = mindmap::Type::DEPENDENCY) ->collect(oclAsType(mindmap::Relationship))->asSet(); }
EAN13 Scanner In Visual Studio .NET
Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
Recall that we implemented the derived rootTopics reference of our Map class using OCL in Section 33, Developing the Mindmap Domain Model We could use the OCL used to derive the root Topics within this QVT script, but
CHAPTER 6 Developing Model-to-Model Transformations
having it implemented in our model makes the script cleaner and eliminates the need to repeat the code here, in code generation templates, and so on The root Topic elements are each mapped to RequirementGroup elements using the following toRequirementGroup() mapping From the updated transformation declaration shown previously, you can see two properties used as counters to generate group and requirement indexes
mapping mindmap::Topic::toRequirementGroup() : requirements::RequirementGroup { init { result := object requirements::RequirementGroup { name := selfname; id := 'G0' + thisgrpCtrtoString(); requirements += selfsubtopicsmap toRequirement(); } } end { thisgrpCtr := grpCtr + 1; } }
A straightforward map of the Topic name attribute to the RequirementGroup name attribute is followed by an invocation of the toRequirement() mapping for each of the subtopic references This is this final mapping in our transformation:
mapping mindmap::Topic::toRequirement() : requirements::Requirement { title := selfname; children += selfsubtopicsmap toRequirement(); id := 'R0' + thisreqCtrtoString(); version := object requirements::Version { major := 1; }; dependencies += thisdependencies->select(source = self)targetlate resolveIn(mindmap::Topic::toRequirement, requirements::Requirement); end { thisreqCtr := reqCtr + 1; } }
The Topic name attribute maps to the Requirement title, as subtopics are recursively mapped to child Requirements The Requirement dependencies reference is populated with Requirement objects created from Topic elements that are targets of mindmap DEPENDENCY relationships collected earlier We cannot guarantee that these Topic elements have been already mapped to