.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : T05_ForEachObject.rst * Created by : Ralph Oudejans * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt .. include:: /external-links.txt T05 Foreach Object ========================= .. rubric:: In this tutorial we will create a class for each object in the model. - Open in directory metafactory-workshop-metafactory\\src\\model the file called model.xml and add the highlighted content: |Eye S| You can open model.xml directly from the MetaFactory Project window by double clicking it. .. literalinclude:: /_static/tutorial-files/5-foreach-object/model.xml :caption: src/model/model.xml :language: xml :linenos: :emphasize-lines: 65-67 - Open in directory metafactory-workshop-metafactory\\src\\patterns\\package\\feature1 the file called pattern1.xml and adapt line 7 so it has the highlighted content: .. literalinclude:: /_static/tutorial-files/5-foreach-object/pattern1.xml :caption: src/patterns/feature1/pattern1.xml :language: xml :linenos: :emphasize-lines: 7 Now: - Click on metafactory-workshop-metafactory in the MetaFactory Project window. - Click on the Play button to run the MetaFactory tool. Once finished the MetaFactory Tool will have generated a class for each object in the model - Open the directory metafactory-workshop-backend\\src\\main\\java\\com\\company\\workshop to see the result.