Package org.openxri.urimapper

Examples of org.openxri.urimapper.URIMapperResult


    if (queryMatcher.groupCount() == 1) {

      resultQuery = queryMatcher.group(1);
    }

    URIMapperResult uriMapperResult = new URIMapperResult(resultNamespace, resultQuery);

    return(uriMapperResult);
  }
View Full Code Here


    if ((sQuery == null) || (sQuery.length() == 0))
    {
      return null;
    }

    URIMapperResult oRetval = new URIMapperResult();

    // Gather the resolve data
    if ((sPath != null) && (sPath.length() > 1) &&
        (sPath.charAt(0) == '/'))
    {
      // Trim the slash
      sPath = sPath.substring(1);
      oRetval.setQuery(sPath);
    }
    else
    {
      return null;
    }

    // Determine the type of real query we have
    String sLowQuery = sQuery.toLowerCase();
    if (sLowQuery.startsWith("namespace="))
    {
      oRetval.setNamespace(sQuery.substring(3));
    }
    else
    {
      // we have no idea what was being asked at
      // this point
View Full Code Here

  }

  public URIMapperResult parseRequest(URIMapperRequest request) {

    URIMapperResult uriData = super.parseRequest(request);

    if (uriData != null) uriData.setNamespace(this.namespace)// override the (empty) result from the RegexURIMapper

    return(uriData);
  }
View Full Code Here

  }

  public URIMapperResult parseRequest(URIMapperRequest request) {

    return(new URIMapperResult("", ""));
  }
View Full Code Here

    if (queryMatcher.groupCount() == 1) {

      resultQuery = queryMatcher.group(1);
    }

    URIMapperResult uriMapperResult = new URIMapperResult(resultNamespace, resultQuery);

    return(uriMapperResult);
  }
View Full Code Here

  public final void testParseRequest() {

    URIMapperRequest request = new URIMapperRequest();
    request.setPath("/ns/@free/*markus");

    URIMapperResult result = this.mapper.parseRequest(request);
    assertEquals(result.getNamespace(), "@free");
    assertEquals(result.getQuery(), "*markus");
  }
 
View Full Code Here

  public final void testParseRequest() {

    URIMapperRequest request = new URIMapperRequest();
    request.setPath("/ns/*markus");

    URIMapperResult result = this.mapper.parseRequest(request);
    System.out.println(result.getNamespace());
    System.out.println(result.getQuery());
  }
View Full Code Here

    XRDS xrds = null;

    // let our URIMapper tell us what to do

    URIMapperResult data = this.uriMapper.parseRequest(new URIMapperRequest(request));

    String namespace = (data == null) ? null : data.getNamespace();
    String query = (data == null) ? null : data.getQuery();

    if (namespace != null && namespace.trim().equals("")) namespace = null;
    if (query != null && query.trim().equals("")) query = null;

    String path = request.getRequestURI().substring(request.getContextPath().length() + 1);
View Full Code Here

    protected void onSubmit() {

      URIMapper openXRIURIMapper = ((OpenXRIAdminApplication) Application.get()).getOpenXRIURIMapper();

      URIMapperRequest request;
      URIMapperResult result;

      try {

        request = (URIMapperRequest) this.getModelObject();
        result = openXRIURIMapper.parseRequest(request);
View Full Code Here

    private static final long serialVersionUID = 6148514263284960328L;

    public RequestResultFragment(String id, String markupId, MarkupContainer markupContainer) {

      super(id, markupId, markupContainer);
      this.setModel(new CompoundPropertyModel(new URIMapperResult()));

      // create and add components

      this.add(new Label("namespace"));
      this.add(new Label("query"));
View Full Code Here

TOP

Related Classes of org.openxri.urimapper.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.