Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Contents |
Prev | Next |
Applying ArcGIS Stereotypes to Abstract Classes
Using the Enterprise Architect UML Profile for ArcGIS, you can specify a geometry stereotype on the Feature Classes in your geodatabase schema. Geometry stereotypes include «Point», «Polyline», «Polygon» and «Multipoint», among others. The ArcGIS Toolbox provides convenient icons for each geometry so that you can drag and drop stereotyped Classes into your geodatabase design model that are immediately ready to export. These Classes are referred to as concrete Classes; since their UML property, IsAbstract, has a value of False, they will be implemented directly in the geodatabase schema.
However, sometimes it is useful to specify the geometry stereotype on an abstract UML Class so that multiple concrete Classes can inherit the geometry, as well as Tagged Values and any fields defined in the abstract Class. This example models houses and garages as Point Feature Classes. Both the 'House' and 'Garage' Classes inherit the 'StreetAddress' field from the abstract Class named 'Building'.
You can create an equivalent model by specifying the stereotype on the abstract Class and using unstereotyped concrete Classes for 'House' and 'Garage', as shown:
The advantages of stereotyping the abstract Class rather than each concrete Class (especially when you have many such derived Feature Classes) include:
- It is easier to change the geometry during design time; you make only one change to the abstract Class stereotype, which then automatically applies to each concrete Class
- It is quicker to create the model in the first place, because you have to edit only one set of Tagged Values associated with the stereotype; the concrete Class might not have to replicate (or override) any of the Tagged Values associated with its inherited geometry stereotype
- For the same reason, the overall model is smaller and simpler
Create an abstract Class with geometry in the model
A Class is considered to be abstract when its UML property IsAbstract is set to True. When you create a Class using the 'Abstract Class' icon from the ArcGIS toolbox, the IsAbstract property is set to True automatically. You can also set the property manually for any Class, on the 'Details' tab of the Class 'Properties' dialog.
Step |
Action |
See also |
---|---|---|
1 |
Open the relevant diagram in your model. |
|
2 |
Select the Core page of the ArcGIS Toolbox (More tools | ArcGIS | Core) and drag the Abstract Class icon onto the diagram to create the element. |
|
3 |
If the 'Properties' dialog does not automatically display, double-click on the Abstract Class element. |
|
4 |
On the 'General' page of the 'Properties' dialog, click on the 'Stereotype' field |
Stereotype Selector |
Create a concrete Class that inherits an abstract Class's geometry stereotype
When you export your model as a geodatabase schema, the system applies the geometry stereotype from the abstract Class to any of its derived concrete Classes. Furthermore, the exporter will add any missing 'system level' fields. For example, a Class need not specify, nor inherit, a field named 'OBJECTID'. Similarly for the 'Shape', 'Shape_Length' and 'Shape_Area' fields. Although the exporter will use these fields if they are modeled somewhere in the inheritance hierarchy, it will automatically generate valid instances of them as required.
Step |
Action |
See also |
---|---|---|
1 |
Open the diagram that contains the abstract Class. |
|
2 |
Select the Core page of the ArcGIS Toolbox (More tools | ArcGIS | Core) and drag the Concrete Class icon onto the diagram to create the element. |
|
3 |
Click on the Generalization icon in the Toolbox and then click and drag the cursor from the concrete Class to the abstract Class. |
|
4 |
Save your diagram. |
Notes