Page 1 of 1

ImportConfig deprecated classes

PostPosted: Mon Oct 22, 2018 12:57 pm
by derekeh
Hi,
I'm importing images using Java and following the example on the Java Language Bindings help page.

Code: Select all
ImportConfig config = new ome.formats.importer.ImportConfig();
...
config.targetClass.set("omero.model.Dataset");
config.targetId.set(datasetID);


Although I am able to succesfully upload and link images I note that
both targetClass and targetId are deprecated.
What is the correct way to set these parameters?
I'm using 5.4.0 but I see that the example code is still the same for 5.4.9

Thanks in advance
Derek

Re: ImportConfig deprecated classes

PostPosted: Tue Oct 23, 2018 9:28 am
by mtbc
Dear Derek,

Good question, thank you: I shall note that our documentation needs an update here. To import into dataset ID 123 one should use,
Code: Select all
config.target.set("Dataset:123");

Cheers,
Mark

Re: ImportConfig deprecated classes

PostPosted: Wed Oct 31, 2018 12:35 pm
by derekeh
Mark,
Thanks for that.

Derek