Package org.apache.stanbol.contenthub.servicesapi.ldpath

Examples of org.apache.stanbol.contenthub.servicesapi.ldpath.LDProgramCollection


        return false;
    }

    @Override
    public LDProgramCollection retrieveAllPrograms() {
        return new LDProgramCollection(nameProgramMap);
    }
View Full Code Here


    public Response retrieveAllPrograms(@Context HttpHeaders headers) {
        MediaType acceptedHeader = RestUtil.getAcceptedMediaType(headers, MediaType.APPLICATION_JSON_TYPE);
        if (acceptedHeader.isCompatible(MediaType.TEXT_HTML_TYPE)) {
            return Response.ok(new Viewable("index", this), MediaType.TEXT_HTML).build();
        } else {
            LDProgramCollection ldProgramCollection = programManager.retrieveAllPrograms();
            ResponseBuilder rb = Response.ok(ldProgramCollection, MediaType.APPLICATION_JSON);
            addCORSOrigin(servletContext, rb, headers);
            return rb.build();
        }
    }
View Full Code Here

        return false;
    }

    @Override
    public LDProgramCollection retrieveAllPrograms() {
        return new LDProgramCollection(nameProgramMap);
    }
View Full Code Here

    public Response retrieveAllPrograms(@Context HttpHeaders headers) {
        MediaType acceptedHeader = RestUtil.getAcceptedMediaType(headers);
        if (acceptedHeader.isCompatible(MediaType.TEXT_HTML_TYPE)) {
          return Response.ok(new Viewable("index", this), MediaType.TEXT_HTML).build();
        } else{
          LDProgramCollection ldProgramCollection = programManager.retrieveAllPrograms();
          ResponseBuilder rb = Response.ok(ldProgramCollection, MediaType.APPLICATION_JSON);
          addCORSOrigin(servletContext, rb, headers);
          return rb.build();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.contenthub.servicesapi.ldpath.LDProgramCollection

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.