Regalamiunsorriso/decompiled-libs/www/acxent-face-1.0.0/it/acxent/face/callable/IndexFotoFaceCallable.java

42 lines
1.2 KiB
Java
Raw Normal View History

2026-04-22 18:41:37 +02:00
package it.acxent.face.callable;
import it.acxent.db.ResParm;
import it.acxent.face.Foto;
import it.acxent.face.FotoI;
import java.util.concurrent.Callable;
public class IndexFotoFaceCallable implements Callable<ResParm> {
private FotoI foto;
private boolean force = false;
private boolean detectNumbers = false;
public IndexFotoFaceCallable(FotoI foto, boolean detectNumbers, boolean force) {
this.foto = foto;
this.detectNumbers = detectNumbers;
this.force = force;
}
public ResParm call() throws Exception {
ResParm rp = new ResParm();
try {
rp = Foto.loadFacesByFaceRecognition(getFoto(), this.detectNumbers, this.force);
} catch (Exception ex) {
ex.printStackTrace();
rp.setStatus(false);
rp.setMsg(getFoto().getFileNameFaceRecognition()
.substring(getFoto().getFileNameFaceRecognition().lastIndexOf("/") + 1) + " " + getFoto().getFileNameFaceRecognition().substring(getFoto().getFileNameFaceRecognition().lastIndexOf("/") + 1));
rp.setMsg(ex);
}
return rp;
}
public FotoI getFoto() {
return this.foto;
}
public void setFoto(FotoI foto) {
this.foto = foto;
}
}