Package org.openxri.mapper

Examples of org.openxri.mapper.URIMapperResult


  {
    if (soLog.isDebugEnabled()) soLog.debug("doGet()");

    // let our URI mapper tell us what we have to look up

    URIMapperResult data = moMapper.parseRequest(new URIMapperRequest(request));

    // if the URI mapper does not know what to do, hand off the request to the plugin

    if (data == null) {

      if (moPlugin == null) {

        soLog.warn("No plugin installed.");
        response.sendError(HttpServletResponse.SC_BAD_REQUEST);
        return;
      }

      if (soLog.isDebugEnabled()) soLog.debug("Forwarding request to plugin.");

      boolean ret = moPlugin.processCustomRequest(request, response);

      // did the plugin handle the request?

      if (ret == true) {

        return;
      } else {

        soLog.warn("Plugin failed to handle the request.");
        response.sendError(HttpServletResponse.SC_BAD_REQUEST);
        return;
      }
    }

    // TODO: check if we want trusted resolution

    boolean bSigned = false;

    /*      String sAccept = request.getHeader(Tags.HEADER_ACCEPT);

      boolean bSigned =
        (sAccept != null) &&
        (sAccept.startsWith(Tags.CONTENT_TYPE_XRID_TRUSTED));*/

    // look at the input data the URI mapper gave us

    String namespace = data.getNamespace();
    String authorityId = data.getId();
    String resolveData = data.getResolveData();
    XRISegment segment = null;

    try {

      segment = new XRISegment(resolveData);
View Full Code Here

TOP

Related Classes of org.openxri.mapper.URIMapperResult

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.