|
@@ -4,7 +4,7 @@ import { NodeId } from "./NodeId";
|
|
|
import { assert } from "@/util/assert";
|
|
|
|
|
|
export class UAReference implements IToXML{
|
|
|
- constructor(public referenceType: ReferencyType,
|
|
|
+ constructor(public referenceType: string,
|
|
|
public ref: NodeId,
|
|
|
public isForward: boolean) {
|
|
|
}
|
|
@@ -26,25 +26,8 @@ export class UAReference implements IToXML{
|
|
|
}
|
|
|
|
|
|
static fromXML(uaReference: any): UAReference {
|
|
|
- return new UAReference(ReferencyType[uaReference['@_ReferenceType'] as keyof typeof ReferencyType],
|
|
|
+ return new UAReference(uaReference['@_ReferenceType'],
|
|
|
NodeId.coerceNodeId(uaReference['#text']),
|
|
|
uaReference['@_IsForward']!="false");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-export enum ReferencyType {
|
|
|
- HasComponent = 1,
|
|
|
- HasProperty =2,
|
|
|
- Organizes =3,
|
|
|
- HasOrderedComponent =4,
|
|
|
- HasModellingRule =5,
|
|
|
- HasTypeDefinition =6,
|
|
|
- HasEncoding =7,
|
|
|
- HasDescription =8,
|
|
|
- GeneratesEvent =9,
|
|
|
- AlwaysGeneratesEvent=10,
|
|
|
- HasNotifier=11,
|
|
|
- HasSubtype=12
|
|
|
-
|
|
|
-}
|