19779bcefe0d57d9fe60b413fd955c7fc5958487
[osm/riftware.git] /
1 /*
2  * STANDARD_RIFT_IO_COPYRIGHT
3  */
4 /**
5  * Created by onvelocity on 11/23/15.
6  */
7
8 'use strict';
9
10 import DescriptorModel from '../DescriptorModel'
11 import DescriptorModelFactory from '../DescriptorModelFactory'
12
13 export default class InternalConnectionPointRef extends DescriptorModel {
14
15         static get type() {
16                 return 'internal-connection-point-ref';
17         }
18
19         static get className() {
20                 return 'InternalConnectionPointRef';
21         }
22
23         static get qualifiedType() {
24                 return 'vnfd.internal-vld.' + InternalConnectionPointRef.type;
25         }
26
27         constructor(m, parent) {
28                 super(!m || typeof m === 'string' ? {id: m, isLeaf: true} : m, parent);
29                 this.uid = this.id;
30                 this.type = InternalConnectionPointRef.type;
31                 this.uiState['qualified-type'] = InternalConnectionPointRef.qualifiedType;
32                 this.className = InternalConnectionPointRef.className;
33         }
34
35         toString() {
36                 return this.valueOf();
37         }
38
39         remove() {
40                 return this.parent.removeInternalConnectionPointRefForId(this.id);
41         }
42
43         valueOf() {
44                 return this.id;
45         }
46
47 }