We're Hiring!

ImportConfig deprecated classes

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

ImportConfig deprecated classes

Postby derekeh » Mon Oct 22, 2018 12:57 pm

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
derekeh
 
Posts: 31
Joined: Mon Feb 12, 2018 12:00 pm

Re: ImportConfig deprecated classes

Postby mtbc » Tue Oct 23, 2018 9:28 am

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
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Re: ImportConfig deprecated classes

Postby derekeh » Wed Oct 31, 2018 12:35 pm

Mark,
Thanks for that.

Derek
derekeh
 
Posts: 31
Joined: Mon Feb 12, 2018 12:00 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron