浏览代码

Merge branch 'master' of https://intra.acdp.at/gogs/mkunz/modtool

dstrutzenberger 10 月之前
父节点
当前提交
f55672def7
共有 3 个文件被更改,包括 11 次插入3 次删除
  1. 9 0
      src/ua/UABaseNode.ts
  2. 1 2
      src/ua/UAObject.ts
  3. 1 1
      src/ua/UAVariable.ts

+ 9 - 0
src/ua/UABaseNode.ts

@@ -128,6 +128,15 @@ export class UABaseNode implements IToXML{
         }
     }
 
+    getModellingRule(): string|undefined{
+        this.references.forEach((ref)=>{
+            if(ref.referenceType == "HasModellingRule"){
+                return ref.toNode.displayName;
+            }
+        });
+        return undefined;
+    }
+
     static fromXML(xmlObject: any): UABaseNode{
         const xmlReferences=xmlObject['References']||[];
         const references:UAReference[]=[];

+ 1 - 2
src/ua/UAObject.ts

@@ -35,8 +35,7 @@ export class UAObject extends UABaseNode {
         }
         return elem;
     }
-
-
+    }
 }
 
 export interface UAObjectNodeOptions extends UABaseNodeOptions{

+ 1 - 1
src/ua/UAVariable.ts

@@ -33,7 +33,7 @@ export class UAVariable extends UABaseNode {
         }
         return elem;
     }
-
+    }
 }
 
 export interface UAVariableNodeOptions extends UABaseNodeOptions{