Class Center3DTaskResource

java.lang.Object
io.goobi.viewer.api.rest.v1.tasks.Center3DTaskResource

@Path("/tasks/center3d") public class Center3DTaskResource extends Object
REST resource for triggering automatic centering of GLTF/GLB 3D objects in the Voyager viewer. Centering generates a *.svx.json scene file that positions the rotation pivot at the object's bounding-box centre.

Both endpoints are admin-only and respond immediately with the number of queued tasks – the actual centering work happens asynchronously in the message queue.

  • Constructor Details

    • Center3DTaskResource

      public Center3DTaskResource()
  • Method Details

    • centerRecord

      @POST @Path("/{pi}") @Produces("application/json") public Response centerRecord(@PathParam("pi") String pi, @QueryParam("force") @DefaultValue("false") boolean force)
      Queues centering tasks for all GLTF/GLB files belonging to the given record.
      Parameters:
      pi - the persistent identifier of the record
      force - if true, existing SVX scene files are overwritten; if false (default), records that already have a scene file are skipped
      Returns:
      JSON with the number of queued tasks
    • centerAll

      @POST @Produces("application/json") public Response centerAll(@QueryParam("force") @DefaultValue("false") boolean force)
      Queues centering tasks for every GLTF/GLB file found across all records in all configured data repositories.
      Parameters:
      force - if true, existing SVX scene files are overwritten; if false (default), records that already have a scene file are skipped
      Returns:
      JSON with the total number of queued tasks