Package org.apache.stanbol.commons.viewable

Examples of org.apache.stanbol.commons.viewable.Viewable


        return info;
    }
   
    @GET
    public Response get(){
        return Response.ok(new Viewable("index",this)).build();
    }
View Full Code Here


            // Returns 200, the job exists
            info.setOutputLocation(getPublicBaseUri() + m.getResultLocation(id));

            if(isHTML()){
                // Result as HTML
                return Response.ok(new Viewable("info", this)).build();
            }else{
                // Result as application/json, text/plain
                return Response.ok(info).build();
            }
        } else {
View Full Code Here

public class StanbolRootResource extends BaseStanbolResource {

    @GET
    @Produces(TEXT_HTML)
    public Response get() {
        return Response.ok(new Viewable("index", this), TEXT_HTML).build();
    }
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response get(@Context HttpHeaders headers) {
        ResponseBuilder rb = Response.ok(new Viewable("index", this), TEXT_HTML);
        addCORSOrigin(servletContext, rb, headers);
        return rb.build();
    }
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response get(@Context HttpHeaders headers) {
        ResponseBuilder rb = Response.ok(new Viewable("index", this), TEXT_HTML);
        addCORSOrigin(servletContext, rb, headers);
        return rb.build();
    }
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response get(@Context HttpHeaders headers) {
        ResponseBuilder rb = Response.ok(new Viewable("index", this));
        rb.header(HttpHeaders.CONTENT_TYPE, TEXT_HTML+"; charset=utf-8");
        addCORSOrigin(servletContext,rb, headers);
        return rb.build();
    }
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response get(@Context HttpHeaders headers) {
        ResponseBuilder res = Response.ok(new Viewable("index", this),TEXT_HTML);
        addCORSOrigin(servletContext,res, headers);
        return res.build();
    }
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response get(@Context HttpHeaders headers) {
        ResponseBuilder res = Response.ok(new Viewable("index", this),TEXT_HTML);
        addCORSOrigin(servletContext,res, headers);
        return res.build();
    }
View Full Code Here

                /**
                 * We return 404 with additional info
                 */
                String jobService = new StringBuilder().append(getPublicBaseUri()).append("jobs/").append(id).toString();
                this.jobLocation = jobService;
                Viewable viewable = new Viewable("404.ftl",this);
                //return Response.status(404).header("Content-Location", jobService).header("Content-type","text/html").entity( viewable ).build();
               
                ResponseBuilder rb = Response.status(Status.NOT_FOUND);
                rb.header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML+ "; charset=utf-8");
                addCORSOrigin(servletContext, rb, headers);
View Full Code Here

    }

    @GET
    @Produces(TEXT_HTML)
    public Response getDocumentation(@Context HttpHeaders headers) {
        ResponseBuilder rb = Response.ok(new Viewable("index", this));
        rb.header(HttpHeaders.CONTENT_TYPE, TEXT_HTML + "; charset=utf-8");
        addCORSOrigin(servletContext, rb, headers);
        return rb.build();
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.viewable.Viewable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.