All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.rexster.RootResource Maven / Gradle / Ivy

package com.tinkerpop.rexster;

import com.tinkerpop.rexster.server.RexsterApplication;
import com.tinkerpop.rexster.extension.HttpMethod;

import javax.ws.rs.GET;
import javax.ws.rs.OPTIONS;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * The root resources for Rexster which shows the splash page for Rexster as HTML.
 *
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
@Path("/")
public class RootResource extends BaseResource {
    public RootResource() {
        super(null);
    }

    public RootResource(final RexsterApplication ra) {
        super(ra);
    }

    @OPTIONS
    public Response optionsRoot() {
        return buildOptionsResponse(HttpMethod.GET.toString());
    }

    @GET
    @Produces({MediaType.TEXT_HTML})
    public Response getRoot() {
        StringBuffer sb = new StringBuffer();
        sb.append("");
        sb.append("Rexster");
        sb.append("");
        sb.append("
"); sb.append("
"); sb.append("

Rexster - " + Tokens.REXSTER_VERSION + "

"); sb.append("

The Dog House

"); sb.append("

REST API

"); sb.append("
"); sb.append(""); sb.append(""); return Response.ok(sb.toString()).build(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy