How to construct annotation data sets

advertisement
How to construct annotation data sets
1. Understand the structure
- Open the model in text file and we can see these entries that represent the annotations.
2. Right click on “Data Sets” and select “New Data Set” to create a new data set.
3.
- Click “Next” until the “Row Mapping” page is reached.
- Click the downward arrow to show all the ecore models.
- Select the last one
4. – Select “details” element
- Click the first arrow button to import the expression.
- Click the second arrow button to set the type.
We are looking for annotations under entities. Based on the first screen shot in step one,
the hierarchy is Entity => eAnnotations => details; therefore, updating the expression to
//Entity/eAnnotations/details to reflect the structure in the model.
5. – Select “key” and the arrow button to import the query
- Based on the first screen shot in step one, the ID of the source entity is two levels
higher. “getURI()” is used to get the ID of an element; therefore, using getURI(../../.) to
get the ID of the source ID where ../../ means two levels up.
The source entity ID is needed because it is used to check which entity the current
annotation belongs to.
Download