building geodatabases with...

72
Building Geodatabases with CASE Tools GIS by ESRI

Upload: others

Post on 18-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

Building Geodatabases with CASE Tools

GIS by ESRI™

Page 2: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

Copyright © 2002 ESRI.All rights reserved.Printed in the United States of America.

The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law and otherinternational copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic ormechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by ESRI. Allrequests should be sent to Attention: Contracts Manager, ESRI, 380 New York Street, Redlands, CA 92373-8100, USA.

The information contained in this document is subject to change without notice.

U.S. GOVERNMENT RESTRICTED/LIMITED RIGHTSAny software, documentation, and/or data delivered hereunder is subject to the terms of the License Agreement. In no event shall the U.S. Government

acquire greater than RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the U.S. Government is subject to restrictions as

set forth in FAR §52.227-14 Alternates I, II, and III (JUN 1987); FAR §52.227-19 (JUN 1987) and/or FAR §12.211/12.212 (Commercial Technical Data/

Computer Software); and DFARS §252.227-7015 (NOV 1995) (Technical Data) and/or DFARS §227.7202 (Computer Software), as applicable. Contractor/

Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100, USA.

ESRI, ArcInfo, ArcCatalog, ArcGIS, ArcToolbox, ArcSDE, and GIS by ESRI are trademarks, registered trademarks, or service marks of ESRI in the United

States, the European Community, or certain other jurisdictions.

Other companies and products mentioned herein are trademarks or registered trademarks of their respective trademark owners.

attribution_CaseTools.pmd 5/31/2002, 12:29 PM1

Page 3: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

IN THIS DOCUMENT

1

Building geodatabases with CASE tools

• What are CASE tools?

• Designing the object model inMicrosoft Visio

• Generating schema using CASEtools

The geodatabase brings the physical representation of geographicfeatures closer to their actual real-world counterparts. It is possible tocreate hydrants, mains, and valves and to define a number ofcharacteristics for each, such as fields, validation rules, relationships, andsubtypes. The Computer-Aided Software Engineering (CASE) toolssubsystem lets you create blueprints of the structure of the geodatabaseusing a graphical language—the Unified Modeling Language (UML).Using class diagrams, you can represent geodatabase elements, such asfeature datasets or geometric networks, and clearly see the relationshipsamong them.

This document discusses how you can use Microsoft® Visio® to constructyour UML and how you can use CASE tools in ESRI® ArcCatalog™ togenerate the schema for your geodatabase.

CaseTools.pmd 11/7/2002, 5:00 PM1

Page 4: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

2 BUILDING GEODATABASES WITH CASE TOOLS

What are CASE tools?

As discussed in Building a Geodatabase, there are three generalstrategies to creating geodatabases. The first two strategies—migrating existing databases to the geodatabase and using toolsin ArcCatalog and ArcToolbox™ to create the schema for yourgeodatabase design—are discussed in Building a Geodatabase.This document will discuss the third strategy: using UML and theCASE tools subsystem of ArcGIS™ to generate the schema foryour geodatabase.

UML models are created using specialized tools, such asMicrosoft Visio or Rational Software Corporation’s RationalRose®, then exported to an intermediate format: the MicrosoftRepository or an XML Metadata Interchange (XMI) file. TheCASE tools will read the model and allow you to create thegeodatabase schema and, optionally, generate code to definecustom behavior.

XMI is an Object Management Group (OMG) standard thatspecifies how to store a UML model in an XML file. ArcGIS nowreads models in XMI files as well as models stored in theMicrosoft Repository.

Using CASE for schema design and generation

The general strategy for using UML and CASE tools to designand create your geodatabase involves using UML to define all ofthe schema for the geodatabase, generating that schema, thenpopulating the schema with data. The steps for accomplishingthis are outlined below:

1. Create your geodatabase design in UML.

2. Export your UML model to XMI or Microsoft Repository.

3. Use the Schema Wizard in ArcCatalog to create the schema inyour geodatabase from your UML model.

Once you have generated the schema, you may want to startdirectly editing that schema to build your database, but typically

you will have existing data with which you want to populate thatschema. There are a number of things that can impactperformance when loading data into a geodatabase schema,especially when working with network data.

There is more than one strategy for loading data into an existingdatabase schema. Each strategy has its limitations and affectsperformance of the database. The different strategies for loadingyour existing data into that schema and the performanceconsiderations of each are outlined in Building a Geodatabase.

The general strategy for using UML and CASE tools to designand create your geodatabase involves using UML to define all ofthe schema for the geodatabase, generating that schema, thenpopulating the schema with data.

CaseTools.pmd 11/7/2002, 5:00 PM2

Page 5: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 3

Modeling database structure

Geodatabase elements, such as tables, feature classes, andrelationship classes, follow certain rules that dictate where theseelements are stored in the geodatabase relative to each other. Forexample, feature datasets are defined under the geodatabase,while geometric networks are defined inside feature datasets.Some elements, such as feature classes and relationship classes,can be inside or outside feature datasets.

These aspects of a geodatabase’s structure are defined in UMLthrough the use of packages to represent the geodatabase andfeature datasets. The UML classes that are used to define featureclasses, relationship classes, tables, and geometric networks aredefined under these packages.

Tagged values

Tagged values are used to set additional properties of UMLelements. For example, you can set the length (in characters) of astring field by using a tagged value.

Tagged values are recognized on several other UML elements:class, attribute, associations, and so on. The following tablesummarizes the tagged values used for geodatabase schemaelements.

Table 1: Tagged values for geodatabase UMLelements

Tagged value name Values/Remarks

Fields:

Precision Integer value

Integer fields: number of digits

Double fields: total number of digits

Scale Integer value

Number of decimal places in singleand double fields

Length Integer value

Width of character fields

AllowNulls True/False

Alias String

The alias name for the field

Feature class/Object class:

Geometry type esriGeometryPointesriGeometryPolygonesriGeometryPolylineesriGeometryMultipoint

Valid only for feature classes

Ancillary role esriNCARNoneesriNCARSourceSink

Valid only for junction feature classes

ConfigKeyword String value

CaseTools.pmd 11/7/2002, 5:00 PM3

Page 6: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

4 BUILDING GEODATABASES WITH CASE TOOLS

HasM True/False

Valid only for feature classes

HasZ True/False

Valid only for feature classes

CLSID GUID in registry format

If specified, the Schema Wizard willlook for a COM class identified by theCLSID in the system registry.If not specified, the appropriate ESRICOM class will be used instead. Thistagged value will be overwritten bythe Code Generation Wizard if code isgenerated for the custom feature.This tagged value can be specified forUML classes representing classextensions as well.

Alias String

The alias name for the field

Geometric network:

GNConfigKeyword String

Relationship class:

Notification esriRelNotificationBackwardesriRelNotificationBothesriRelNotificationForwardesriRelNotificationNone

IsAttributed True/False

OriginClass Name of the origin class

OriginPrimaryKey Name of the primary key field of theorigin class

OriginForeignKey Name of the foreign key field of theorigin class

For 1-1 and 1-M relationship classes,this field lives in the destination class.For 1-M/attributed relationshipclasses, this field lives in the auxiliary<<RelationshipClass>> class.

DestinationPrimaryKey Name of the primary key field of thedestination classValid for M-M/attributed relationshipclasses only.

DestinationForeignKey Name of the foreign key field of thedestination classValid for M-M/attributed relationshipclasses only. This field lives in theauxiliary <<RelationshipClass>>class.

Domain:

Description String value

Feature datasets

Feature datasets are modeled in UML as stereotyped packagesthat you create under the geodatabase workspace package. Afeature dataset package cannot be created under another featuredataset package; however, other packages created fororganizational purposes can. For example, a package that holds allof the subtypes for a particular class can be created under afeature dataset package.

CaseTools.pmd 11/7/2002, 5:00 PM4

Page 7: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 5

Feature datasets have a spatial reference associated with them.Spatial references are not modeled in UML. Instead, the spatialreference for a feature dataset is set when generating the schemain ArcCatalog.

Tables, feature classes, and geometric networks

UML classes are used to model feature classes and tables. Whenschema is generated from the UML model, one table or featureclass is created for each class in the model. Each property of theobject is mapped to a field of the table or feature class. Requiredfields are included as properties of the base class and need not berepeated in any inherited classes. For example, you may have aclass called Pipes that has the properties Material and Diameter. Ifyou then create a new class called Mains that is inherited fromPipes, then Material and Diameter are also properties of theMains class but do not need to be repeated in the Mains class inthe UML model.

When schema is generated, each property is mapped as a field onthe table or feature class. You can specify the length, scale, andprecision of the fields that correspond with these properties inthe UML diagram by setting tagged values. You can also usetagged values to set properties for feature classes, classextensions, relationship classes, and interfaces.

When generating schema, all feature classes the wizard createsuse the coordinate system of the target feature dataset. Objectclasses (tables) are created at the workspace level.

The default grid size is 1,000. Grid size is not stored as part of themodel because the coordinate system of target feature datasetsmight be different. You can specify a grid size for each featureclass in the Schema Wizard.

Tables are created for those objects that inherit from the Objectclass, feature classes are created for those that inherit from theFeature class, and simple or complex network feature classes arecreated for those that inherit from the Network feature classes.

All network feature classes must be associated with a geometricnetwork. Geometric networks (GN) are modeled in UML as specialclasses. The geometric network and its associated network

Workspace

<<FeatureDataset>>Electric

<<FeatureDataset>>Landbase

Package representsthe geodatabase.

Stereotyped packagerepresents a feature dataset.

Class represents a feature class ortable.

Tables and standalonefeature classes aredefined at the workspace.

Stereotyped class representsgeometric network.

Associationrepresentsrelationship class.

Parcels Buildings Owners

Cables

<<GN>>ElectricNet

Transformers

Poles

Network feature classes are associatedwith geometric network.

Geodatabase elements, such as tables, feature classes, and relationshipclasses, follow certain rules that dictate where these elements are storedin the geodatabase relative to each other. These aspects of ageodatabase’s structure are defined in UML through the use of packagesto represent the geodatabase and feature datasets.

CaseTools.pmd 11/7/2002, 5:00 PM5

Page 8: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

6 BUILDING GEODATABASES WITH CASE TOOLS

feature classes must be created in the same feature datasetpackage. A junction feature class is created for all features thatinherit from Simple Junction or Complex Junction. For moreinformation on geometric networks, see Building a Geodatabase.

Subtypes and domains

Attribute domains are modeled in UML as special classes. Whenthe CASE tool generates the schema from the UML model, thesedomain classes are stored in the geodatabase as domains. Codedvalue and range domains, along with their valid values, splitpolicies, and merge policies, are all modeled in this way.

If your tables or feature classes require subtypes, these can alsobe modeled in UML and automatically generated when the tablesor feature classes are created in the database. Subtypes aremodeled in UML as classes related to the parent class through anassociation stereotyped as Subtype. The Subtype field isspecified in the parent class as a stereotype of a UML attribute.

You can specify default values and domains for each field for aparticular feature class or subtype. To associate a domain with aparticular field, simply specify the name of the domain as the fieldtype. Similarly, the field’s default value can be supplied for featureclasses or subtypes by setting the initial value in the UMLattribute representing the field.

Attribute domains are modeled in UML as special classes.

Parcels

Buildings

Owners

Cables Transformers

Poles

ControlPoints

Object

Feature

Edge-Feature

Network-Feature

Junction-Feature

SimpleEdge-Feature

SimpleJunction-Feature

Object modelArcInfo objects

<<GN>>ElectricNet

Geodatabase

Table

Feature class

Feature class

Feature class

Feature class

Geometricnetwork

Network Feature class

Tables are created for objects that inherit from the Object class, featureclasses are created for objects that inherit from the Feature class, andnetwork feature classes are created for objects that inherit from theNetwork feature class.

Subtypes are modeled in UML as classes related to the parent classthrough an association stereotyped as Subtype. You can specify domainsand default values for the fields for that subtype.

CaseTools.pmd 11/7/2002, 5:00 PM6

Page 9: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 7

Relationships

Associations between objects in your UML model are created inthe geodatabase as relationship classes. The cardinality of thoseassociations is reflected in the cardinality of the relationshipclass. The name of the relationship class is the name of theassociation. The primary and foreign keys are specified directly inthe UML model as tagged values of the UML association.

Attributed relationships are modeled as classes with the samename as the relationship class, stereotyped as a relationshipclass. The fields for the relationship class’s attributes are modeledin the same way as the attributes of any other class.

Notification direction—the direction messages are passed—forthe relationship class can be modeled in UML using taggedvalues.

Relationship rules apply to subtypes in feature classes andtables. In UML, these relationship rules are modeled asassociations between subtypes of the classes participating in therelationship class.

Composite relationships are modeled in UML as aggregation. Ina composite relationship, the origin class is always the parent inthe aggregation. Composite relationship classes always have aone-to-many relationship.

To learn more about relationship classes, see Building aGeodatabase.

If the feature class or table you are modeling does not have subtypes,but you still want to associate domains and default values to fields, youcan do so directly on the class object itself. Relationship classes are modeled in UML as associations. The cardinality

of the association is reflected as the cardinality of the relationship class.Attributed relationships are modeled as classes with the same name asthe relationship class.

Composite relationship classes are modeled in UML as aggregationsbetween classes.

CaseTools.pmd 11/7/2002, 5:00 PM7

Page 10: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

8 BUILDING GEODATABASES WITH CASE TOOLS

Connectivity rules

Connectivity rules apply to network feature classes andsubtypes of network features participating in the same geometricnetwork. These connectivity rules are modeled in UML as aspecial association stereotyped as ConnRule.

For edge–junction connectivity rules, the ConnRule associationis between the edge subtype and the junction subtype. Thejunction in one of the edge–junction rules can be set as thedefault junction by stereotyping the association end as Default.Edge–Edge rules are represented by a UML N-ary associationthat involves two edge subtypes and any number of junctionsubtypes. One of the junction subtypes must be marked as thedefault junction by stereotyping the association end as Default.

CASE tools

The CASE tools subsystem of ArcGIS 8 has two parts: the CodeGeneration Wizard and the Schema Wizard. The remainder of thisdocument discusses how you can create each component of yourgeodatabase schema in UML using Visio Enterprise and how youcan use the CASE tools in ArcCatalog to generate the schema foryour UML design.

For more information on the ESRI object model and on generatingcode for your custom objects using the Code Generation Wizard,see Modeling Our World and Exploring ArcObjects.

The ArcInfo UML Model diagram

When you are ready to begin creating your UML model, you willstart with one of the ArcInfo™ UML Model diagrams that wereinstalled with ArcGIS. These diagrams are Visio Drawingtemplates—ArcInfo UML Model(Ent).vst for Visio Enterprise orArcInfo UML Model (Pro).vst for Visio Professional. These VisioDrawing templates are located under your ArcGIS installation inthe casetools\UML Models directory.

The ArcInfo UML Model diagram contains the object modelrequired for using UML to model your geodatabase. The objectmodel has five packages:

• Logical View

• ESRI Classes

• ESRI Interfaces

• ESRI Network

• Workspace

These UML packages act as directories where different parts ofthe entire object model are maintained. The Logical View packageis the root level and contains the other three packages. Database

Edge–Edge rules are represented by a UML N-ary association. One ofthe junction classes or subtypes must be marked as the default junctionby stereotyping the association end as Default.

CaseTools.pmd 11/7/2002, 5:00 PM8

Page 11: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 9

designers and developers can use the Workspace package tocreate their object and database designs. It is possible to createmore packages if the complexity of the model requires you to doso.

The ESRI Classes package contains the portion of the GeoDataAccess Components necessary to create object models. Classesin this package represent components that are used to accessspatial data sources, including geodatabases. Feature classes andobject classes in your object models will inherit from theseclasses. The ESRI Interfaces package contains the definition ofthe interfaces implemented by the components shown in the ESRIClasses package. The interfaces are used only for codegeneration when creating custom objects.

The tasks in this document demonstrate how you can use theArcInfo UML Model diagram to model the pieces of yourgeodatabase design. All examples given are for Visio Professional.

Semantics checker

The CASE tools expect UML models to be created following a setof modeling rules. For example, a network feature class must beassociated to a geometric network. The semantics checker can beused to verify that a model stored in the Microsoft Repository orXMI has been correctly defined. It will produce a report with thelist of errors encountered in the model. You should use thesemantics checker before running the CASE tools wizards. Youcan run the semantics checker from within Visio when thetemplate diagram is loaded.

Applying your model to existing data

You can update the schema of a geodatabase with informationstored in an object model. For example, you can import data to ageodatabase, then apply a model to add subtypes, relationships,and other elements. Alternatively, your current schema could

The Schema Wizard will show matched elements with a red shadow inthe tree view.

have been created previously with the Schema Wizard based on amodel. Since then, the model might have changed, and you maywant to update the database.

You can use the Schema Wizard to modify an existinggeodatabase, even if data has already been loaded. To do so,select the target geodatabase and run the Schema Wizard. Whenthe wizard starts, some elements in the model are searched for andmatched to objects in the database—feature classes and tables,for example. If found, the wizard will modify them. The SchemaWizard will show the matched elements with a red shadow in thetree view.

CaseTools.pmd 11/7/2002, 5:00 PM9

Page 12: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

10 BUILDING GEODATABASES WITH CASE TOOLS

For a number of reasons, your database may contain featureclasses and fields whose names do not correspond exactly to thenames in the UML model. Perhaps you have applications writtenpreviously that rely on the existing field’s name being different.For example, a field could be named “Hgt” in the database and“Height” in the model. The geodatabase lets you assign a modelname to feature classes and fields, and the CASE tools use themodel name when matching them to UML elements. Someproperties of the matched object may be read-only—for example,the spatial reference of an existing feature dataset.

Conversely, other properties of the existing object will bechanged based on the information in the model, such as thedomain assigned to a field. In the former case, a locked databaseicon will appear in the form or tab displaying the particularproperty. In the latter case, a model icon will be used instead.

Since the schema of matched elements is modified when a modelis applied, exclusive schema locks are acquired for the elementsthat will be modified. These locks can be established only if thereare no other users connected to the database and the current userhas the right permissions. Since the schema is modified, youshould back up your database before applying the changes.

Each geodatabase element supported by the Schema Wizardfollows a set of rules when the model is reapplied. The followingis a description of these rules:

Feature datasets: The Schema Wizard uses the name of the UMLpackage representing the feature dataset to search for an existingfeature dataset in the target database. The spatial reference andspatial domain properties become read-only.

Other model elements are defined inside feature datasets, such asgeometric networks and feature classes. These elements will befound in the existing database only if the feature dataset itself isfound.

Feature classes: The name of the UML class representing thetable or feature class will be used to search for an existing objectin the geodatabase. The comparison is first made against themodel names of the existing feature classes. If no match is found,the comparison is made against the names of the existing featureclasses. If still no match is found, you can manually set the matchusing the Exists tab in the feature class’s properties dialog box.

Only feature classes with the same feature type can be used whenmatching manually. Also, only feature classes in the samelocation are available for matching—for example, the featureclasses under the matched feature dataset.

When the Schema Wizard is run, it updates the model name ofboth existing and new feature classes and fields. This ensures thematching will occur automatically the next time the model isapplied.

Those properties that cannot be changed when reapplying the model willhave a locked database icon on their properties dialog box, while thosethat can be modified will have a model icon.

CaseTools.pmd 11/7/2002, 5:00 PM10

Page 13: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 11

Fields: Like feature classes, fields are matched based on modelname, and a manual match can be done. The UML class may alsocontain additional fields. These can be marked for addition in theExists tab of the feature class properties dialog box. Existing fieldsnot matched are left untouched. Reapplying the model to existingdata does not drop fields.

For matched fields, the field type, length, precision, and scale areread-only properties. However, the domain and initial value will beupdated if they have been set in the model (the domain must havethe same field type).

Domains: Domains are matched based on the name of the UMLclass and the existing domain. If found, the domain will be alteredwith modifications made to the UML class. For example, newcodes can be added to a coded value domain.

Subtypes: Subtypes of matched feature classes are deleted andre-created using the subtypes in the model. Because connectivityand relationship rules are created among subtypes, they aredeleted and re-created as well. Whenever you use ArcCatalog toadd a subtype or rule, you should make sure the model is updatedaccordingly in case you ever reapply it.

Relationship classes: The name of the relationship class in themodel will be used to search for an existing relationship class inthe target database. Existing relationship classes that are not

If no match between the model and the database is found for a featureclass or table, you can manually set the match using the Exists tab in thefeature class’s properties dialog box.

If the UML class contains additional fields, these can be marked foraddition in the Exists tab of the feature class properties dialog box.

CaseTools.pmd 11/7/2002, 5:00 PM11

Page 14: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

12 BUILDING GEODATABASES WITH CASE TOOLS

matched will be left untouched. The policies on modifying vary,depending on the type of relationship class.

Nonattributed relationship classes are deleted and re-created.Along with the relationship class, the relationship rules aredeleted and re-created as well.

Internally, attributed relationship classes are implemented bycreating an extra table in the database. This table holds attributesof the relationships and keys to the rows in the related tables.Because this table may be holding data already, only therelationship class’s rules, not the relationship class itself, aredeleted and re-created.

Geometric networks: The name of the class representing thenetwork will be used to search for an existing geometric networkin the target database. As mentioned before, a geometric networkis matched only if the feature dataset it belongs to is matched aswell. All existing connectivity rules are deleted and re-created.

CaseTools.pmd 11/7/2002, 5:00 PM12

Page 15: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 13

1. Start Visio.

2. Click File and click Open.

3. Browse to C:\arcgis\arcexe82\CaseTools\UML Models, whichis the default installation path, and double-click the ArcInfoUML Model template file.

This document discusses how to create models using MicrosoftVisio and how you can use CASE tools in ArcCatalog to generatethe schema for your geodatabase. You will learn how to:

• Create UML packages and static structure diagrams.

• Create feature datasets.

• Create feature classes.

• Create relationship classes.

• Create domains.

• Create subtypes.

• Create geometric networks.

• Create connectivity rules.

• Extend classes with custom behavior.

• Export your UML model.

• Generate schema.

Designing the object model in Microsoft Visio

CaseTools.pmd 11/7/2002, 5:00 PM13

Page 16: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

14 BUILDING GEODATABASES WITH CASE TOOLS

Creating UMLpackages andstatic structurediagramsPackages are a convenient wayto organize your UML model.They act as folders where youcan group model elements. Justlike with folders on a disk, youcan create a hierarchy ofpackages in your model.

You can create as manypackages as you want. Forexample, you could have amodel that has the followingpackages: Domains,ElectricUtils, and Landbase.

Before you begin, create a newdiagram using the ArcInfo UMLModel Visio templates. Thesetemplates are located underyour ArcGIS installation in thecasetools\UML Modelsdirectory.

All of the tasks for creatingUML diagrams that are dis-cussed here are performedwithin the Visio application.

See Also

Special packages are used to modelfeature datasets. See ‘Creatingfeature datasets’ later in thisdocument.

1. In the Model Explorer tree,right-click Workspace, pointto New, then click Package.

2. Type the name of thepackage and click OK.

3. Right-click the new package.Point to New and click StaticStructure Diagram to create anew class diagram.

1

3

A new class diagram iscreated in the ModelExplorer.

CaseTools.pmd 11/7/2002, 5:00 PM14

Page 17: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 15

Setting taggedvaluesTagged values are used to setadditional properties of UMLelements. For example, you canset the length (in characters) ofa string field by using a taggedvalue.

Tagged values are recognizedon several other UML elements:class, attribute, associations,and so on.

1. In the Visio diagram, double-click the UML class.

2. Click Attributes in theCategories window anddouble-click a string-typedattribute.

3. Click Properties.

4. Click Tagged Values in theCategories window.

5. Click New to create a newtagged value. u

1

2

3

4

5

CaseTools.pmd 11/7/2002, 5:00 PM15

Page 18: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

16 BUILDING GEODATABASES WITH CASE TOOLS

6. Type “Length” in the Tag textbox and type the length ofthe field in the Value text box.

7. Click OK.

6

7

CaseTools.pmd 11/7/2002, 5:00 PM16

Page 19: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 17

Creating featuredatasetsFeature datasets are modeled inUML as stereotyped packages.Other geodatabase elements(feature classes, for example)defined under the package willbe created under the featuredataset. The name of the UMLpackage will become the nameof the feature dataset.

The spatial reference of afeature dataset is set whilerunning the Schema Wizard.

Tip

Class diagramsCreating several static structurediagrams can help you reducediagram cluttering. A package cancontain many static structurediagrams, and UML elements canappear in any diagram.

1. In the Model Explorer,double-click the Workspacediagram to open it.

2. In the UML Static Structurestencil, click Package anddrag it onto the diagram.

3. Double-click the newpackage.

4. Type a name for the pack-age.

5. Click the Stereotypedropdown arrow and clickFeatureDataset.

6. Click OK.

A new package and a newdrawing are created in theModel Explorer.

2

4

5

6

A new package and anew drawing arecreated in the ModelExplorer.

CaseTools.pmd 11/7/2002, 5:00 PM17

Page 20: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

18 BUILDING GEODATABASES WITH CASE TOOLS

Creating featureclassesFeature classes are representedby UML classes in the model.You can model fields, geometrytype, and other characteristicsof the feature class in the UMLclass.

Feature classes can be createdin the Workspace UML packageor in a feature dataset package.

You can add fields to a featureclass by adding attributes tothe UML class.

The field type is one of thevalues of the esriFieldTypeenumeration—for example,esriFieldTypeInteger.

A domain created beforehandcan be used as the attributetype as well.

Creating a feature class

1. In the Model Explorer treeunder ESRI Classes, click theparent class and drag anddrop it onto the diagram.

2. In the UML Static Structurestencil, click Class and dragand drop a new UML classonto the diagram.

3. In the diagram, double-clickthe new class. u 1

2

1

2 3

CaseTools.pmd 11/7/2002, 5:00 PM18

Page 21: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 19

Tip

Abstract classesYour model may include abstractclasses. Fields in abstract classesare inherited by the class descen-dants. Check the IsAbstract checkbox on the Class tab on the ClassProperties dialog box to mark aclass as abstract.

See Also

Tagged values allow you to fullyspecify UML elements in the model.See ‘Setting tagged values’ in thisdocument.

4. Type the name of the featureclass.

5. To set tagged values, followsteps 2 through 6 of ‘Settingtagged values’ in thisdocument; otherwise, skip tostep 6.

6. Click OK to accept thechanges.

7. In the UML Static Structurestencil, click Generalizationand drag and drop it onto thediagram.

8. Drag the ends of the gener-alization arrow and connectthe new class with its parent.

4

6

7

CaseTools.pmd 11/7/2002, 5:00 PM19

Page 22: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

20 BUILDING GEODATABASES WITH CASE TOOLS

Adding fields to a featureclass

1. In the diagram, double-clickthe class.

2. Click Attributes in theCategories window anddouble-click a string-typedattribute.

3. Click New to add a newattribute.

4. Click Properties to edit thefield property. u

1

2

3

4

CaseTools.pmd 11/7/2002, 5:00 PM20

Page 23: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 21

5. Type a name for the newfield.

6. Click the Type dropdownarrow and click the field type.

7. To set tagged values, followsteps 2 through 6 of ‘Settingtagged values’ in thisdocument; otherwise, skip tostep 8.

8. Click OK.

9. Repeat steps 3 through 8until you have added all thefields for your new class.

The fields appear in thediagram as attributes of theclass.

Tip

Default valuesYou can set the default for a field byentering the value in the InitialValue text box on the Attribute tabof the UML Property Editor dialogbox. Default values are optional.

5

6

8

9

CaseTools.pmd 11/7/2002, 5:00 PM21

Page 24: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

22 BUILDING GEODATABASES WITH CASE TOOLS

CreatingrelationshipclassesUML associations representrelationship classes amongfeature classes and objectclasses (tables).

Relationship classes can becreated only among leaf classes.Primary and foreign key fieldsmust be present in the classes.

Tagged values for relationshipclasses include:

• OriginClass: the name of theorigin class

Example: PowerPole

• OriginPrimaryKey: the nameof the primary key field in theorigin class

Example:OriginPrimaryKey=OBJECTID

• OriginForeignKey: the nameof the foreign key field in thedestination class

Example:OriginForeignKey=PoleID u

Creating nonattributedrelationship classes

1. In the UML Static Structurestencil, click Binary Associa-tion and drag and drop it ontothe diagram.

2. Connect the two classes. Theleft end of the association isthe origin class, and the rightend is the destination class.

3. Double-click the association.

4. Type a name for the associa-tion.

5. Click one of the associationends and click Properties. u

1

4

5

U

2

CaseTools.pmd 11/7/2002, 5:00 PM22

Page 25: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 23

• Notification: one of thevalues of theesriRelNotification enumera-tion

Example:Notification=esriRelNotificationBoth

The cardinality of the relation-ship class is derived from themultiplicity of both associationends. Because the cardinality ofa relationship class can be only1-1, 1-M, or M-N, the only validmultiplicity values are 1 and *(many). The name of anassociation end becomes arelationship class path label.

A relationship class can haveits own set of attributes. Youcan model such relationshipclasses by adding a UML classnamed after the relationship andstereotyped asRelationshipClass. The fields ofthe relationship class aremodeled in the same way asfields in any other class.Foreign keys must be includedin the class representing theattributed relationship. Many-to-many relationships arealways attributed.

The following tagged values arerecognized for attributedrelationship classes:

• IsAttributed: should beTrue u

6. Type the association endname.

7. Click the Multiplicitydropdown arrow and clickthe association end multiplic-ity.

8. Click OK.

9. Repeat steps 5 through 8 toset the name and multiplicityof the second end.

The keys for the relationshipclass are set in UML usingtagged values.

10. Click Tagged Values in theCategories window.

11. Click New.

12. Type “OriginPrimaryKey” forthe tag name.

13. Type the name of the originprimary key field.

14. Click OK.

15. Repeat steps 11 through 14to set the origin foreign keyand notification tags. u

6

7

8

Q

T

E

R

CaseTools.pmd 11/7/2002, 5:00 PM23

Page 26: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

24 BUILDING GEODATABASES WITH CASE TOOLS

• OriginPrimaryKey: the nameof the primary key field inthe origin class

Example:OriginPrimaryKey=OBJECTID

• OriginForeignKey: the nameof the foreign key field in thedestination class

Example:OriginForeignKey=OwnerID

• DestinationPrimaryKey: thename of the primary key fieldin the destination class

Example:DestinationPrimaryKey=OBJECTID

• DestinationForeignKey: thename of the foreign key fieldin the attributed relationship

Example:DestinationForeignKey=FittingID

• Notification: one of thevalues of theesriRelNotification enumera-tion

Example:Notification=esriRelNotificationBoth

Tip

Using OBJECTID as a keyfieldOBJECTID is defined in the Objectclass and is inherited by all otherclasses. If a field typed as OID isused as the primary key, then theforeign key must be typed asesriFieldTypeInteger.

16. Click OK.

The relationship class isshown as an associationbetween two classes. Thename of the association isthe name of the relationshipclass.

The relationship class isshown as an associationbetween classes.

CaseTools.pmd 11/7/2002, 5:00 PM24

Page 27: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 25

Creating attributedrelationship classes

1. Create the UML associationrepresenting the relationshipclass by following steps 1through 16 of ‘Creatingnonattributed relationshipclasses’.

2. In the UML Static Structurestencil, click Class and dragand drop a new UML classonto the diagram.

3. Double-click the new class.

4. Type the name of theassociation as the name ofthe new class.

5. Click the Stereotypedropdown arrow and clickRelationshipClass.

6. Follow steps 1 through 8 of‘Adding fields to a featureclass’ in this document to addfields to the relationshipclass.

7. Click OK.

The keys for the relationshipclass are set in UML usingtagged values. u

Tip

Composite relationshipsIn a composite relationship, one ofthe objects controls the lifetime ofthe associated objects. You cancreate a composite relationship byusing a Composition instead of abinary association.

1

2

4

5

7

CaseTools.pmd 11/7/2002, 5:00 PM25

Page 28: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

26 BUILDING GEODATABASES WITH CASE TOOLS

8. Double-click the association.

9. Click Tagged Values in theCategories window.

10. Click New.

11. Type “OriginPrimaryKey” forthe tag name.

12. Type the name of the originprimary key field.

13. Click OK.

14. Repeat steps 10 through 13for the destination primarykey, the origin anddestination foreign keys, andthe notification tags.

15. Click OK.

The attributed relationship isrepresented by a class withthe same name as therelationship association. Itsattributes appear asproperties of the class.

Tip

Association tagged valuesThe tagged values should be in theassociation and not in the classwith the attributes of the relation-ship.

9 Q

W

E

R

CaseTools.pmd 11/7/2002, 5:00 PM26

Page 29: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 27

Creating domainsDomains are modeled in UMLas stereotyped classes.Domains can be used as thetype of a field to define the typeand valid values for the field.

The first three attributes in theclass define the field type, themerge policy, and the splitpolicy. The type for any ofthese attributes is not importantand can be left unspecified. Theinitial value, however, is theactual setting. For example, thefollowing is a validMergePolicy:

• Attribute name:MergePolicy

• Attribute type:<unspecified>

• Attribute Initial Value:esriMPTDefaultValue

The valid initial values forFieldType, MergePolicy, andSplitPolicy are taken from theesriFieldType, esriMergePolicy,and esriSplitPolicy enumera-tions, respectively.

In addition to the standardattributes of domains(FieldType, MergePolicy, andSplitPolicy), range domainshave MinValue and MaxValue. u

Creating a range domain

1. In the Model Explorer, underWorkspace package, right-click TemplateRangeDomainand click Duplicate.

A copy of theTemplateRangeDomain iscreated under the Workspacepackage.

2. Drag and drop it on thediagram.

3. Double-click the new class.

4. Type the name of thedomain. u

2

1

4

CaseTools.pmd 11/7/2002, 5:00 PM27

Page 30: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

28 BUILDING GEODATABASES WITH CASE TOOLS

The initial values in MinValueand MaxValue define the actualrange. The type of theseattributes is not important andcan be left unspecified.

Coded value domains can haveany number of UML attributesrepresenting the set of permis-sible values. The initial valuedefines the valid code, and thename of the attribute is thename of the code. The type ofthese attributes is not importantand can be left unspecified.

5. Click Attributes in theCategories window.

6. Click FieldType and clickProperties.

7. Type the type of field withwhich this domain will beassociated in the InitialValuetext box.

8. Click OK.

9. Click MergePolicy and clickProperties.

10. Type the merge policy in theInitialValue text box.

11. Click OK.

12. Click SplitPolicy and clickProperties.

13. Type the split policy in theInitialValue text box.

14. Click OK. u

5

6

6

8

7

CaseTools.pmd 11/7/2002, 5:00 PM28

Page 31: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 29

15. Click the MinValue attributeand click Properties.

16. Type the minimum value forthe range domain in theInitialValue text box.

17. Click OK.

18. Click the MaxValue attributeand click Properties.

19. Type the maximum value forthe range domain in theInitialValue text box.

20. Click OK.

21. Right-click the domain in thediagram and click ShapeDisplay Options. Click theAttribute check box to hidethe attribute types.

U

I

Y

Y

S

CaseTools.pmd 11/7/2002, 5:00 PM29

Page 32: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

30 BUILDING GEODATABASES WITH CASE TOOLS

Creating coded valuedomains

1. In the Model Explorer, underthe Workspace package,navigate to and right-clickTemplateCodedValueDomain.Click Duplicate.

2. A copy of theTemplateCodedValueDomainis created under theWorkspace package. Dragand drop it on the diagram.

3. Double-click the domain inthe diagram and type thename of the domain.

4. Click Attributes in theCategories window.

5. Follow steps 6 through 14 of‘Creating a range domain’ inthis document to set the fieldtype and the split and mergepolicies.

6. Click the Code1 attribute andclick Properties. u

1

3

4

6

6

CaseTools.pmd 11/7/2002, 5:00 PM30

Page 33: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 31

Tip

Adding additional codesIn the UML Class PropertiesEditor, you can add additionalcodes by clicking Attributes in theCategories window. Click New andclick Properties for the attributeand set the name and initial valuefor the code.

7. Type the code name.

8. Click the Type dropdownarrow and select the type offield.

9. Type the code in theInitialValue text box.

10. Click OK.

11. Repeat steps 6 through 10for the other codes.

12. Click OK.

13. Right-click the domain in thediagram and click ShapeDisplay Options. Click theAttribute check box to hidethe attribute types.

7

8

9

Q

R

CaseTools.pmd 11/7/2002, 5:00 PM31

Page 34: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

32 BUILDING GEODATABASES WITH CASE TOOLS

CreatingsubtypesSubtypes are modeled in UMLas classes related to the parentclass through an associationstereotyped as Subtype. Youcan specify domains anddefault values for the fields inthe subtype.

A field in the parent class mustbe stereotyped asSubtypeField. Its initial value isthe subtype code of the defaultsubtype. The subtype fieldmust be typed as“esriFieldTypeInteger” in theparent class.

All subtypes must have aunique value for the subtypefield—this unique value is itssubtype code. Fields in thesubtype must match those ofthe parent class in name andtype, but not all the fields of theparent class have to be presentin the subtype. The subtypefield, however, is a requiredfield in the subtype.

Initial values must be type-compatible with the type of thefield. The type of a field can bea domain previously created.

Defining the subtype fieldfor the feature class

1. In the diagram, double-clickthe class for which you wantto create a subtype.

2. Click Attributes in theCategories window.

3. Click the attribute that will bethe subtype field.

4. Click Properties. u

1

2

3

4

CaseTools.pmd 11/7/2002, 5:00 PM32

Page 35: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 33

5. Click the Stereotypedropdown arrow and clickSubtypeField.

6. Type the subtype code of thedefault subtype in theInitialValue text box.

7. Click OK.

The subtype field appears asa property of the class with astereotype of SubtypeField.

5

6

7

The subtype fieldis stereotyped asSubtypeField.

CaseTools.pmd 11/7/2002, 5:00 PM33

Page 36: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

34 BUILDING GEODATABASES WITH CASE TOOLS

Tip

When to include a field in asubtypeA field should be included in asubtype only when you want toassociate a default value or domainwith it. Fields inherited fromabstract classes can be included insubtypes.

Creating a subtype

1. In the diagram, copy theclass for which you want tocreate a subtype. Paste it onthe diagram.

2. Double-click the new class.

3. Type a name for the subtype.

4. Click Attributes in theCategories window.

5. Click each field for which youdon’t want to associate adefault value or domain forthis subtype, then clickDelete to remove each one. u

21

3

4

55

CaseTools.pmd 11/7/2002, 5:00 PM34

Page 37: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 35

6. Click the subtype field andclick Properties.

7. Click the Stereotypedropdown arrow and clickthe blank stereotype to set itsstereotype to nothing.

8. Type the code for thissubtype in the InitialValuetext box.

9. Click OK.

10. To set default values anddomains for a field, click theattribute and clickProperties. u

7

8

9

Q

Q

CaseTools.pmd 11/7/2002, 5:00 PM35

Page 38: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

36 BUILDING GEODATABASES WITH CASE TOOLS

11. Click the Type dropdownarrow and click the domainyou want to associate withthe attribute as the type.

12. To associate a default valuewith this attribute, type thedefault value in theInitialValue text box.

13. Click OK.

14. Repeat steps 6 through 9until you have associateddefault values and domainswith all the attributes.

15. Click OK.

The field appears in theclass with its domain as itstype and its default value asits initial value.

R

W

E

The domain isdisplayed as the fieldtype and the defaultvalue as the initialvalue.

CaseTools.pmd 11/7/2002, 5:00 PM36

Page 39: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 37

Associating the subtypewith its parent class

1. In the UML Static Structurestencil, click Binary Associa-tion and drag and drop it onthe diagram. Connect theparent and subtype classes.

2. In the diagram, double-clickthe association. Click theStereotype dropdown arrowand click Subtype.

3. Click OK.

4. Right-click the associationand click the Shape DisplayOptions to show its nameand stereotype and to hidethe end names and cardinali-ties.

Tip

Setting the initial value forthe subtype fieldBe very careful when setting theinitial value for the subtype field inyour subtypes. Its value has to beunique across all the subtypes of aclass.

1

2

3

4

CaseTools.pmd 11/7/2002, 5:00 PM37

Page 40: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

38 BUILDING GEODATABASES WITH CASE TOOLS

Creatingrelationship rulesRelationship classes can have aset of relationship rules. Theserules control which subtypes ofobjects from the origin classcan be related to whichsubtypes of the destinationclass.

Relationship rules are repre-sented by a UML associationbetween subtypes. Multiplicityin association ends is used toset the cardinality of therelationship rule.

A value of 1..3 means at leastone and no more than threeobjects of this subtype can berelated.

The cardinality range of bothends must be compatible withthe cardinality of the parentrelationship class (in theexample, 1-1..3 is compatiblewith 1-M).

See Also

For more information on relation-ship rules, see Building aGeodatabase.

1. In the UML Static Structurestencil, click Binary Associa-tion and drag and drop it onthe diagram. Connect the twosubtypes between which youwant to create a relationshiprule.

2. Double-click the association.

3. Type the name of the rela-tionship between the parentclasses as the name for thisassociation.

4. Click one of the associationends.

5. Click Properties. u

1

3

45

9

CaseTools.pmd 11/7/2002, 5:00 PM38

Page 41: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 39

6. Type the valid cardinality asthe multiplicity of the associa-tion end.

7. Click OK.

8. Repeat steps 4 through 7 forthe other association end.

9. Click OK.

10. Right-click the associationand click the Shape DisplayOptions to show its nameand stereotype and to hidethe end names andcardinalities.

6

7

Q

CaseTools.pmd 11/7/2002, 5:01 PM39

Page 42: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

40 BUILDING GEODATABASES WITH CASE TOOLS

CreatinggeometricnetworksA geometric network is modeledwith a UML class stereotypedas GeometricNetwork. UMLbinary associations are used toassociate the network featureclasses in the model with thegeometric network.

The geometric network UMLclass and all associated featureclasses must be created underthe same feature dataset UMLpackage.

The only attribute in a geomet-ric network class defines thenetwork type. When you copythe template, the attribute isalready in the class.

Tip

Feature datasetsMake sure you have created afeature dataset before creating ageometric network. A geometricnetwork can exist only inside afeature dataset.

1. In the Model Explorer, underthe Workspace package,right-clickTemplateGeometricNetworkand click Duplicate.

2. A copy of theTemplateGeometricNetworkis created under theWorkspace package. In theModel Explorer, drag anddrop it inside the packagerepresenting the featuredataset. u

1

2

CaseTools.pmd 11/7/2002, 5:01 PM40

Page 43: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 41

3. Double-click the featuredataset diagram to open it.

4. Drag and drop the newgeometric network on thediagram.

5. Double-click the geometricnetwork to open its proper-ties.

6. Type a name for the geomet-ric network.

7. Click OK.

8. In the Model Explorer, clickBinary Association and dragand drop it on the diagram.Connect the network featureclasses to the geometricnetwork.

6

7

8

CaseTools.pmd 11/7/2002, 5:01 PM41

Page 44: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

42 BUILDING GEODATABASES WITH CASE TOOLS

Creatingconnectivity rulesConnectivity rules can bedefined among subtypes ofnetwork feature classesmodeled in a geometric network.UML associations are used todefine connectivity rules. Twotypes of connectivity rules canbe created: edge–edge rulesand edge–junction rules.

Edge–Junction connectivityrules can have specific cardi-nalities for each subtypeinvolved. In this example, onepower transformer can beconnected to up to two maincables. One of the junctionsubtypes can be marked as thedefault junction by stereotyp-ing the association end asDefault.

Edge–Edge rules are repre-sented by a UML N-aryassociation that involvestwo edges and any number ofjunctions. One of the junctionsubtypes must be marked as thedefault junction by stereotyp-ing the association end asDefault.

The rule in this example can beread as “Distribution cables canbe connected to main cablesthrough distribution transform-ers”. u

Creating an edge–junction rule

1. In the UML Static Structurestencil, click Binary Associa-tion and drag and drop it onthe diagram. Connect theedge subtypes and junctionsubtype.

2. Double-click the association.

3. Click the Stereotypedropdown arrow and clickConnRule.

4. Click one of the associationends and click Properties. u

1

3

4 4

8

CaseTools.pmd 11/7/2002, 5:01 PM42

Page 45: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 43

All geometric networks have adefault or generic junctionsubtype, also called the orphanjunction type. You can createconnectivity rules that includethe generic junction.

Both edge–junction and edge–edge rules can involve thegeneric junction.

5. Type the cardinality for thesubtype.

6. Click OK.

7. Repeat steps 4 through 6 toset the cardinality for thesecond subtype.

8. Click OK.

9. Right-click the associationand click the Shape DisplayOptions to show its nameand stereotype and to hidethe end names and cardinali-ties.

5

6

9

CaseTools.pmd 11/7/2002, 5:01 PM43

Page 46: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

44 BUILDING GEODATABASES WITH CASE TOOLS

Creating an edge–edgerule

1. In the UML Static Structurestencil, click N-ary Associa-tion and drag and drop it onthe diagram. Connect twoedge subtypes and a junctionsubtype.

2. Double-click the association.

3. Click the Stereotypedropdown arrow and clickConnRule.

4. If there is more than onejunction subtype for thisedge–edge rule, click theEnd Count dropdown arrowand click the number ofjunction subtypes.

5. Click one of the associationends and click Properties. u

1

34

5

8

CaseTools.pmd 11/7/2002, 5:01 PM44

Page 47: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 45

6. Click the Stereotypedropdown arrow and clickDefault to mark the junctionsubtype as the defaultjunction subtype in theedge–edge rule.

7. Click OK.

8. Click OK.

9. Right-click the associationand click the Shape DisplayOptions to show its nameand stereotype and to hidethe end names and cardinali-ties.

6

7

9

CaseTools.pmd 11/7/2002, 5:01 PM45

Page 48: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

46 BUILDING GEODATABASES WITH CASE TOOLS

Using the genericjunction subtype

1. In the Model Explorer,navigate to and clickGenericJunctionST. Drag anddrop it on the diagram.

2. Follow steps 1 through 9 of‘Creating an edge–junctionrule’ or steps 1 through 9 of‘Creating an edge–edgerule’, in this document, usingthe generic junction subtype.

1

2

2

CaseTools.pmd 11/7/2002, 5:01 PM46

Page 49: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 47

Extendingclasses withcustom behaviorIn addition to designingschema, you can use UML andCASE tools to generate code tocreate custom feature behavior.There are two modeling tasksassociated with this: creatingnew interfaces and creatingclass extensions. It is importantto understand that interfacesand class extensions in UMLmodels are used only whencode is generated for the model.

Interfaces are a set of relatedmethods that a custom featureagrees to implement. A customfeature may implement anynumber of interfaces. Interfacesare inherited. An interfaceimplemented by a parent classis also implemented by itschildren.

Types used in interfaces shouldbe either other interfaces orautomation-compatible types,such as long, double, DATE,and VARIANT_BOOL. UMLattributes will become proper-ties. They can be used asObject.Prop = value orvar = Object.Prop. u

Creating an interface

1. In the UML Static Structurestencil, click Class and dragand drop it on the diagram.

2. Double-click the class.

3. Type the name of theinterface in the Name box.

4. Click the Stereotypedropdown arrow and clickinterface.

5. Check the IsAbstract checkbox. u

2

3

4

5

CaseTools.pmd 11/7/2002, 5:01 PM47

Page 50: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

48 BUILDING GEODATABASES WITH CASE TOOLS

UML operations will becomemethods. They can be used asObject.Method(argument:type).

To create a read-only property,create an operation with theprefix get_. Likewise, use theprefixes put_ or putref_ tocreate write-only properties.

You can model class extensionswhen you want custom behav-ior associated with the featureclass. Class extensions require anaming convention. The namemust be formed by concatenat-ing the name of the featureclass or table withClassExtension.

Class extensions for tables arederived fromObjectClassExtension. Likewise,class extensions for featureclasses are derived fromFeatureClassExtension.

Class extensions may implementoptional interfaces, such asIObjectInspector. In addition,they may implement their owninterfaces (for example,IBuildingClassExtension).

See Also

For a detailed explanation aboutcreating custom features and classextensions, see ExploringArcObjects.

6. Click Attributes in theCategories window.

7. Click New to add a newattribute and click Properties.

8. Type a name for the newproperty.

9. Click the Type dropdownarrow and click the field type.

10. Click OK.

11. Repeat steps 7 through 10until you have added all theproperties of the newinterface. u

67

8

9

Q

CaseTools.pmd 11/7/2002, 5:01 PM48

Page 51: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 49

12. Click Operation in theCategories window.

13. Click New to add a newmethod and click Properties.

14. Type the name of themethod.

15. Click the Return typedropdown arrow and clickthe method type if it returnssomething.

16. Click OK.

17. Repeat steps 13 through 16until you have added all themethods of the newinterface.

18. Click OK.

19. In the UML Static Structurestencil, click Refinement anddrag and drop it on thediagram.

20. Connect the custom featureand the interface.

U

T

Y

P

A

CaseTools.pmd 11/7/2002, 5:01 PM49

Page 52: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

50 BUILDING GEODATABASES WITH CASE TOOLS

Tip

Class extension namingconventionClass extensions must have thename <class>ClassExtension. Forexample, a class extension for aParcels class would beParcelsClassExtension.

Creating a classextension

1. In the Model Explorer treeunder ESRI Classes, clickFeatureClassExtension anddrag and drop it onto thediagram.

2. In the UML Static Structurestencil, click Class and dragand drop a new UML classonto the diagram.

3. In the diagram, double-clickthe new class.

4. Type the name of the classfollowing the class extensionnaming convention.

5. Click OK. u

1

2

4

5

CaseTools.pmd 11/7/2002, 5:01 PM50

Page 53: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 51

6. In the UML Static Structurestencil, click Generalizationand drag and drop it onto thediagram.

7. Drag the ends of the gener-alization arrow and connectthe new class with its parent.

To add your own interfaces,follow the instructions forcreating an interface. Thereare a number of predefinedoptional interfaces you canimplement in your classextension. u

6

7

CaseTools.pmd 11/7/2002, 5:01 PM51

Page 54: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

52 BUILDING GEODATABASES WITH CASE TOOLS

8. In the Model Explorer treeunder ESRI Interfaces, clickthe optional interface anddrag and drop it onto thediagram.

9. In the UML Static Structurestencil, click Refinement anddrag and drop it onto thediagram.

10. Drag the ends of therefinement and connect theclass extension with theinterface.

11. Repeat steps 8 through 10until you have added all ofthe optional interfaces youwant to implement.

Tip

Optional interfacesYour class extension can implementall or none of the optional classextension interfaces.

8

9

Q

CaseTools.pmd 11/7/2002, 5:01 PM52

Page 55: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 53

Exporting amodel to XMIBefore you can generate yourgeodatabase schema from yourUML model, you must firstexport it to XMI.

The tools to export your UMLmodel to XMI are containedwithin Visio.

Exporting to XMI

1. In Visio, click Tools, point toMacros, point to Visio Extras,then click ESRI XMI Export.

2. Browse to navigate to adirectory where you will saveyour XMI file.

3. Type the name of the XMI file.

4. Click Save to export the UMLmodel.

5. Click OK. 1

5

4

3

CaseTools.pmd 11/7/2002, 5:01 PM53

Page 56: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

54 BUILDING GEODATABASES WITH CASE TOOLS

Checking yourmodel for errorsThe semantics checker can beused to make sure your modelsare valid. If errors are found, areport will be automaticallycreated. The report can beprinted or exported to a numberof formats.

The semantics checker workson models already exported tothe Microsoft Repository orXMI.

You should run the semanticschecker before using theSchema Wizard or CodeGeneration Wizard.

Running the semanticschecker

1. In Visio, click Tools, point toMacros, point to ESRI, thenclick Semantics_Checker.

2. Select the source of yourmodel. Models can be storedin XMI files or repositorydatabases.

3. Type the path to the XMI fileor repository database orclick Browse to navigate to it.

4. If you are using a repository,click List Models and select amodel from the list.

5. Select the model you want toverify. u

Tip

OptionsChanging the options for the reportallows you to modify the errorreport. By default the first twooptions will be checked.

1

2

3

4

5

6

CaseTools.pmd 11/7/2002, 5:01 PM54

Page 57: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 55

6. Click Check.

If errors are found, a report isgenerated listing all of themodeling errors.

A report is generated listing all of the modeling errors.

CaseTools.pmd 11/7/2002, 5:01 PM55

Page 58: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

56 BUILDING GEODATABASES WITH CASE TOOLS

Generatingschema from anXMI or MicrosoftRepositoryArcCatalog contains tools toread the XMI or MicrosoftRepository database youcreated using the UML model-ing software. The SchemaWizard guides you through theprocess of creating new featureclasses, tables, and otherpieces of your geodatabase.

Although all of the requiredinformation for the geodatabaseschema can be read directlyfrom the XMI or MicrosoftRepository, you can changecertain information. Once thewizard is finished, you will havethe schema for your designready to be populated withdata.

During the schema generationprocess, you will be presentedwith a tree view of the featuredatasets, tables, featureclasses, network featureclasses, and geometric net-works in the model.

The examples here involveobjects, features, and networkfeatures. Many of these objectsand features contain subtypeswith attribute domains anddefault values. The examples u

Adding the CASE Toolswizard to ArcCatalog

1. In ArcCatalog, click Tools andclick Customize.

2. Click the Commands tab inthe Customize dialog box.

3. Click Case Tools.

4. Drag the Schema Wizardcommand from the Com-mands list and drop it on theStandard toolbar.

The command appears onthe toolbar.

5. Click Close on the Customizedialog box.

1

4

5

2

3

The command appearson the toolbar.

CaseTools.pmd 11/7/2002, 5:01 PM56

Page 59: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 57

Connecting to an XMI fileor repository

1. In the ArcCatalog tree, clickthe geodatabase in whichyou will create the schema.

2. Click the Schema Wizardbutton to start the CaseSchema Creation Wizard.

3. A brief introduction to thewizard appears. Click Next.

Clicking the check box in theintroduction dialog box willallow you to skip the intro-duction dialog box.

also include relationshipclasses between some of theobject and feature classes.However, a UML model can beas simple as containing a singlefeature or object class.

If the schema you are generat-ing contains attribute domains,you can view the properties forthese domains, but you cannotmodify them.

Tip

Add the Schema Wizard toan existing toolbarYou can also add the SchemaWizard from the Commands listonto an existing toolbar.

See Also

For more information on how tocustomize ArcCatalog, see UsingArcCatalog and ExploringArcObjects.

1

2

3

CaseTools.pmd 11/7/2002, 5:01 PM57

Page 60: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

58 BUILDING GEODATABASES WITH CASE TOOLS

1

2

3

The geodatabase schema represented in the model isdisplayed in a tree view.

Selecting an XMI file

1. Click Model stored in XMI filein the Schema Wizard.

2. Type the name of the XMI fileor click Browse to navigate tothe XMI file you created.

3. Click Next.

A tree view of the schemarepresented in the model isdisplayed.

This may take severalminutes, depending on thesize of your object model.

CaseTools.pmd 11/7/2002, 5:01 PM58

Page 61: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 59

Tip

Microsoft RepositoryIf you are connecting to a reposi-tory stored in Microsoft SQLServer™, type the name of the opendatabase communication (ODBC)data source that stores theinformation describing how toconnect to the SQL Serverdatabase—for example,“dsn=casetools”.

2

1

3

4To connect to arepository stored inSQL Server, type theODBC data source.

Connecting to arepository

1. Click Model stored inRepository database.

2. Type the name of the data-base or click Browse andnavigate to the repository youcreated. To connect to arepository stored in SQLServer, type the ODBC datasource.

3. In most cases you will nothave to enter a usernameand password unless youspecified one while exportingthe UML model.

4. Click Next.

CaseTools.pmd 11/7/2002, 5:01 PM59

Page 62: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

60 BUILDING GEODATABASES WITH CASE TOOLS

Selecting an object model

1. If you are using a Repositorydatabase, the wizard will letyou select the model youwant to create the schema for.Select the model.

2. Click Next.

The wizard reads the model.This may take severalminutes, depending on thesize of your object model.

1

2

CaseTools.pmd 11/7/2002, 5:01 PM60

Page 63: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 61

Setting featuredatasetpropertiesThe Schema Wizard dialog boxdisplays your objects in a treeview. All of the datasets in yourobject model are selected andhave check marks beside themby default. You will need toselect each dataset in the objecttree and specify the SpatialReference.

See Also

For a detailed explanation ofspatial references, see Building aGeodatabase.

Tip

Selecting feature datasetsWhen you select a feature dataset,the schema for all of the featureclasses, geometric networks, andrelationship classes contained inthat feature dataset is also created.

1. Check the feature dataset forwhich you want to generateschema.

2. Click the Properties button toset the properties for thisfeature dataset.

Since you cannot modelspatial references in UML,you will have to set thespatial reference for thisfeature dataset.

3. Click Edit to modify thespatial reference of thefeature dataset.

4. Click OK once you have setthe spatial reference.

1

2

3

4

Tip

Spatial referenceWhen you select a feature datasetand assign it a spatial reference,all of the feature classes within thatfeature dataset share the samespatial reference. The exception isthe M-domain. Feature classes inthe same feature dataset may havedifferent M-domains.

CaseTools.pmd 11/7/2002, 5:01 PM61

Page 64: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

62 BUILDING GEODATABASES WITH CASE TOOLS

Tip

Classes that exist in ageodatabaseClasses in the object tree displayedin red indicate existing classeswithin the geodatabase.

Settingproperties forobject classes(tables)After connecting to theMicrosoft Repository or XMIfile and selecting your model,you can set properties for theobject classes (tables) fromyour model.

1. Click the table whoseproperties you want to set.

2. Click Properties.

Since this class does notstore features, a number ofproperties are unavailable.

3. If you are generating schemafor an ArcSDE™geodatabase, click thedropdown arrow and click astorage configurationkeyword. If you do not selecta keyword, DEFAULTS will beused. u

1

2

3

CaseTools.pmd 11/7/2002, 5:01 PM62

Page 65: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 63

See Also

For more information aboutrelationship class properties, see‘Setting properties for relationshipclasses’ .

Tip

Related objectsIf a class you select participates ina relationship class with anotherclass, the related class is automati-cally selected in the Catalog tree.

4. If the table in which you wantto store this class does notalready exist in the database,click the Fields tab. If thetable does exist, skip tostep 10.

5. Click a field in the list offields. If you used taggedvalues in your UML model toset the field properties, skipto step 8.

6. Type its precision if it is aninteger field, its precision andscale if it is a float field, or itslength if it is a text field.

7. Check Allow Null Values ifyou want null values to bepermitted in this field.

8. Repeat steps 5 through 7 foreach field in the table, thenskip to step 13.

9. Click the Exists tab if thetable in which you want tostore this class already existsin the database.

10. Check the check box toindicate that the tablealready exists.

11. Click Select to select thetable from a list of tables inthe database.

12. For each property in theUML class, click the field inthe existing table that willstore that property. u

7

4

5

6

E

Q

W

9

CaseTools.pmd 11/7/2002, 5:01 PM63

Page 66: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

64 BUILDING GEODATABASES WITH CASE TOOLS

13. If you chose to use ESRI-provided components for allof your classes, skip tostep 17.

14. Click the Behavior tab.

15. Click the dropdown arrow tosee a list of COM classesthat are registered on yoursystem. Click the COM classthat implements thebehavior for this table.

16. If this table has subtypes orrelationship classesassociated with it, examinetheir properties by clickingthe Relationships andSubtypes tabs.

17. Click OK.

18. Repeat steps 2 through 17for the rest of your tables.

T

Y

I

CaseTools.pmd 11/7/2002, 5:01 PM64

Page 67: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 65

Tip

Selecting classesYou can double-click the class toopen the class properties dialogbox.

Settingproperties forfeature classes ina feature datasetOnce you have completedsetting the properties for theobject classes in your model,you must do the same for thefeature classes in your model.

Tip

Spatial referenceWhen you select a feature datasetand assign it a spatial reference,all of the feature classes within thatfeature dataset share the samespatial reference.

The exception is the M-domain.Feature classes in the same featuredataset may have differentM-domains.

Standalone feature classes havetheir own spatial reference.

1. Click the feature class whosesettings you want to modify.

2. Click the Properties button toset the properties for thisclass.

3. Click the Geometry Typedropdown arrow and clickthe geometry type for thisfeature class.

4. Type the grid levels for thefeature class. Personalgeodatabase feature classescan have only one grid level.

5. If generating schema for anArcSDE geodatabase, clickthe dropdown arrow andclick a storage configurationkeyword. If you do not selecta keyword, DEFAULTS will beused.

6. Follow steps 5 through 18 of‘Setting properties for objectclasses (tables)’ in thisdocument.

7. Repeat steps 1 through 6 forthe rest of the feature classesin your feature dataset.

1

2

3

4

5

CaseTools.pmd 11/7/2002, 5:01 PM65

Page 68: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

66 BUILDING GEODATABASES WITH CASE TOOLS

Setting properties forstandalone featureclasses

1. Click the feature class whosesettings you want to modify.

2. Click the Properties button toset the properties for thisclass.

3. Click the button next toSpatial Reference to set thespatial reference for thefeature class.

4. Click the Geometry Typedropdown arrow and clickthe geometry type for thisfeature class.

5. Type the grid levels for thefeature class. Personalgeodatabase feature classescan have only one grid level.

6. If generating schema for anArcSDE geodatabase, clickthe Configuration Keyworddropdown arrow and click astorage configurationkeyword. If you do not selecta keyword, DEFAULTS will beused.

7. Follow steps 5 through 18 of‘Setting properties for objectclasses (tables)’ in thisdocument.

8. Repeat steps 1 through 6 forthe rest of the standalonefeature classes in yourmodel.

See Also

For a detailed explanation ofspatial references and how to setthem for objects in a geodatabase,see Building a Geodatabase.

1

2

5

4

3

6

CaseTools.pmd 11/7/2002, 5:01 PM66

Page 69: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 67

Setting properties for ageometric network

1. Click the geometric networkwhose settings you want tomodify.

2. Click the Properties button toset the properties for thisnetwork.

3. If generating schema for anArcSDE geodatabase, clickthe dropdown arrow and clicka storage configurationkeyword.

4. Click OK.

1

2

3

4

CaseTools.pmd 11/7/2002, 5:01 PM67

Page 70: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

68 BUILDING GEODATABASES WITH CASE TOOLS

Settingproperties forrelationshipclassesIf you did not use taggedvalues for the properties ofrelationship classes in yourUML model, you can set themin the Schema Creation Wizard.

See Also

For a detailed discussion ofprimary and foreign keys andrelationship messaging, seeBuilding a Geodatabase.

1. Click the relationship classfor which you want to set theproperties.

2. Click Properties.

3. Click the Notificationdropdown arrow and clickthe notification direction forthe relationship class.

4. Click the dropdown arrowsand click the origin primaryand foreign keys. u

2

1

3

4

CaseTools.pmd 11/7/2002, 5:01 PM68

Page 71: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

BUILDING GEODATABASES WITH CASE TOOLS 69

5. If your relationship class isnot modeled as a class withattributes, skip to step 11.

6. Click the Fields tab.

7. Click a field in the list offields. If you used taggedvalues in your UML model toset the field properties, skipto step 11.

8. Type its precision if it is aninteger field, its precision andscale if it is a float field, or itslength if it is a text field.

9. Click Allow Null Values if youwant null values to bepermitted in this field.

10. Repeat steps 1 through 9 foreach field in the relationshipclass.

11. Click OK.

12. Repeat steps 1 through 11for the rest of yourrelationship classes.

6

8

9

7

W

CaseTools.pmd 11/7/2002, 5:01 PM69

Page 72: Building Geodatabases with CaseToolsdownloads.esri.com/support/downloads/ao_/CASE_Tools_CaseTools.pdf · BUILDING GEODATABASES WITH CASE TOOLS 5 Feature datasets have a spatial reference

70 BUILDING GEODATABASES WITH CASE TOOLS

Creating theschemaThe last step of the wizardprovides a summary of theelements that will be created.After clicking Finish, thecreation of the schema will takeplace.

1. Click Next.

2. Review the options youspecified in the SchemaWizard. If you want to changeanything, click Back andchange the appropriateparameters.

3. Click Finish to generate theschema in the geodatabase.

1

3

CaseTools.pmd 11/7/2002, 5:01 PM70