{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Using CIM Objects" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "plaintext" } }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```mermaid\n", "classDiagram\n", " class Identity{\n", " + identifier: uuid\n", " # \\_\\_uuid\\_\\_: class UUID_Meta\n", " # \\_\\_json_ld\\_\\_: str~repr~\n", "\n", " + pprint()\n", " + uri() str~UUID~\n", " ~ uuid(mRID,name,str)\n", "\n", " # \\_\\_repr\\_\\_() str~JSON-LD~\n", " # \\_\\_dict\\_\\_() dict\n", " # \\_\\_str\\_\\_() str~dict~\n", "\n", "\n", "\n", " }\n", "\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "plaintext" } }, "outputs": [], "source": [ "from cimgraph.validators.attribute_utils import get_attr_datatype, get_attr_uml_type, get_attr_field_type, get_attr_inverse\n", "field_type = get_attr_field_type(cim_class = cim.Terminal, attribute='Measurements') # field = 'list'\n", "uml_type = get_attr_uml_type(cim_class=cim.Terminal, attribute='Measurements') # uml_type = 'Association'\n", "datatype = get_attr_datatype(cim_class=cim.Terminal, attribute='Measurements') # datatype = ['Measurement']\n", "inverse = get_attr_inverse(cim_class=cim.Terminal, attribute='Measurements') # inverse = 'Measurement.Terminal'" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }