CimBios.Core.CimModel.DataModel 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CimBios.Core.CimModel.DataModel --version 1.0.0
                    
NuGet\Install-Package CimBios.Core.CimModel.DataModel -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CimBios.Core.CimModel.DataModel" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CimBios.Core.CimModel.DataModel" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CimBios.Core.CimModel.DataModel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CimBios.Core.CimModel.DataModel --version 1.0.0
                    
#r "nuget: CimBios.Core.CimModel.DataModel, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CimBios.Core.CimModel.DataModel@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CimBios.Core.CimModel.DataModel&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CimBios.Core.CimModel.DataModel&version=1.0.0
                    
Install as a Cake Tool

CimBios.Core.CimModel.DataModel

CimBios.Core - a swiss army knife 🛠 in the world of CIM (IEC61970) models
Check out general feautures:
  • CIM FullModel serializing/deserializing tools Supports custom data schemas - information model profiles
  • CIM difference model utilities support
    • Applying difference to model
    • Compare models
    • Track model changes
    • (De)serializing
  • Metamodel system based on CIM UML standards description
    • Classes, inheritance
    • Properties (attributes, associations, compounds, enums)
    • Datatypes
    • Stereotypes
    • Packages
    • Extensions and splitted namespaces
  • Validation features
  • Flexible core architecture You can design your own type libs, schemas, serializers, validation rules

Getting Started

1. Create a New DotNET Project

If you don't already have a dotnet project, create one in Visual Studio.

2. Install NuGet Package

Inatall CimBios.Core.CimModel.DataModel NuGet package to your app with your preferred method. Here is the one using NuGet Package Manager:

Install-Package CimBios.Core.CimModel.DataModel
3. Usage example
  • 🆕 Create new FullModel
using CimBios.Core.CimModel.DataModel.Document;

// 💡 Load RDF schema - IM profile
var schema = new CimRdfSchemaXmlFactory().CreateSchema();
schema.Load(new StreamReader($"{path}"));

// 💡 Create type lib instance
// Schema is used to check registering assembly types
var typeLib = new CimDatatypeLib(schema);

// 💡 Create OID descriptor factory - CIM objects identifiers factory. Uuid for example.
var oidDescriptorFactory = new UuidDescriptorFactory();

// 💡 Create CIM FullModel document
var document = new CimDocument(schema, typeLib, oidDescriptorFactory);

// 💡 Set FullModel header
var fullModel = document.CreateObject<FullModel>(new UuidDescriptor());
fullModel.created = DateTime.Now;
fullModel.description = "Hello CIM!";
  • 📦 Model storage accessing
// 💡 Create new object
var geoRegion = document.CreateObject<GeographicalRegion>(new UuidDescriptor()); // via typelib

var geoMetaClass = schema.TryGetResource<ICimMetaClass>(new
	Uri("http://iec.ch/TC57/CIM100#GeographicalRegion"));
var geoRegion2 = document.CreateObject(new UuidDescriptor(), geoMetaClass!); // via metamodel

// Create object w/ concrete identifier
var baseVoltage115 = document.CreateObject<BaseVoltage>(
    new UuidDescriptor(new Guid("3f3ac268-6c9f-44a6-98b8-c3e53ee42f1a")));

// 💡 Remove object
document.RemoveObject(geoRegion2);
document.RemoveObject(new UuidDescriptor(new Guid("3f3ac268-6c9f-44a6-98b8-c3e53ee42f1a")));

// 💡 Get objects
var all = document.GetAllObjects(); // all

// All objects of concrete class
var allGeoRegions = document.GetObjects<GeographicalRegion>(); // via typelib
var allGeoRegions2 = document.GetObjects(geoMetaClass); // via metamodel

// Get concrete object
var modelObject = document.GetObject("3f3ac268-6c9f-44a6-98b8-c3e53ee42f1a");
var typedObject = document.GetObject<IdentifiedObject>("3f3ac268-6c9f-44a6-98b8-c3e53ee42f1a");

  • 💾 Load and save FullModel
// ⚠ schema, typeLib, oidDescriptorFactory definition described in `Create new FullModel` example
// 💡 Create CIM FullModel document
var document = new CimDocument(schema, typeLib, oidDescriptorFactory);

// 💡 Create RDF serializer factory dependant on CIM model format
var serializerFactory = new RdfXmlSerializerFactory();

document.Load($"{model}", serializerFactory);
  • Import another FullModel
// 💡 Import other model objects
document1.ImportModelObjects(document2);
  • 💾 Load and save DifferenceModel

⚠ Insure CimBios.Core.CimModel.DataModel refence added to project explicitly!

var coreLib = new CoreDatatypeLibFactory().Create(); // core typelib, which contains all necessary classes
var diffModel = new CimDifferenceModel(coreLib.Schema, coreLib, oidDescriptorFactory);

// manage default schema w/ needed namespaces and prefix
coreLib.Schema.Namespaces.Add("cim", new Uri("http://iec.ch/TC57/CIM100#"));

diffModel.Load($"{diffmodel}", new RdfXmlSerializerFactory());
diffModel.Save($"{diffmodel}", new RdfXmlSerializerFactory());
  • Apply DifferenceModel to FullModel
// 💡 Apply DifferenceModel
document.ApplyDifferenceModel(diffModel);
  • 🔥 Subscribe DifferenceModel on model changes
// 💡 Subscribe DifferenceModel
diffModel.SubscribeToDataModelChanges(document);
To get more usage details check out .NET demo console app in GitHub repository
4. Diagnostics logging

Base type lib class supports logging via Serilog ILogger interface:

// Pass ILogger instance to CimDocumentBase constructor:
 var logger = new LoggerConfiguration()
                .WriteTo.Console()
                .CreateLogger();

var document = new CimDocument(schema, typeLib, oidDescriptorFactory)
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CimBios.Core.CimModel.DataModel:

Package Downloads
CimBios.Core.CimModel.Validation

Core data model library. Provides base classes and rules to validating CIM model.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 183 2/18/2026
1.0.0 184 12/26/2025