CIMValidate Command

Synopsis

java -jar CIMValidate.jar [option] model_url schema_url

Description

The CIMValidate command validates an RDF model against a schema or summarises an RDF model. Both model and schema are read from XML documents conforming to the W3C RDF Model and Syntax Recommendation.

The model_url is the Uniform Resource Locator (URL) for a document containing an RDF model. For example:

mymodel.xml
data/mymodel.xml
file:/C:/data/mymodel.xml
http://www.langdale.com.au/cimxml/sample.xml

The schema_url is the URL of a document containing the schema that will be used to validate the model. (This should not be confused with the CIM version identifier or the CIM namespace URI.)

The options are:

-validate

Validates the model against the schema. This is the default if not option is supplied.

The output consists of a list of validation errors written to the standard output and a summary line written to the standard error.

Each validation error has the following form:

message (subject has predicate of object).

Only the local name of the resource (without its namespace) is given for the subject, object or predicate. Although technically ambiguous, confusion does not arise in practice and the report is easier to read.

For example:

 1 Total statements: 341
2 A type must be defined as a class (_1 has type of SubControlAreas).
3 The subject must be instance of Naming (_1 has Naming.name of HANGER18).
4 The subject must be instance of SubControlArea (_1 has SubControlArea.HostControlArea of _14). 5 The object must be instance of SubControlArea (_2 has Substation.MemberOf_SubControlArea of _1). 6 The property is not defined in the schema (_4 has BaseVoltage.nominalVoltages of 345). 7 The object must be instance of SubControlArea (_100 has Substation.MemberOf_SubControlArea of _1). 8 ModelValidationException: there are 6
model validation errors.

The interpretation of this report is as follows:

Line 1: Indicates the total number of RDF statements parsed from the model file. Each statement is a construct: (subject, predicate, object).

Line 2: Indicates the a resource, _1, was assigned a type SubControlAreas, which is not is not defined as a class in the schema.

Lines 3, 4, 5 and 7 Indicate that the type of the resource _1 is not expected as the subject or object of the given property. In this example, these errors a side-effect of the error on line 2.

Line 6 indicates that the property BaseVoltage.nominalVoltages is not part of the CIM. Technically, the statement is not in error. However, it is suspect non-CIM data was not expected.

-report

Generates a summary of the model on the standard output. For example:

Total statements: 31869
137 ACLineSegment
5 BaseVoltage
660 Bay
676 Breaker
646 BusbarSection
21 Compensator
748 ConnectivityNode

The first line indicates the number of statements parsed from the model file. The remaining lines each list a class from schema and a count of the number of resources of that class in the model. A resource is counted for a class only if its type is explicitly assigned to the class. Subclass/superclass relationships are not considered (although they are during validation).

Notes and Dependencies

Java 2.
The CIMValidate command requires a Java 2 runtime environment. The command line syntax shown assumes that the java command is installed on the user's PATH.
Schema Namespace
Depending on the form of RDF syntax used, the schema file may or may not include namespace information to fully identify the properties and classes it defines. When no explicit namespace is given (i.e. the document namespace is implied) a fixed URI http://iec.ch/TC57/2001/CIM-schema-cimu10# is substituted. This can be changed by editing the file schema.properties in the CIMValidate JAR file.
User Interface
A user interface is provided as an alternative to the command line.
Download
The CIMValidate jar file is available for download. Full source will be posted on sourceforge.

Copyright 2001 Langdale Consultants
Contact Arnold deVos for further information.