Show / Hide Table of Contents

Class OpenDIBase

Base for Open DI compliant class definitions

Inheritance
object
OpenDIBase
OpenDIAsset
OpenDIDecisionModel
OpenDIDecisionModelAsset
OpenDIDecisionModelElement
OpenDISimulation
OpenDISimulationRun
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.OpenDI
Assembly: WMServer.dll
Syntax
public abstract class OpenDIBase
Remarks

Open DI classes are used for defining JSON schemas in the REST protocol. Database transactions, however, use the DataTransferObject (DTO)-derived classes, whcih are proprietary to World Modeler. Translation between DTO and OpenDI classes is performed as follows:

  • For DTO to OpenDI: Call the constructor of the OpenDI class and pass the DTO object as the arguments.
  • For OpenDI to DTO: Each OpenDI class implements a ToDTO() method which creates and returns a DTO object populated with the data in the OpenDI object

Constructors

OpenDIBase()

Default constructor.

Declaration
public OpenDIBase()

OpenDIBase(WMAssetBase)

Constructor that initializes the Open DI object with the properties from any WMAssetBase object.

Declaration
public OpenDIBase(WMAssetBase asset)
Parameters
Type Name Description
WMAssetBase asset

OpenDIBase(DecisionModelBase)

Constructor that initializes the Open DI object with properties that are common to all DecisionModelBase-derived objects.

Declaration
public OpenDIBase(DecisionModelBase diBase)
Parameters
Type Name Description
DecisionModelBase diBase

OpenDIBase(DecisionModelDTO)

Constructor that initializes the Open DI object with the properties from a DecisionModelDTO object.

Declaration
public OpenDIBase(DecisionModelDTO dmDTO)
Parameters
Type Name Description
DecisionModelDTO dmDTO

Fields

FQNSeparator

Set the character used to separate levels of a FullyQualifiedName.

Declaration
public const string FQNSeparator = "."
Field Value
Type Description
string

openDIVersion

The Open DI version supported by this implementation.

Declaration
public const string openDIVersion = "0.2"
Field Value
Type Description
string

Properties

documentation

Longer, formatted description of this object and other information provided as documentation.

Declaration
public string documentation { get; set; }
Property Value
Type Description
string

documentationMIMEType

MIME type of the Documentation.

Declaration
public string documentationMIMEType { get; set; }
Property Value
Type Description
string

id

The ID of the object. This should be generated by

Declaration
public string id { get; set; }
Property Value
Type Description
string

name

Name of the object in the Decision Model

Declaration
public string name { get; set; }
Property Value
Type Description
string

properties

Dictionary of properties associated with the object that are not specified by the Open DI standard. Open DI places no restrictions on what these are named, or their content.

Declaration
public Dictionary<string, object> properties { get; }
Property Value
Type Description
Dictionary<string, object>

summary

Short summary of this object.

Declaration
public string summary { get; set; }
Property Value
Type Description
string

Methods

GetOpenDIType(Type)

Convert a World Modeler Type to the matching Open DI type name

Declaration
public static string GetOpenDIType(Type wmType)
Parameters
Type Name Description
Type wmType
Returns
Type Description
string

GetWMType(string)

Evaluate the World Modeler type that corresponds to the specified Open DI type name.

Declaration
public static Type GetWMType(string openDIType)
Parameters
Type Name Description
string openDIType

The Open DI type name to be translated to a World Modeler Type.

Returns
Type Description
Type

The World Modeler Type corresponding to the specified Open DI type name. Throws an exception if no matching World Modeler Type can be found.

In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE