class WorkspaceResource extends TransactionalResource {

    @Timed
    @GET
    public List<Map<String, Object>> getWorkspaces(@Auth AuthorizedPrincipal principal,
                                                   @Context DSLContext create) {
        return mutate(principal, readOnlyModel -> {
            Kernel kernel = readOnlyModel.getKernel();
            List<Map<String, Object>> workspaces = new ArrayList<>();
            for (ExistentialRuleform definingProduct : readOnlyModel.getPhantasmModel()
                                                                    .getChildrenUuid(kernel.getWorkspace()
                                                                                           .getId(),
                                                                                     kernel.getIsA()
                                                                                           .getInverse(),
                                                                                     ExistentialDomain.Product)) {
                Map<String, Object> wsp = new TreeMap<>();
                wsp.put("id", UuidUtil.encode(definingProduct.getId()));
                WorkspaceProperties properties = readOnlyModel.wrap(Workspace.class,
                                                                    definingProduct)
                                                              .get_Properties();
                wsp.put("name", properties.getName());
                wsp.put("description", properties.getDescription());
                wsp.put("iri", properties.getIri());
                wsp.put("version", properties.getVersion());
                workspaces.add(wsp);
            }
            return workspaces;
        }, create);
    }

    public  WorkspaceResource();
    public  WorkspaceResource(URLClassLoader executionScope);

}