Creating a TreeSet Definition
A TreeSet Definition is MetaClass-specific.
The TreeSet Definition is based either on:
a collection parameter (an occurrence or a set of occurrences of the source MetaClass)
The TreeSet Definition creation consists in defining the root MetaClass (concrete or abstract) of the TreeSet Definition.
a query (a set of occurrences)
The TreeSet Definition creation consists in defining the root MetaClass and a query that collects the entry points.
In that case, you might need to use Property Parameters.
The TreeSet Definition Structure includes a root TreeSet Collection with as many items as needed:
TreeSet Properties
TreeSet Collections with:
TreeSet Properties
TreeSet Collections
Creating a Collection Parameter - based TreeSet Definition 
When you create a TreeSet Definition based on a Collection Parameter, you need to define its root MetaClass.
To create a TreeSet Definition based on a Collection Parameter:
1. Access the TreeSet Definition folder
2. Right-click the TreeSet Definition folder and select New > TreeSet Definition.
The Creation of TreeSet Definition window appears.
3. In the Name field, enter your TreeSet Definition name.
*By default the TreeSet Definition name is: TreeSet Definition-x (x is a number).
Example: Org-Unit Organization.
4. Define the Root section:
In the Collection is populated by field keep "Collection Parameter".
In the MetaClass field, click the arrow and in the drop-down menu select the MetaClass you want to define as the root MetaClass of your TreeSet Definition.
*In the field, enter the first letters of the MetaClass for a quick access.
Example: Org-Unit.
5. Click OK.
The selected MetaClass is defined as your TreeSet Definition root MetaClass.
Your TreeSet Definition is created and added to the TreeSet Definition folder.
6. In your TreeSet Definition properties, display its Characteristics page.
It shows:
the Root MetaClass
the Collection Parameter characteristics.
For example, with "Org-Unit" as root MetaClass, the Collection parameter characteristics are:
- Type: "Org-Unit" MetaClass
- Multiplicity: "1" (default), i.e. the root TreeSet Collection is populated by a single object
- Populating: "Org-Unit Organisation_root", i.e. this Collection parameter populates the root node of the "Org-Unit Organization" TreeSet Definition.
7. (If needed) In the _GUIName field, enter a GUI name for the Collection Parameter.
This parameter is displayed in the TreeSet Definition Preview page.
If you do not define a GUI name, the local name is used.
8. (If you want to collect several objects) In the Multiplicity field, select "N".
In that case, at TreeSet creation the user can enter several objects (Entry Point Collection values), which are taken into account to build the TreeSet.
9. In your TreeSet Definition properties, display its Definition page.
The TreeSet Definition structure is created and includes the root TreeSetCollection.
Example: The "Org-Unit Organization" TreeSet Definition is created and includes its root node.
10. Define the TreeSet Definition structure:
you can add a TreeSet Collections
Example: you can add the "Org-Unit Component" TreeSet Collection
In the Collection Provider section:
Collection is populated by: "MetaAssociationEnd"
Populating MetaAssociationEnd: "Component".
you can add a loop on a TreeSet Collection
Example: you can add a loop on the "Org-Unit Component" TreeSet Collection, in the Recursive Definition section:
TreeSet Collection loop: "Org-Unit Component" with a Maximum loop depth of "3".
you can add TreeSet Properties
Example: you can add two TreeSet Properties to the "Org-Unit Component" TreeSet Collection: two MetaAttribute values of the Org-Unit Component.
11. Display the TreeSet Definition Preview page and test the report.
The TreeSet is displayed as a TreeTable. It shows its first three levels expanded, with objects in rows and corresponding Properties in columns.
Creating a query-based TreeSet Definition 
When you create a TreeSet Definition based on a query, you need to define:
its root MetaClass
its populating query, which is based on the root MetaClass selected
You can use a provided query or create your own query.
For example you can create a query that retrieves all the Applications with "5 stars" ranking, get their Software Technologies, and for each Technology its Vendor and risks.
To create a query-based TreeSet Definition:
1. Access the TreeSet Definitions folder
2. Right-click the TreeSet Definitions folder and select New > TreeSet Definition.
The Creation of TreeSet Definition window appears
3. In the Name field, enter your TreeSet Definition name.
*By default the TreeSet Definition name is: TreeSet Definition-x (x is a number).
Example: 5-star Appli.
4. In the Root section, in the Collection is populated by field, select "Query".
The Populating Query field appears.
5. In the MetaClass field, click the arrow and in the drop-down list select the MetaClass you want to define as the root MetaClass of your TreeSet Definition.
*In the field, enter the first letters of the MetaClass for a quick access.
Example: Application.
6. In the Populating Query field use the drop-down menu to select the query used to collect the entry point.
*Only the root MetaClass related queries are available. You can also create your own query.
Example: "Get 5 star Applications".
7. Click OK.
The selected MetaClass is defined as your TreeSet Definition root MetaClass.
Your TreeSet Definition is created and added to the TreeSet Definition folder.
8. In your TreeSet Definition properties, display its Characteristics page.
It displays the Root MetaClass, and how to populate the TreeSet:
The Root Population Queries section displays the query used to populate the TreeSet.
9. In your TreeSet Definition properties, display its Definition page.
The TreeSet Definition structure is created and includes the root node.
10. Define the TreeSet Definition structure:
you can add TreeSet Collections
Example: you can add the "Software Technology" TreeSet Collection.
In the Collection Provider section:
Collection is populated by: "MetaAssociationEnd"
Populating MetaAssociationEnd: "Supporting Software Technology"
Target MetaClass: "Software Technology"
Example: from Technologies, you can add the "Risk" and "Vendor" TreeSet Collections.
In the Collection Provider section:
Collection is populated by: "MetaAssociationEnd"
Populating MetaAssociationEnd: "Risk" and "Vendor"
you can add a loop to a TreeSet Collection
you can add TreeSet Properties
Example: you can add:
- one TreeSet Property to the "Technologies" TreeSet Collection: the "End of suport" MetaAttribute value of the Technology.
- two TreeSet Properties to the "5-star Appli-Root" TreeSet Collection: the "Cost" and "Current state" MetaAttribute value of the Application.
11. Display the TreeSet Definition Preview page and test the report.
The TreeSet is displayed as a TreeTable. It shows its first three levels expanded, with objects in rows and corresponding Properties in columns.
*Note that folders (if any) count for levels two.
Exemple: the TreeSet includes all of the applications with a 5-star ranking, and for each application its Software Technologies and their corresponding property values.
In this case there is a root folder (see Root node), so that only two levels are expanded, i.e. Risks and vendors are hidden.
12. (If you have more than 3 levels) Click the arrow next to each Object to display (/hide) one more level.
Example: Vendors and Risks are displayed.
13. Click Instant Report to create your Tree type report as a:
Breakdown
Dendrogram
TreeMap
TreeTable
With the same TreeSet, you can create Tree reports of each type.
Creating property parameters 
In your TreeSet Definition, you can create and define Property Parameters that you can use in any query used in the TreeSet Definition.
At TreeSet creation the user is asked to enter the parameter values, which are taken into account in the query.
To add a property parameter to the TreeSet Definition:
1. Access the TreeSet Definition properties.
2. Display the Characteristics page.
3. In the Parameters section, in the Property Parameters list, click New .
*You can add as many parameters as needed.
4. In the Meta Property Parameter creation window:
enter a Local Name (name displayed in the TreeSet)
Example: Begin date
(according to your needs) modify the default values for MetaAttribute type ("String"), MetaAttribute Length and MetaAttribute Format ("Standard")
*For detailed information regarding MetaAttribute characteristics, see MetaAttribute Characteristics.
5. Click OK.
The property parameter is added to the Property Parameters list.
6. In the Query Parameter Name field, enter a name for the parameter. This name is the one used in the query.
Example:
When you add "Begin Date" and "End Date" Query Parameters, at TreeSet creation the user is asked to enter both dates, which filter the TreeSet result according to the these dates.