cytomine / Cytomine-java-client

Cytomine Java client
Apache License 2.0
12 stars 14 forks source link

Deleting images using java-client #15

Closed anttikos closed 4 years ago

anttikos commented 4 years ago

At the moment java-client offers deprecated deleteImageInstance() and deleteUploadedFile() methods for removing an image instance from a project, and for deleting an image from the hard disk. I suppose I shouldn't use these methods, as they are are being marked as deprecated.. what is the suggest way of deleting the images, using the java-client? Sorry for the spam if this is already documented somewhere, but I couldn't find it.

geektortoise commented 4 years ago

Hello, Sorry for the late reply.

We released the version 2.0.0 of this java client. This version use the Object-oriented programming paradigm. It means that to created, update or delete an object, we call the method related to this object (and not from a global cytomine object)

You will find more details on our related documentation part.

For your question, the deprecated functions are still working but as you guessed, it will be better to use the OOP paradigm like this https://github.com/cytomine/Cytomine-java-client/blob/e4eb9eeb6b8af30158c191117be6b183f64bb092/src/main/java/be/cytomine/client/Cytomine.java#L1388-L1390