E-Terrasource Metamodel Guide
E-Terrasource Metamodel Guide
Copyright © 2011, 2012 ALSTOM Grid Inc. or Affiliate. All Rights Reserved.
Trademarks
“ESCA” and “HABITAT” are registered trademarks of ALSTOM Grid Inc. “eterra” is a
registered trademark and/or service mark of E-Terra, LLC, licensed for use by
ALSTOM Grid Inc. in connection with its e-terra family of products and services.
Other product and company names in these materials may be trademarks or registered
trademarks of other companies, and are the property of their respective owners. They are
used only for explanation and to the respective owners’ benefit, without intent to infringe.
Contents
3. Metamodel Validation......................................................................... 77
4. Metamodel Exports............................................................................. 79
4.1 Exporting an Upgrade Script ................................................................................. 79
4.2 Exporting an Installation Script.............................................................................. 82
4.3 Exporting a Validation Script ................................................................................. 85
4.4 Exporting Metamodel HTML Documentation ........................................................ 88
4.5 Dumping a Metamodel Project.............................................................................. 91
4.6 Dumping a Metamodel Workspace....................................................................... 93
Figures
Figure 1: Metadata at Installation .................................................................................... 5
Figure 2: Upgrading the Metadata................................................................................... 7
Figure 3: CIM Model and Profiles.................................................................................... 8
Figure 4: CIM Import Process ......................................................................................... 9
Figure 5: Business Model Schema................................................................................ 13
Figure 6: metaNamespaceAuthority Property Sheet..................................................... 15
Figure 7: metaSchemaNamespace Property Sheet...................................................... 16
Figure 8: metaSchema Property Sheet ......................................................................... 17
Figure 9: metaSchemaVersion Property Sheet Showing Deep Copy ........................... 18
Figure 10: metaEntity Property Sheet ........................................................................... 20
Figure 11: metaEntityVersion Property Sheet Showing Deep Copy ............................. 22
Figure 12: Nested Groups in Tables Explorer ............................................................... 23
Figure 13: metaEntityGroup Property Sheet ................................................................. 23
Figure 14: metaSchemaVerEntityVer Property Sheet................................................... 25
Figure 15: metaEntityInheritance Property Sheet ......................................................... 26
Figure 16: Example Use of Enumeration Property........................................................ 27
Figure 17: metaProperty Property Sheet....................................................................... 28
Figure 18: Relationship Modeling.................................................................................. 34
Figure 19: Database Representation ............................................................................ 34
Figure 20: Transformation Object Representation ........................................................ 34
Figure 21: Duplicate/Conflicting Relationship Model..................................................... 35
Figure 22: Non-Conflicting Relationship Model ............................................................. 35
Figure 23: metaRelationship Property Sheet ................................................................ 36
Figure 24: metaEnumType Property Sheet................................................................... 40
Figure 25: metaEnumMember Property Sheet.............................................................. 41
Figure 26: metaPropertyGroup Property Sheet............................................................. 42
Figure 27: metaPropertyCondition Property Sheet ....................................................... 43
Figure 28: metaComputation Property Sheet................................................................ 44
Figure 29: metaEntityKey Property Sheet ..................................................................... 48
Figure 30: metaEntityKeyProperty Property Sheet........................................................ 49
Figure 31: Validation Schema ....................................................................................... 50
Figure 32: metaValModule Property Sheet ................................................................... 52
Figure 33: metaValSequence Property Sheet............................................................... 53
Figure 34: metaValSeqModule Property Sheet............................................................. 54
Figure 35: metaValPrerequisite Property Sheet............................................................ 55
Figure 36: Validation Rule Editor................................................................................... 55
Figure 37: Validation Rule Property Sheet .................................................................... 59
Figure 38: Validation Check Property Sheet ................................................................. 60
Figure 39: Validation Variable Property Sheet .............................................................. 62
Figure 40: metaMsgDef Property Sheet........................................................................ 65
Figure 41: metaMsgDefText Property Sheet................................................................. 65
Figure 42: Deep Copy Schema ..................................................................................... 67
Tables
Table 1: Business Model Schema Tables..................................................................... 14
Table 2: Validation Tables............................................................................................. 51
Table 3: Deep Copy Tables .......................................................................................... 67
Table 4: CIM Profile Tables........................................................................................... 70
Conventions
The following conventions are used throughout this document.
Commands that are particular to an operating system are shown with the
corresponding prompt symbol.
Command Prompts
Operating Prompt Description
System
Linux % All commands preceded by a percent sign prompt
(%) are issued from a Linux terminal window.
Note that all Linux commands are case-sensitive.
Windows > All commands preceded by a greater than sign
prompt (>) are issued from the Windows
command-line window.
All Operating The absence of any prompt character before a
Systems command indicates that the command is valid on
all operating systems.
Command Strings
Operating Delimiter Description
System
Linux Italics Text in italics indicates information you must
supply. (*)
Linux [] Text enclosed in square brackets “[ ]” indicates
optional qualifiers, arguments, or data. (*)
All Operating Select When used in command strings, the term “Select”
Systems means placing the pointer over the specified item
and pressing the left (default) mouse button.
(*) Note: All Linux commands are case-sensitive and must be typed exactly as
shown.
1.1 Terminology
The following terminology is used throughout this document:
• Business model schema – This is a representation of a modeling
domain, such as a power system, organization chart, or solar system.
In the context of this document, the business model schema is
expressed as a set of entities, attributes, and relationships between
entities — very similar to a Unified Modeling Language (UML) static
model diagram or class diagram. In other contexts, the term “domain
model” is sometimes used, although this document purposely avoids
that term.
• Common Information Model (CIM) – CIM is an industry standard
power system model, expressed in UML. The specific standard is
International Electrotechnical Committee (IEC) 61970, which includes
documents related to power system control and communication.
Although e-terrasource can be used to express virtually any business
model, it is delivered with metadata that supports a CIM-based power
system model, with extensions to support Alstom Grid’s e-terra family
of products.
• Common Power System Model (CPSM) – This is an industry
standard CIM “profile” used for model exchange, for the purposes of
running power flow and state estimation applications.
1.3 Versioning
There are three main reasons that the business model schema changes
over time:
• New versions of industry standard models – As new versions of CIM
are released by the IEC, schema changes may need to be reflected in
the e-terrasource metamodel.
• New versions of Alstom Grid products – Since e-terrasource is the
modeling tool for the e-terra family of products, new product versions
may result in changes to the business model schema to support new
modeling requirements.
• Customer extensions – During deployment of a new system, or as
business requirements change over time, there are frequently
customer-specific changes to the business model schema.
e-terrasource is designed to accommodate changes to the business
model schema by supporting versioning of the schema over time. As
entities, properties, and relationships are added, removed, and modified,
e-terrasource fully supports evolution of the schema by handling
migration of model data from version to version.
e-terrasource
Metadata
Master Model
Tables
Tables
(Run Time)
Metadata
Installation
Script
(*.sql)
e-terrasource
Metadata
Master Model
Tables
Tables
(Run Time)
Metadata
Upgrade
Script
(*.sql)
2.2.1.1 metaNamespaceAuthority
The metaNamespaceAuthority table is used to specify organizations that
have authority to build the business model, or portions of it. Information
from this table does not appear in the e-terrasource UI.
2.2.1.11 metaRelationship
The metaRelationship table is used to define relationships between
entities. These generally correspond to class associations in UML and
foreign keys with referential constraints in a database.
If a relationship field does not point to a valid entity, a referential
constraint violation occurs. For more information about constraint
violations, refer to the e-terrasource User’s Guide.
e-terrasource does not allow an entity version to be modified after it has
been generated. Therefore, most changes to metaRelationship records
require a new metaEntityVersion to be created. Failure to do so results in
an error when you attempt to execute your upgrade script:
“Table <%table> version <%version> cannot have any physical
characteristics modified because it has already been generated”.
The fields that can be modified without creating a new entity version are
tagged below with “[Modifiable]”. If you change any other fields, a new
schema version must be created.
When creating a relationship between two entities, it is important to model
it correctly, to avoid potential conflicts with other relationships in both the
resulting database model and the transformation subsystem’s object
model.
− Value
− Column
− Reference
− Collection
− Column List
2.2.3.1 metaDeepCopy
The metaDeepCopy table is used to define the deep copy operations for
an entity.
In order to set up deep copy for a hierarchy of entities, first define a
metaDeepCopy for every entity in the hierarchy. Then, under the top-level
entity in the hierarchy, create one or more metaRecursiveCopy records to
copy its children. Then create metaRecursiveCopy records under the
children to copy grandchildren, repeating this process to the desired
depth.
2.2.4.1 metaCIMProfile
The metaCIMProfile table is used to define CIM profiles. Generally
speaking, a new CIM profile is created for the purposes of:
• Filtering the entities, properties, and relationships that should be
included in the CIM/XML file.
• Defining custom mapping for entities, properties, and relationships.
For this reason, it is typical to define a new CIM profile for each type of
external system that e-terrasource sends CIM/XML data to, or receives
CIM/XML data from.
2.2.4.1.2 Export
On export, both “Serialize default values” and “Serialize null values” are
considered as follows:
Serialize Serialize Value in Result
Default Null Workspace
Values Values
Yes Yes Null value The value is not exported to
the ETS file.
Yes Yes Default value The value is not exported to
the ETS file.
Yes Yes Other value The value is exported to the
ETS file.
Yes No Null value The null value is exported to
the ETS file.
Yes No Default value The value is not exported to
the ETS file.
Yes No Other value The value is exported to the
ETS file.
No No Null value The null value is exported to
the ETS file.
No No Default value The default value is exported
to the ETS file.
No No Other value The value is exported to the
ETS file.
No Yes Null value The value is not exported to
the ETS file.
4. Click the Edit button to view or change the file name, schema name, or
schema version.
5.1 Structure
A metadata upgrade script is structured so that it first creates all new
metadata objects, then modifies existing objects, and finally deletes
obsolete objects. The script also takes care to:
• Create parent objects before creating children objects
• Delete children objects before deleting parent objects
A metadata installation script is structured so that it creates all metadata
objects, taking care to create all parent objects before creating children
objects.