Examples of PathSegment


Examples of javax.ws.rs.core.PathSegment

        List<Object> params = JAXRSUtils.processParameters(new OperationResourceInfo(m, null),
                                                           values,
                                                           messageImpl);
        assertEquals("2 params should've been identified", 2, params.size());
       
        PathSegment ps = (PathSegment)params.get(0);
        assertEquals("bar foo", ps.getPath());
        assertEquals(1, ps.getMatrixParameters().size());
        assertEquals("0 1", ps.getMatrixParameters().getFirst("p4"));
        assertEquals("bar foo", params.get(1));
    }
View Full Code Here

Examples of org.apache.drill.common.expression.PathSegment

  @JsonCreator
  public Project(@JsonProperty("projections") NamedExpression[] selections) {
    this.selections = selections;
    if(selections == null || selections.length == 0) throw new ExpressionParsingException("Project did not provide any projection selections.  At least one projection must be provided.");
    for (int i = 0; i < selections.length; i++) {
      PathSegment segment = selections[i].getRef().getRootSegment();
      CharSequence path = segment.getNameSegment().getPath();
      if (!segment.isNamed() || !path.equals("output"))
        throw new ExpressionParsingException(String.format(
            "Outputs for projections always have to start with named path of output. First segment was named '%s' or was named [%s]", path, segment.isNamed()));

    }
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.uri.PathSegment

      uriString = EntityProvider.readLink(contentType, entitySet, content);
      ODataContext odataContext = context.getODataContext();
      final String serviceRoot = odataContext.getPathInfo().getServiceRoot().toString();
      final String path =
          uriString.startsWith(serviceRoot.toString()) ? uriString.substring(serviceRoot.length()) : uriString;
      final PathSegment pathSegment = getPathSegment(path);
      edm = getEdm();
      uri = UriParser.parse(edm, Arrays.asList(pathSegment), Collections.<String, String> emptyMap());
    } catch (ODataException e) {
      throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()), e);
    }
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.core.registry.PathSegment

      baseURI = base;
      encodedPathSegments = PathSegment.parseSegments(encodedPath, false);
      this.pathSegments = new ArrayList<PathSegment>(encodedPathSegments.size());
      for (PathSegment segment : encodedPathSegments)
      {
         pathSegments.add(new PathSegment(((PathSegment) segment).getOriginal(), true));
      }
      extractParameters(requestURI.getRawQuery());
      extractMatchingPath(encodedPathSegments);

      absolutePath = UriBuilder.fromUri(requestURI).replaceQuery(null).build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.