Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
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 button and, on the 'Stereotype for Class' dialog, set the 'Profile' to 'ArcGIS' and click on the check box against the required geometry stereotype. |
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
- Any concrete Class that does not have a stereotype, and does not inherit one, is exported as a Table (ObjectClass); its OBJECTID field is also inserted if it is not defined in the model
- Concrete Classes can only inherit geometry stereotypes or the «ObjectClass» stereotype from an abstract ancestor Class; currently, Enterprise Architect does not support stereotype inheritance from other concrete Classes
- In addition to inheriting the stereotype, concrete Classes also inherit fields from ancestor abstract Classes
- You can inherit the stereotype from an abstract Class at any level in inheritance hierarchy; for example, the abstract Class that specifies the geometry can be the grandparent of the concrete Class, rather than the parent Class
- Multiple shapes for a single Feature Class are not supported by ArcGIS, nor by Enterprise Architect's ArcGIS profile; therefore, it would be a modeling error if a concrete Class inherited from more than one geometry-stereotyped abstract Class
- If you specify a given tag on a concrete Class that is already present in one of its parent abstract Classes, the concrete Class has precedence and its Tagged Value will be exported to the schema
- Enterprise Architect does not require you to show the Object and Feature Esri Classes on a diagram, nor even include them in your model, because the system implicitly applies their characteristics when you apply a geometry or ObjectClass stereotype to a Class
- It is not, however, an error to include the Object and Feature Esri Classes and model Generalization links to them, even though they are typically not marked as abstract