Using the Discovery Informatics Framework outside of IJC

User 9ae84238bf

27-03-2009 18:25:17

Hello,





I would like to automatically add new columns to a structure table and let them appear in IJC.








I can add new columns directly to the mysql database that I am using, but then have to use theĀ  "Existing standard field" button on the schema tab of IJC for each of them in order to let them appear in the IJC table. The format of the metainformation of the schema in the ijc_schem table seems to be rather complicated so I would rather like to manipulate it via the Discovery Informatics Framework.








I could use code similar to the Add-Field example, but for that I somehow need to get the DFEntity to which I want to add the field. How can I access the database via DIF outside of IJC?





Thanks,





Timm

ChemAxon e189db4705

30-03-2009 17:18:57

Hello,





As far as I understand, it's not acceptable for you to do such a "column promotion" in any GUI, right?





I mean inside IJC you can implement pretty easily a batch function based on DIF API for promoting for example more columns in a single action. Inside IJC it's easier to get appropriate instance of DFEntity based on user selection.








If non-gui (command line) is real requirement, there are two ways:





1. Do it without DIF: just modify IJC metadata in DB. We can help you with this and provide the current xml format. The advantage of this solution is that it's really simplest (and fastest) way to do it. The disadvantages are that your code will need to be changed if we modify the xml metadata format in the future; and of course this is more hack than nice solution.





2. Do it through non-gui IJC version just based on DIF. Unfortunately we don't have such a version at the moment. Basically it would need to provide a non-gui platform configuration (maybe just list of jars), support for opening IJC project in non-visual mode and the some support for schema init (currently it requires some interactions with user like confirmation of username, password, single user mode etc.). All of these are solvable, but not yet implemented.





Petr