Prechádzať zdrojové kódy

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

dstrutzenberger 2 mesiacov pred
rodič
commit
f55672def7
3 zmenil súbory, kde vykonal 11 pridanie a 3 odobranie
  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{