Warning, /firebird/firebird-ng/src/app/model/data-exchange.ts is written in an unsupported language. File is not indexed.
0001
0002 import {Entry} from "./entry";
0003
0004 export class DataExchange {
0005
0006 version: string = "0.01"
0007 origin: any = {}
0008 entries: Entry[] = []
0009
0010
0011 toDexObject() {
0012 let objEntries:any[] = [];
0013 for(const entry of this.entries) {
0014 objEntries.push(entry.toDexObject());
0015 }
0016 return {
0017 version: this.version,
0018 origin: this.origin,
0019 entries: objEntries
0020 }
0021 }
0022
0023 static fromDexObj(obj: any): DataExchange {
0024 let result = new DataExchange();
0025 result.version = obj["version"];
0026 result.origin = obj["origin"];
0027 for(const objEntry of obj["entries"]) {
0028 result.entries.push(Entry.fromDexObject(objEntry));
0029 }
0030 return result;
0031 }
0032 }