Package de.fuberlin.wiwiss.pubby.negotiation

Examples of de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiator


    }
  }
 
  private void doResponseModel() throws IOException {
    response.addHeader("Vary", "Accept");
    ContentTypeNegotiator negotiator = PubbyNegotiator.getDataNegotiator();
    MediaRangeSpec bestMatch = negotiator.getBestMatch(
        request.getHeader("Accept"), request.getHeader("User-Agent"));
    if (bestMatch == null) {
      response.setStatus(406);
      response.setContentType("text/plain");
      ServletOutputStream out = response.getOutputStream();
View Full Code Here


    // It's a resource that's not in our namespace.
    // We don't provide a 303 service for those, only browsable pages.
    if (!controller.isHosted()) return false;

    response.addHeader("Vary", "Accept, User-Agent");
    ContentTypeNegotiator negotiator = PubbyNegotiator.getPubbyNegotiator();
    MediaRangeSpec bestMatch = negotiator.getBestMatch(
        request.getHeader("Accept"), request.getHeader("User-Agent"));
    if (bestMatch == null) {
      response.setStatus(406);
      response.setContentType("text/plain");
      response.getOutputStream().println(
View Full Code Here

                explainStyleSheet=explainStyleSheet.replace("/$context", "");
                searchStyleSheet=searchStyleSheet.replace("/$context", "");
                scanStyleSheet=scanStyleSheet.replace("/$context", "");
            }

            conneg=new ContentTypeNegotiator();
            Enumeration enumer = dbProperties.keys();
            int offset;
            String contentLocation, key, mediaType, mimeType, name, recordSchema, value;
            VariantSpec vs;
            while(enumer.hasMoreElements()) {
View Full Code Here

    Map<String, String> dDescPrefixes = dDesc.getNsPrefixMap();
    dDescPrefixes.putAll(datasetMetadataTemplate.getNsPrefixMap());
    dDesc.setNsPrefixes(dDescPrefixes);

    // decide whether to serve RDF or HTML
    ContentTypeNegotiator negotiator = PubbyNegotiator.getPubbyNegotiator();
    MediaRangeSpec bestMatch = negotiator.getBestMatch(
        request.getHeader("Accept"), request.getHeader("User-Agent"));
    if (bestMatch == null) {
      response.setStatus(406);
      response.setContentType("text/plain");
      response.getOutputStream().println(
View Full Code Here

    if (handleDownload(resourceURI, response, server)) {
      return;
    }

    response.addHeader("Vary", "Accept, User-Agent");
    ContentTypeNegotiator negotiator = PubbyNegotiator.getPubbyNegotiator();
    MediaRangeSpec bestMatch = negotiator.getBestMatch(
        request.getHeader("Accept"), request.getHeader("User-Agent"));
    if (bestMatch == null) {
      response.setStatus(406);
      response.setContentType("text/plain");
      response.getOutputStream().println(
View Full Code Here

    }
  }
 
  private void doResponseModel() throws IOException {
    response.addHeader("Vary", "Accept");
    ContentTypeNegotiator negotiator = PubbyNegotiator.getDataNegotiator();
    MediaRangeSpec bestMatch = negotiator.getBestMatch(
        request.getHeader("Accept"), request.getHeader("User-Agent"));
    if (bestMatch == null) {
      response.setStatus(406);
      response.setContentType("text/plain");
      ServletOutputStream out = response.getOutputStream();
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiator

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.