Преглед изворни кода

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

dstrutzenberger пре 3 месеци
родитељ
комит
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{