106
CIMTool Training Using CIMTool to Validate CIM RDF/XML

CIMTool Training

  • Upload
    kina

  • View
    193

  • Download
    26

Embed Size (px)

DESCRIPTION

CIMTool Training. Using CIMTool to Validate CIM RDF/XML. Introduction. The purpose of this presentation is to describe the use of CIMTool for the definition of model profiles and the validation of RDF instance files, a.k.a. CIM/XML - PowerPoint PPT Presentation

Citation preview

Page 1: CIMTool Training

CIMTool Training

Using CIMTool to Validate CIM RDF/XML

Page 2: CIMTool Training

2 CIMTool Training2

Introduction

• The purpose of this presentation is to describe the use of CIMTool for the definition of model profiles and the validation of RDF instance files, a.k.a. CIM/XML

• The use of CIMTool for the development of XML Schemas is out of the scope of this presentation

• This presentation is intended to meet the needs of Texas Nodal market participants

Page 3: CIMTool Training

3 CIMTool Training3

Contents

1. Overview of the CIM, RDF and Profiles2. CIMTool and Eclipse3. Creating a CIMTool Project4. Importing a Schema5. Creating and Editing a Profile6. Importing a Profile7. Importing a Profile from a Data Dictionary8. Generating RDF Schemas9. Importing a Model10. Validating a Model11. Importing and Validating an Incremental Model12. Updating a Schema13. Miscellaneous

Page 4: CIMTool Training

4 CIMTool Training4

CIM, RDF and Profiles

Page 5: CIMTool Training

5 CIMTool Training5

What is the CIM?

• The Common Information Model (CIM) is a standard for the electric utility industry that is intended to provide an information model that can be used to describe information exchanges

• The core CIM is an IEC standard: IEC 61970-301• There are other standards (e.g. IEC 61968 for

distribution) that leverage or extend the CIM• The CIM is a UML model composed of packages that

describe a unique subject• Each package describes a set of classes• A class describes a set of attributes and

relationships with other objects

Page 6: CIMTool Training

6 CIMTool Training6

What is RDF?

• Resource Descriptor Format (RDF) is an XML dialect that is a W3C recommendation

• RDF is used to make statements about resources in the form of subject-predicate-object expressions (called triples)

• RDF Schema files describe the classes, attributes and relationships of an information model and typically use a .rdfs extension

• RDF instance files describe object instances, and typically use a .xml extension

• RDF incremental files describe changes to a set of object instances as described by an instance file, and typically use a .xml extension

Page 7: CIMTool Training

7 CIMTool Training7

How is RDF used in CIM?

• IEC 61970-501 describes a ‘Common Information Model Resource Description Framework (CIM RDF) Schema’

• IEC 61970-452 describes a ‘CIM Transmission Network Model Exchange Profile’ that leverages RDF

• IEC 61970-552-4 describes ‘CIM XML Model Exchange Format’

Page 8: CIMTool Training

8 CIMTool Training8

RDF Statements

Subject Predicate Object

Resource(instance)

Property

Resource

Value

or

Page 9: CIMTool Training

9 CIMTool Training9

Universal Resource Identifier (URI)

• Resources are identifies using URIs

• A URI identifies either:

– A name (URN)– A location (URL)

• A portion of a URI is identified by a URI and a fragment:

– URI#fragment• Four forms/combinations:

– Full (e.g. http://myuri.org/ontology#fragment) or relative (e.g. myuri.org/ontology#fragment)

– With or without fragment

9

Page 10: CIMTool Training

10 CIMTool Training10

RDF(S) Syntax

• Schema file:

– Class: Used in RDF Schema to define a new class

– Resource: Root class for all resources

– Property: Class of all properties

– Datatype: Identifies data types

– subClassOf: Specializes a class

– range: Limits the valuesof a property

– type: Identifies the class of an individual

– about: Describes an existing resource

– Description: Used for property/value pairs about a resource

• Instance file:

– ID: Identifies a new resource

– about: Describes an existing resource

– Description: Used for property/value pairs about a resource

Page 11: CIMTool Training

11 CIMTool Training11

CIM XML

• Schemas: Describe the model in terms of classes, associations and properties are defined using RDF

• Instance files: Describe objects that make up an electrical network in accordance with the RDF schema

• Incremental files: Describe the changes to an instance file in terms of additions and deletions in both forward and reverse directions

Page 12: CIMTool Training

12 CIMTool Training12

Instance RDF Example

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cim="http://iec.ch/TC57/CIM-generic#">

<cim:IEC61970CIMVersion rdf:ID="_301">

<cim:IEC61970CIMVersion.version>cim6197011v09</cim:IEC61970CIMVersion.version>

<cim:IEC61970CIMVersion.date>2007-06-12</cim:IEC61970CIMVersion.date>

</cim:IEC61970CIMVersion>

<cim:ACLineSegment rdf:ID="_7814201">

<cim:Conductor.gch>0</cim:Conductor.gch>

<cim:Conductor.bch>.0002914</cim:Conductor.bch>

<cim:Conductor.r>3.416</cim:Conductor.r>

<cim:Conductor.x>27.749</cim:Conductor.x>

<cim:Conductor.length>95</cim:Conductor.length>

<cim:IdentifiedObject.name>AMHE400MARCLINE</cim:IdentifiedObject.name>

<cim:IdentifiedObject.localName>SEG1</cim:IdentifiedObject.localName>

<cim:ConductingEquipment.BaseVoltage rdf:resource="#_400000302"/>

<cim:Equipment.MemberOf_EquipmentContainer rdf:resource="#_487038201"/>

</cim:ACLineSegment>

<cim:ACLineSegment rdf:ID="_7842201">

<cim:Conductor.gch>0</cim:Conductor.gch>

<cim:Conductor.bch>.0003356</cim:Conductor.bch>

<cim:Conductor.r>3.926</cim:Conductor.r>

<cim:Conductor.x>31.986</cim:Conductor.x>

<cim:Conductor.length>100</cim:Conductor.length>

<cim:IdentifiedObject.name>AMHE400BOWMLINE</cim:IdentifiedObject.name>

<cim:IdentifiedObject.localName>SEG1</cim:IdentifiedObject.localName>

<cim:ConductingEquipment.BaseVoltage rdf:resource="#_400000302"/>

<cim:Equipment.MemberOf_EquipmentContainer rdf:resource="#_487036201"/>

</cim:ACLineSegment>

Page 13: CIMTool Training

13 CIMTool Training13

Incremental RDF Example

<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:cim="http://iec.ch/TC57/2007/CIM-schema-cim12#" xmlns:dm="http://iec.ch/2002/schema/CIM_difference_model#"><dm:DifferenceModel rdf:about="">

<dm:reverseDifferences rdf:parseType="Statements" xml:base="ABB40bus"><rdf:Description rdf:about="#_7842201">

<cim:Conductor.r>3.926</cim:Conductor.r><cim:Conductor.x>31.986</cim:Conductor.x>

</rdf:Description></dm:reverseDifferences><dm:forwardDifferences rdf:parseType="Statements" xml:base="ABB40bus">

<rdf:Description rdf:about="#_7842201"><cim:Conductor.r>3.93</cim:Conductor.r><cim:Conductor.x>31.99</cim:Conductor.x>

</rdf:Description><cim:Substation rdf:ID="_789133201">

<cim:IdentifiedObject.localName>CIMT</cim:IdentifiedObject.localName>

<cim:IdentifiedObject.name>CIMTEST</cim:IdentifiedObject.name>

</cim:Substation></dm:forwardDifferences>

</dm:DifferenceModel></rdf:RDF>

Page 14: CIMTool Training

14 CIMTool Training14

What is a Profile?

• The set of classes, attributes and relationships in a profile is a subset of the classes, attributes and relationships found in a schema

• The cardinality of a relationship in a profile is either the same or more restrictive than the relationship in the schema

• A profile is often given a name (e.g. CPSM)• Each profile will have an assigned namespace• Profiles are also known as ‘contextual models’• Within CIMTool, profiles are managed using an OWL format,

where a .owl extension is used• Important to note that OWL is based upon RDF• Profiles can be realized in a variety of forms, including but not

limited to RDFS, XML Schema and HTML

Page 15: CIMTool Training

15 CIMTool Training15

Information Models and Profiles

Page 16: CIMTool Training

16 CIMTool Training16

CIMTool and Eclipse

Page 17: CIMTool Training

17 CIMTool Training17

What is CIMTool?

• CIMTool is an Eclipse plugin• It provides the means to:

– Define profiles from a UML model– Import profiles from a spreadsheet– Validate profiles– Validate instance files against a profile– Validate incremental files against an instance file

and a profile– Generate XML schemas from a profile– Generate RDF schemas from a profile– … and more

Page 18: CIMTool Training

18 CIMTool Training18

What is Eclipse?

• Eclipse is a freely available, open source, integrated development environment (IDE) found at http://eclipse.org

• Think of Eclipse as a ‘workbench’

• Eclipse is most commonly used for enterprise software development using Java, but it is extendible

• Eclipse capabilities are extended by a wide number of available ‘plug-ins’, developed by a wide number of sources

• Plugins available include:

– CIMTool

– XML Schema Editor

– UML Editors

– C, C++ compilers

– … and much, much more

• Many commercial products are now delivered as Eclipse plug-ins

Page 19: CIMTool Training

19 CIMTool Training19

Preparation for Installation

• You should have a PC running a recent version of Windows, Linux or Mac OS, with at least 1GB memory

• Recommend at least 2GB free disk space (much more is recommended if you will be working with large CIM network models)

• You need an internet connection, noting that there may be 200MB of downloads required for installation

Page 20: CIMTool Training

20 CIMTool Training20

Installation Options

1. Install CIMTool and all of the necessary components in one step– Easiest approach if you do not have Java or Eclipse already

installed

2. Install Java, Eclipse and then CIMTool– In the case where you may have Java and Eclipse already

installed and need to install each component separately

Note: In some corporate environments, firewalls and security processes may prevent a user from performing some of these steps. Consult your IT organization if you have trouble performing any of these steps. In particular, the Eclipse update facility does not work through many firewalls. For this reason, the one step version is more likely to work without assistance.

Page 21: CIMTool Training

21 CIMTool Training21

Installing Java and Eclipse

• Java:

– You need a Java runtime environment (JRE)

– Java 5 JRE is currently recommended

– If you don’t have one you can download from http://java.com

• Eclipse:

– Go to http://eclipse.org

– Click on ‘Download Eclipse’

– Pick a package to download, recommend ‘Eclipse Classic’ for Windows

– You be prompted to download a zip from a mirror site, pick any one and save the zip file

– Once the Eclipse zip file is downloaded, unzip (go to http://winzip.com if you don’t have an unzipper) it into a directory such as C:\eclipse

– Create a desktop shortcut to the executable, e.g. C:\eclipse\eclipse.exe

Page 22: CIMTool Training

22 CIMTool Training22

Starting Eclipse

• Click on the Eclipse icon• The Eclipse startup dialog will

appear• Define a ‘workspace’ directory

when prompted• From the ‘Welcome’ page, click

the ‘Go to the workbench’ icon (this page is often different on different versions)

• The workbench view will then appear

Page 23: CIMTool Training

23 CIMTool Training23

Eclipse Workbench

• Initial default view before any projects are created

• Default installation supports Java development

• Help button is the key to adding new plug-ins to Eclipse

• The Package Explorer shows files and folders that exist in your workspace directory

Page 24: CIMTool Training

24 CIMTool Training24

Eclipse Hints and Tips

• Updates– Where the current version of Eclipse is 3.3.2, there are

occasionally updates that may be of interest– Eclipse can be updated using the ‘Help>Software Updates’ menu

• IDE– Until you add specific plug-ins, Eclipse is primarily a Java

integrated development environment (IDE)• Views, Frames and Tabs

– You can change views using ‘Window>Show View’– You may change the arrangement of frames within the work

bench– You may have multiple files open at once, and switch between

them using the tabs provided

Page 25: CIMTool Training

25 CIMTool Training25

Eclipse Hints and Tips

• Files, Packages and Workspaces– When you double-click on a file in the package

explorer, it will be opened in the main work area frame – It is important that you never add, modify or delete

anything inside a workspace directory with tools other than Eclipse

– If there is ever a ‘resource out of sync’ problem, you can usually correct by using the ‘refresh’ option

– You may however safely read files directly from the workspace folder if needed

Page 26: CIMTool Training

26 CIMTool Training26

Eclipse Plug-Ins

• Plug-ins provide capabilities to import, export, view, edit, process and/or create different types of files

• Eclipse plug-ins can be installed and updated from remote sites• Eclipse is preconfigured with a set of remote sites where additional

plug-ins can be found• Other remote sites of particular interest include:

– CIMTool• Provides the ability to use CIM models, schemas and profiles• See http://cimtool.org for more information beyond what is covered in this

presentation• Add a new remote site for CIMTool at http://files.cimtool.org

– hyperModel• Provides UML diagrams• See http://xmlmodeling.com for details• Add a new remote site for hyperModel at http://

download.xmlmodeling.com/hyperModel/dev/updates/site.xml

Page 27: CIMTool Training

27 CIMTool Training27

Installing CIMTool

• CIMTool is installed as a plug-in from a remote site• Using the Eclipse update facility:

1. Start Eclipse

2. Find the update facility in the menus: ‘Help > Software Updates > Find and Install...’

3. Select ‘Search for new features to install’ option and then select ‘Next’

4. Select ‘New Remote Site …’

5. On ‘New Update Site’ dialog set name=‘CIMTool’ and URL=‘http://files.cimtool.org’, then click ‘OK’

6. Verify that the new site is now in the list and checked, and then click ‘Finish’

7. On ‘Search Results’ dialog, check the box for CIMTool and then click ‘Next’

8. Accept the license terms and click ‘Next’

9. Click ‘Finish’ and wait for download to complete

10. On ‘Feature Verification’ dialog select ‘Install All’ and wait

11. When asked to restart Eclipse, click ‘Yes’

12. Eclipse will then restart with the latest CIMTool plug-in installed

Page 28: CIMTool Training

28 CIMTool Training28

Creating a CIMTool Project

Page 29: CIMTool Training

29 CIMTool Training29

CIMTool Projects

• Each Eclipse project has a named folder in the Eclipse workspace directory

• Each CIMTool project will have four sub-folders:– Incremental: for CIM XML incremental files in RDF format with a .xml

extension– Instances: for CIM XML instance files in RDF format with a .xml

extension– Profiles: for profile definitions, where

• Profile definitions are stored in an OWL format• Log files, which may identify errors, are text files with a .log extension• Depending upon the usage of CIMTool, there may also be HTML, RDFS and

XSD files

– Schema: for the CIM model in XMI format with a .xmi extension• Folders and files that have errors may include a red X on their

associated icon

Page 30: CIMTool Training

30 CIMTool Training30

Creating a New CIMTool Project

• Select ‘File > New > Project’

• Select ‘CIMTool Project’ option

• Click ‘Next’

Page 31: CIMTool Training

31 CIMTool Training31

Creating a New CIMTool Project

• Name it – e.g. ‘ERCOT18’

• Click ‘Finish’

• This will create a new folder in your workspace directory

Page 32: CIMTool Training

32 CIMTool Training32

Browsing the Project

1. Click on arrow to the left of the desired project name in the Project Explorer to expand it

2. See that project has a set of empty folders: Incremental, Instances, Profiles, Schema

3. You can expand project sub-folders to see contents

Page 33: CIMTool Training

33 CIMTool Training33

Importing a Schema

Page 34: CIMTool Training

34 CIMTool Training34

Importing a Schema

• Schemas describe the classes, attributes and relationships defined by a UML model

• Anything defined by a profile MUST be described within the UML model

• Schemas must be in a suitable XMI format for import• The XMI files are typically generated from the CIM

UML model created/maintained using Rose or Enterprise Architect

• Schemas will be stored in the ‘Schema’ folder of the project

• There is typically one schema for a project, although there are cases where there may be more than one

Page 35: CIMTool Training

35 CIMTool Training35

Schema in a UML Tool

Page 36: CIMTool Training

36 CIMTool Training36

Exporting UML Model as XMI

• In Enterprise Architect select the top-level package

• Select Project > Import/Export > Export Package to XMI

Page 37: CIMTool Training

37 CIMTool Training37

Exporting XMI from UML Tool

• Use export options shown to the right

• Export as UML 1.4

• Unselect ‘Enable full EA Roundtrip’

• Select ‘Unisys/Rose format’ option

• Enter file name for XMI file

• Click on Export button

Page 38: CIMTool Training

38 CIMTool Training38

Schema Import within CIMTool

• Schemas are imported when creating a new CIMTool project• Schemas can also be added to supplement an existing schema• Schemas can also replace an existing schema, as in the case

of a new CIM version

Page 39: CIMTool Training

39 CIMTool Training39

Initial Schema Import

1. Select ‘File > Import’

2. Note the different import options under CIMTool

3. Select ‘Import Schema’ option

4. Click ‘Next’

Page 40: CIMTool Training

40 CIMTool Training40

Initial Schema Import

1. Browser to find XMI file to import

2. Check the project into which it is to be imported

3. Edit namespace (if necessary)

4. Click ‘Finish’

Page 41: CIMTool Training

41 CIMTool Training41

Browsing the Project

1. In Project Explorer, click on arrow to the left of project name to expand it

2. Click on arrow to the left of Schema to expand it

3. Note that schema is now present

4. Right click on the file name to see properties and options

Page 42: CIMTool Training

42 CIMTool Training42

Browsing the Project Model

• Project Model tab can be opened from Window > Show View > Other… and then by picking CIMTool/Project Model option

• The contents of the model as defined by the schema can then be viewed

Page 43: CIMTool Training

43 CIMTool Training43

Key Icons Used Within CIMTool

Icon Description

Folder

Class

Attribute

Reference

Relationship

Inverse relationship

Subclass

Superclass

Rules

Enumeration

Enum value

Page 44: CIMTool Training

44 CIMTool Training44

Creating and Editing a Profile

Page 45: CIMTool Training

45 CIMTool Training45

Creating a New Profile

• There are three ways to create a new profile:

1. Create it from scratch within CIMTool

2. Import an OWL profile previously constructed using CIMTool

3. Import the profile from a data dictionary spreadsheet• Once created, profiles are stored in the ‘Profiles’ folder of the

project• A project may have many profiles• Each profile will have a namespace• This following slides describe the creation of a new profile

using the edit capabilities within CIMTool

Page 46: CIMTool Training

46 CIMTool Training46

Creating a New Profile

1. Select ‘File > New > Other …’

Page 47: CIMTool Training

47 CIMTool Training47

Creating a New Profile

1. Select ‘CIMTool Profile’ option

2. Click ‘Next’

Page 48: CIMTool Training

48 CIMTool Training48

Creating a New Profile

• Click on checkbox for the desired project

• Assign a profile name (e.g. ERCOT18)

• Update namespace (if necessary)

• Click ‘Finish’

Page 49: CIMTool Training

49 CIMTool Training49

Browsing the Project

• Click on arrows in Project Explorer frame to expand folders

• Double click on the <profile>.owl file name in the Project Explorer to open it

• Click on the profile name in the Outline window

• In the Project Explorer frame you can always right click on a file name to see options

Page 50: CIMTool Training

50 CIMTool Training50

Adding Classes to Profile

• First step is to add classes to profile

• Can browse through model on the right side of the Add/Remove tab

• Can select one or more classes on right side of Add/remove tab

• Classes are moved by clicking on <

Page 51: CIMTool Training

51 CIMTool Training51

Adding a Property to a Profile

• Click on a class in the Outline

• Properties are shown on the right side of the Profile Add/Remove tab

• Click on property name on right side

• Click on ‘<‘ to move property to left side

Page 52: CIMTool Training

52 CIMTool Training52

Adding a Property to a Profile

• View after property is moved

• New profile property is seen on Outline view and the left side of the Add/Remove tab

• You can remove properties by using the >

Page 53: CIMTool Training

53 CIMTool Training53

Adding a Property to Profile

• Can move more than one property at a time

Page 54: CIMTool Training

54 CIMTool Training54

Adding a Property to Profile

• View after multiple properties are moved

Page 55: CIMTool Training

55 CIMTool Training55

Importing a Profile

Page 56: CIMTool Training

56 CIMTool Training56

Importing a Profile

• Sometimes it is desirable to use another profile definition as a starting point for a profile definition

• CIMTool saves profile definitions in an OWL format

• Profile definitions from another project or workspace can be imported to create new profiles

Page 57: CIMTool Training

57 CIMTool Training57

Importing Profiles into CIMTool

• Select ‘File > Import’• Note the different import options

under CIMTool• On ‘Import’ dialog select

‘CIMTool – Import Profile’ option

• Check the project to import into

• Browse to find the file to import• Click ‘Next’

Page 58: CIMTool Training

58 CIMTool Training58

Importing Profile from Data Dictionary

Page 59: CIMTool Training

59 CIMTool Training59

Importing Profiles

• The Siemens IMM product can generate a Data Dictionary in the form of an Excel spreadsheet

• The spreadsheet can define one or more profiles• Note that the spreadsheet can be maintained

independently of any particular product• The Data Dictionary defines the classes, attributes

and relationships that comprise one or more profiles• This can be imported into CIMTool to define a profile

Page 60: CIMTool Training

60 CIMTool Training60

Data Dictionary

• Siemens IMM can generate an Excel spreadsheet that describes the contents of one or more profiles

• Tabs exist for Classes, Attributes, Associations, Data types, Enumerations and Units

Page 61: CIMTool Training

61 CIMTool Training61

Importing Spreadsheet

• Can import the Data Dictionary spreadsheet as a profile

• File>Import• Select ‘Import

Spreadsheet as Profile’ option

Page 62: CIMTool Training

62 CIMTool Training62

Importing Spreadsheet

• The spreadsheet may identify one or more profiles

• Can select which profiles to construct

• Can only construct one at a time

Page 63: CIMTool Training

63 CIMTool Training63

Importing Spreadsheet

• Need to identify the project in which the profile will be created

• The name of the profile is set by default, but can be modified

Page 64: CIMTool Training

64 CIMTool Training64

Importing Spreadsheet

• New profile (.owl file) is created if there are not fatal errors

• A log file is created that identifies any errors

Page 65: CIMTool Training

65 CIMTool Training65

Importing Spreadsheet

• A log file (.log) is generated with the profile to identify errors, if any

• The log file identifies what could not be found for inclusion into the profile definition

Page 66: CIMTool Training

66 CIMTool Training66

Extending the Spreadsheet

You can also create a new profile definition in the spreadsheet for import into CIMTool using the following steps:

1. Insert new profile columns into the ‘Classes’, ‘Attributes’ and ‘Associations’ tabs

2. Provide the same profile name on row one of each of the added columns

3. Set the value of each new cell to ‘TRUE’ or ‘FALSE’

4. Run the spreadsheet import process as described previously

5. Look for errors in the log file

Page 67: CIMTool Training

67 CIMTool Training67

Generating RDF Schemas

Page 68: CIMTool Training

68 CIMTool Training68

Generating RDF Schemas

• Load the desired profile

• Select the ‘Summary’ tab

Page 69: CIMTool Training

69 CIMTool Training69

Generating RDF Schemas

• Check ‘Builder for legacy-rdfs’

• Check any other desired builder options

• Click on ‘File>Save’

Page 70: CIMTool Training

70 CIMTool Training70

Generated RDF Schema

• To view the actual RDFS, right click file name in Project Explorer

• Then select ‘Open With > Text Editor’ option

Page 71: CIMTool Training

71 CIMTool Training71

Example RDF Schema

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:j.0="http://iec.ch/TC57/CIM-generic#"

xmlns:cims="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#"

xmlns:j.1="http://langdale.com.au/2005/UML#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<rdf:Property rdf:about="http://iec.ch/TC57/CIM-generic#Conductor.bch">

<j.1:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section.</rdfs:comment>

<rdfs:label>bch</rdfs:label>

<cims:dataType>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#Susceptance"/>

</cims:dataType>

<rdfs:domain>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#Conductor"/>

</rdfs:domain>

<cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>

</rdf:Property>

<rdf:Property rdf:about="http://iec.ch/TC57/CIM-generic#Load.mWColdPickUpFactor">

<j.1:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>The amount of nominal feeder MW that is picked up cold, in percent.</rdfs:comment>

<rdfs:label>mWColdPickUpFactor</rdfs:label>

<cims:dataType>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#PerCent"/>

</cims:dataType>

<rdfs:domain>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#Load"/>

</rdfs:domain>

<cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>

</rdf:Property>

Page 72: CIMTool Training

72 CIMTool Training72

CIMTool Output Options

• CIMTool can generate several ‘styles’ of RDF or OWL as outputs for profile definitions, including:– Legacy RDFS (currently the most commonly used)– Legacy nested RDFS– Simple OWL– Simple nested OWL

• Where the following slides provide examples of each style, the Legacy RDFS style is currently the most commonly used

• CIMTool can also generate XML Schemas and HTML as outputs, although the details and options for XSD generation are outside the scope of this presentation

Page 73: CIMTool Training

73 CIMTool Training73

Legacy RDFS

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:j.0="http://iec.ch/TC57/CIM-generic#"

xmlns:cims="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#"

xmlns:j.1="http://langdale.com.au/2005/UML#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >

<rdf:Description rdf:about="http://iec.ch/TC57/CIM-generic#SynchronousMachine.x">

<j.1:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>Positive sequence reactance of the synchronous machine.</rdfs:comment>

<rdfs:label>x</rdfs:label>

<cims:dataType rdf:resource="http://iec.ch/TC57/CIM-generic#Reactance"/>

<rdfs:domain rdf:resource="http://iec.ch/TC57/CIM-generic#SynchronousMachine"/>

<cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>

<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>

</rdf:Description>

<rdf:Description rdf:about="http://iec.ch/TC57/CIM-generic#PenaltyFactor">

<rdfs:comment>Defined as: 1 / ( 1 - Incremental Transmission Loss); with the Incremental Transmission Loss expressed as a plus or minus value. The typical range of penalty factors is (0.9 to 1.1).</rdfs:comment>

<rdfs:label>PenaltyFactor</rdfs:label>

<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>

</rdf:Description>

<rdf:Description rdf:about="http://iec.ch/TC57/CIM-generic#TransformerWinding">

<rdfs:subClassOf rdf:resource="http://iec.ch/TC57/CIM-generic#ConductingEquipment"/>

<cims:belongsToCategory rdf:resource="http://iec.ch/TC57/CIM-generic#Package_CIMWires"/>

<rdfs:comment>A winding is associated with each defined terminal of a transformer (or phase shifter).</rdfs:comment>

<rdfs:label>TransformerWinding</rdfs:label>

<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>

</rdf:Description>

Page 74: CIMTool Training

74 CIMTool Training74

Nested Legacy RDFS

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:j.0="http://iec.ch/TC57/CIM-generic#"

xmlns:cims="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#"

xmlns:j.1="http://langdale.com.au/2005/UML#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<rdf:Property rdf:about="http://iec.ch/TC57/CIM-generic#Load.mWColdPickUpFactor">

<j.1:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>The amount of nominal feeder MW that is picked up cold, in percent.</rdfs:comment>

<rdfs:label>mWColdPickUpFactor</rdfs:label>

<cims:dataType>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#PerCent"/>

</cims:dataType>

<rdfs:domain>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#Load"/>

</rdfs:domain>

<cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>

</rdf:Property>

<rdf:Property rdf:about="http://iec.ch/TC57/CIM-generic#SynchronousMachine.x">

<j.1:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>Positive sequence reactance of the synchronous machine.</rdfs:comment>

<rdfs:label>x</rdfs:label>

<cims:dataType>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#Reactance"/>

</cims:dataType>

<rdfs:domain>

<rdfs:Class rdf:about="http://iec.ch/TC57/CIM-generic#SynchronousMachine"/>

</rdfs:domain>

<cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>

</rdf:Property>

Page 75: CIMTool Training

75 CIMTool Training75

Simple OWL

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:j.0="http://iec.ch/TC57/CIM-generic#"

xmlns:owl="http://www.w3.org/2002/07/owl#"

xmlns:uml="http://langdale.com.au/2005/UML#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >

<rdf:Description rdf:nodeID="A0">

<owl:onProperty rdf:resource="http://iec.ch/TC57/CIM-generic#ShuntCompensator.maximumkV"/>

<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</owl:maxCardinality>

<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Restriction"/>

</rdf:Description>

<rdf:Description rdf:nodeID="A1">

<owl:onProperty rdf:resource="http://iec.ch/TC57/CIM-generic#GeneratingUnit.baseMW"/>

<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</owl:maxCardinality>

<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Restriction"/>

</rdf:Description>

<rdf:Description rdf:nodeID="A2">

<owl:onProperty rdf:resource="http://iec.ch/TC57/CIM-generic#IdentifiedObject.aliasName"/>

<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</owl:maxCardinality>

<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Restriction"/>

</rdf:Description>

<rdf:Description rdf:about="http://iec.ch/TC57/CIM-generic#SynchronousMachine.x">

<uml:hasStereotype rdf:resource="http://langdale.com.au/2005/UML#attribute"/>

<rdfs:comment>Positive sequence reactance of the synchronous machine.</rdfs:comment>

<rdfs:label>x</rdfs:label>

<rdfs:subPropertyOf rdf:resource="http://iec.ch/TC57/CIM-generic#Reactance"/>

<rdfs:domain rdf:resource="http://iec.ch/TC57/CIM-generic#SynchronousMachine"/>

<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>

</rdf:Description>

Page 76: CIMTool Training

76 CIMTool Training76

Nested Simple OWL

<?xml version="1.0"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:j.0="http://iec.ch/TC57/CIM-generic#"

xmlns:owl="http://www.w3.org/2002/07/owl#"

xmlns:uml="http://langdale.com.au/2005/UML#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<owl:Class rdf:about="http://iec.ch/TC57/CIM-generic#RegularTimePoint">

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty>

<owl:DatatypeProperty rdf:about="http://iec.ch/TC57/CIM-generic#RegularTimePoint.sequenceNumber"/>

</owl:onProperty>

<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

>1</owl:maxCardinality>

</owl:Restriction>

</rdfs:subClassOf>

<rdfs:subClassOf>

<owl:Restriction>

<owl:onProperty>

<owl:DatatypeProperty rdf:about="http://iec.ch/TC57/CIM-generic#RegularTimePoint.value1"/>

</owl:onProperty>

<owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"

>1</owl:maxCardinality>

</owl:Restriction>

</rdfs:subClassOf>

Page 77: CIMTool Training

77 CIMTool Training77

HTML Documentation

• HTML option generates a single HTML file with description of all classes

• Hyperlinks allow navigation between class descriptions and type definitions

Page 78: CIMTool Training

78 CIMTool Training78

Importing a Model

Page 79: CIMTool Training

79 CIMTool Training79

Importing a Model

• In order to validate a model, it must first be imported• Model files to be imported are in a CIM/XML RDF format with

a .xml extension• Model files can be very large, as much as 2GB in size• The import process can take many minutes• The resulting model is placed in the ‘Instances’ folder of the

project

Page 80: CIMTool Training

80 CIMTool Training80

Importing a Model

• Select ‘File > Import’• Note the different import options

under CIMTool• On ‘Import’ dialog select

‘Import Model (CIM/XML file)’ option

• Click ‘Next’• Check the project to import

into• Browse to find the file to import• Revise the namespace URI as

appropriate (e.g. http://iec.ch/TC57/CIM-generic# )

• Select an appropriate profile• Click ‘Next’

Page 81: CIMTool Training

81 CIMTool Training81

Importing a Model

• Change the file name if you wish to save to a different sub folder

• Check ‘Replace existing model’ if you wish to overwrite

• Click ‘Finish’• Wait for the import to

complete, as it may take several minutes (up to an hour for a very large model)

• Watch the progress icon at the bottom of Eclipse where it says ‘Importing model …’

Page 82: CIMTool Training

82 CIMTool Training82

Imported Model

• The imported RDF model is stored within the Instances folder of the project

• Errors are recorded in log files• A folder is created to store the model in typically many smaller files

that have a .ttl extension• The .ttl files are in Terse RDF Triple Language format (more compact

than CIM XML)

@prefix : <http://iec.ch/TC57/2007/network#> .@prefix local: <http://langdale.com.au/2007/SplitModel/local212a30f0#> .@prefix split: <http://langdale.com.au/2007/SplitModel#> .@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix cim: <http://iec.ch/TC57/2006/CIM-schema-cim10#> .@prefix spc: <http://www.siemens-ptd/SHIMM1.0#> .@prefix etx: <http://www.ercot.com/CIM11R0/2007/1.8/extension#> .

split:document split:hasHash """118"""^^xsd:integer .split:document split:hasModulus """128"""^^xsd:integer .

:_e2cab9b4-41dc-41f4-bb8e-9e9f6a4a53bf rdf:type cim:Company .:_e2cab9b4-41dc-41f4-bb8e-9e9f6a4a53bf cim:IdentifiedObject.name """ACN ENERGY INC (LSE)""" .:_e2cab9b4-41dc-41f4-bb8e-9e9f6a4a53bf etx:Company.DUNS """81791134""" .:_e2cab9b4-41dc-41f4-bb8e-9e9f6a4a53bf cim:IdentifiedObject.aliasName """""" .:_2d21e40e-5b73-4f03-b275-bc56b22fb981 rdf:type cim:Company .

Page 83: CIMTool Training

83 CIMTool Training83

Validating a Model

Page 84: CIMTool Training

84 CIMTool Training84

Validating a Model

• Validation of the model occurs when a model is imported

• Errors are identified in log files in the ‘Instances’ folder of the project with a name in the form <profile>.log

• If errors exist, a diagnostic file is created which can be browsed

• CIMTool has a default set of validation rules, where the rule file is named <profile>.split-rules

• Rules can be edited and extended

Page 85: CIMTool Training

85 CIMTool Training85

Example Validation Errors

• Undefined classes

• Undefined properties

• Instantiation of abstract classes

• Illegal cardinality on an association (e.g. more or less associations than expected)

• Range violation for a data item

• Illegal domain of a property

• Base voltages for conducting equipment connected at a connectivity node do not agree

• Isolated nodes

• Untyped objects

• Missing or extra terminal

• Duplicate properties

• Unexpected loop

Page 86: CIMTool Training

86 CIMTool Training86

Browsing Diagnostic File

Page 87: CIMTool Training

87 CIMTool Training87

Creating Validation Rules

• Select File > New > Other

• Pick CIMTool Validation Rules option

• Click Next

• Pick the Project and Profile

• Recommended to copy standard rules

• A new rules file for the profile is created

• The rule file can be edited using the text editor

Page 88: CIMTool Training

88 CIMTool Training88

Editing Validation Rules

• Rules file is opened for editing by right clicking on the rule file in the Project Explorer and then using Open with > Text Editor

Page 89: CIMTool Training

89 CIMTool Training89

Validation Rule Language

• Rules are in the form: Problem( … ) <- clause1 clause2 clause3

• This is an extension of the Jena rule language

• Example rule to test that connectivity node is referenced by at least two terminals:[ -> [ problem("Isolated node" topol:ConnectivityNode "expect

two or more terminals. Subject" ?n "has less.") <- (?n rdf:type topol:ConnectivityNode) countLessThan(2 * topol:Terminal.ConnectivityNode ?n)]]

Page 90: CIMTool Training

90 CIMTool Training90

Importing and Validating an Incremental Model

Page 91: CIMTool Training

91 CIMTool Training91

Importing Incremental CIM/XML

• First step is to import an incremental CIM/XML file using File > Import and then select CIMTool/Import Incremental CIM/XML file

Page 92: CIMTool Training

92 CIMTool Training92

Importing Incremental CIM/XML

• Must have imported a base instance model BEFORE attempting this

• Need to browse to select file

• Be sure to set namespace URI (e.g. http://iec.ch/TC57/CIM-generic# )

• Need to select the appropriate base model

• Errors will be reported in a log file

Page 93: CIMTool Training

93 CIMTool Training93

Validating an Incremental Model

• Validation occurs when the model is imported• Errors are identified in log files in the ‘Incremental’ folder of the

project with a name in the form <profile>.log• If errors exist, a diagnostic file is created which can be

browsed

Page 94: CIMTool Training

94 CIMTool Training94

Browsing Diagnostic File

Page 95: CIMTool Training

95 CIMTool Training95

Updating a Schema

Page 96: CIMTool Training

96 CIMTool Training96

Updating a Schema in CIMTool

• From time to time, there may be updates to the UML model. These updates will result in a revised XMI file

• You should not directly replace a file in a Eclipse/CIMTool workspace

• You should instead, using Eclipse File menu options:

1. Delete the old schema

2. Import the new schema• Be sure that the correct namespace is entered

Page 97: CIMTool Training

97 CIMTool Training97

Namespaces

• A commonly used namespace is http://iec.ch/TC57/CIM-generic#

• If namespaces do not match between schema, profiles and the model files errors may be encountered

• Default namespaces to be used by CIMTool can be changed using Window > Preferences and selecting CIMTool option

Page 98: CIMTool Training

98 CIMTool Training98

Changing Namespaces

• Namespaces can be changed by right clicking on a file name in the Project Explorer and then selecting ‘properties’

• The namespace is shown on the CIMTool property dialog

• Namespace can be changed as desired

• Note that this may impact existing profile definitions

Page 99: CIMTool Training

99 CIMTool Training99

Miscellaneous

Page 100: CIMTool Training

100 CIMTool Training100

Exporting a Project

• It is often necessary to export a project for use by others, or use on other computers

• Use File > Export

• Select Archive File option

• Select Next

Page 101: CIMTool Training

101 CIMTool Training101

Exporting a Project

• Need to select output format, ZIP is usually best

• Need to select output file name

• Project can be later imported back into Eclipse using File > Import

Page 102: CIMTool Training

102 CIMTool Training102

Switching Workspaces

• Sometimes it is necessary to move or change the location of your workspace folder, or to use multiple workspaces

• To point Eclipse to the new workspace folder use File > Switch Workspace

• Select the desired workspace folder

• Eclipse will then update settings and restart

Page 103: CIMTool Training

103 CIMTool Training103

Renaming Resources

• Sometimes it is necessary to rename projects, folders within a project or files within a folder

• It is important to do this using Eclipse, instead of directly making changes to the resource outside of Eclipse

• To rename, right click on the desired resource in the Project Explorer and select ‘Rename’

• Now you can change the name of the resource

Page 104: CIMTool Training

104 CIMTool Training104

Changing CIMTool Preferences

• Preferences can be changed using Window > Preferences and selecting CIMTool option

• Select ‘Apply’ and ‘OK’ after editing to save

Page 105: CIMTool Training

105 CIMTool Training105

CIMTool and Eclipse Updates

• Occasionally there will be updates to Eclipse and plugins like CIMTool

• Use Help > Software Updates > Find and Install

• The search for Updates option may take some time

• A quicker option to just update CIMTool is to use the Search for New Features to Install option

Page 106: CIMTool Training

106 CIMTool Training106

Where Do I Get …

• CIMTool and Eclipse:– http://eclipse.org – http://cimtool.org

• CIM:– http://www.ucaiug.org/CIMug

• IEC Standards:– http://www.iec.ch