createEnterprise function
Implementation
Future createEnterprise() async{
//:Enterprise
// Node enterprise = NodeImpl(':Enterprise');
// Storage.controller!.addOrUpdate(enterprise);
// final input = File(dirname(Platform.script.path)+'/test/dummyAPI/dummydata/Enterprise.csv').openRead();
// final fields = await input.transform(utf8.decoder).transform(CsvToListConverter()).toList();
// for ( var str in fields[0].toString().replaceAll('[', '').split('\n') ){
try {
Node temp = NodeImpl(data.enter['UUID'].toString(),'', ':Enterprise');
await temp.addValue(NodeValueImpl('name', data.enter['Name'].toString()));
await temp.addValue(NodeValueImpl('location', data.enter['location'].toString()));
await temp.addValue(NodeValueImpl('sector', data.enter['sector'].toString()));
await temp.addValue(NodeValueImpl('associatedProfiles', data.enter['associatedProfiles'].toString()));
await Storage.controller!.addOrUpdate(temp);
}
catch(e){
print(e);
}
// }
// var get = await Storage.controller!.get(':Enterprise');
// print(await get.getChildren());
}