Skip to content
Snippets Groups Projects
Commit fbfffe44 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

First version with support for piping of config from VIPSLogic to VIPSCore and...

First version with support for piping of config from VIPSLogic to VIPSCore and piping of results from VIPSCore all the way back to VIPSLogic.
parent 82975333
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,5 @@ public class VIPSCoreApplication extends Application
private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(no.bioforsk.vips.core.config.JacksonConfig.class);
resources.add(no.bioforsk.vips.core.service.ModelResource.class);
resources.add(no.bioforsk.vips.coremanager.service.ManagerResource.class);
}
}
\ No newline at end of file
package no.bioforsk.vips.core.service;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.PathParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import no.bioforsk.vips.entity.ModelConfiguration;
import no.bioforsk.vips.entity.Result;
import no.bioforsk.vips.model.ConfigValidationException;
import no.bioforsk.vips.model.Model;
import no.bioforsk.vips.model.ModelExcecutionException;
......@@ -222,7 +224,8 @@ public class ModelResourceImpl implements ModelResource{
{
Model calledModel = ModelFactory.getInstance().getModelInstance(modelId);
calledModel.setConfiguration(config);
return Response.ok().entity(calledModel.getResult()).build();
List<Result> results = calledModel.getResult();
return Response.ok().entity(results).build();
}
catch(InstantiationException | IllegalAccessException | ConfigValidationException | ModelExcecutionException | DuplicateModelIdException ex)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment