From: Shamshad A. <sha...@gm...> - 2014-07-17 15:38:26
|
Hi everyone, I'm working on Command Line Interface and currently facing a problem while implementing functionality to import dataset. There's already a class 'edu.udo.scaffoldhunter.model.dataimport.Importer' available in SH to manage import process. Importer class has runImport() method as an entry point. But the runImport() method incorporates GUI and so I can't use this method in CLI. However, some methods, such as saveDatasetAndPropertyDefinitions(), which are defined with private modifier in Importer class are useful in CLI too. At this point, I can either extends the Importer class, override runImport() method and change accessibility of private methods which are defined in Importer class to protected so that I can use them in extended class or I can simply make the copy of whole code in Importer class and then I'll modify it to met the requirement of CLI. In former case, which is an efficient solution, I will not modify any internal code except methods' access modifier and will add some getter and setter for the private field if it's required. Please let me know any issue associated with such modification in any part of the existing code. Thanks, Shamshad -- -Shamshad Alam +91 9911631198 LinkedIn : in.linkedin.com/pub/shamshad-alam/58/939/70 GitHub: @shamshad-npti Facbook: @shamshad.saralindia |