Examples of Representation


Examples of Rakudo.Metamodel.Representation

    /// supports forwarding to the native code.
    /// </summary>
    /// <param name="Code"></param>
    public static RakudoObject WrapNativeMethod(RakudoCodeRef.IFunc_Body code)
    {
        Representation repr = REPRRegistry.get_REPR_by_name("KnowHOWREPR");
        RakudoObject wrapper = repr.type_object_for(null,null);
        wrapper.getSTable().SpecialInvoke = code;
        return wrapper;
    }
View Full Code Here

Examples of com.azaptree.wadl.Representation

        resource.getMethodOrResource().add(method);

        final Response response = new Response();
        method.getResponse().add(response);
        response.getStatus().add(Long.valueOf(HttpStatus.OK_200));
        final Representation representation = new Representation();
        representation.setMediaType("application/xml");
        response.getRepresentation().add(representation);
      }

    }
View Full Code Here

Examples of com.robustaweb.library.rest.representation.Representation

        assertFalse(house.getId().equals(formerId) );
    }

    @Test
    public void testGetRepresentation() throws Exception {
        Representation representation = house.getRepresentation();
        assertTrue(representation != null);
        assertTrue(representation.get("id").equals(house.getId()));


        representation = johnDoe.getRepresentation();
        assertTrue(representation != null);
        assertTrue(representation.get("id").equals(johnDoe.getId().toString()));
        assertTrue(representation.getNumber("id") == johnDoe.getId());

    }
View Full Code Here

Examples of com.sun.research.wadl.x2006.x10.Representation

        executeMethod.setUrl(path);
        executeMethod.setHttpMethod(methodName);

        Response response = method.getResponse();
        if (response != null) {
            Representation representation = response.getRepresentation();
            if (representation != null) {
                String mediaType = representation.getMediaType();
                executeMethod.setResponseType(mediaType);
            }
        }

        UnitAction unitAction = new UnitAction();
View Full Code Here

Examples of com.sun.research.ws.wadl.Representation

     * @see com.sun.jersey.server.wadl.WadlGenerator#createRequestRepresentation(com.sun.jersey.api.model.AbstractResource, com.sun.jersey.api.model.AbstractResourceMethod, javax.ws.rs.core.MediaType)
     */
    public Representation createRequestRepresentation(
            AbstractResource ar, AbstractResourceMethod arm, MediaType mt ) {

        final Representation rt = _delegate.createRequestRepresentation( ar, arm, mt );

        for (Parameter p : arm.getParameters()) {
            if (p.getSource() == Parameter.Source.ENTITY) {
                if (acceptMediaType(mt)) {
                    _hasTypeWantsName.add( new Pair(
View Full Code Here

Examples of com.theoryinpractise.halbuilder.api.Representation

    Preconditions.checkNotNull(cartItem, "cartItem");
    Preconditions.checkNotNull(cartItem.getItem().getId(), "id");

    // Create the Customer Item resource
    Representation customerItemRepresentation = publicItemRepresentation.get(cartItem.getItem());

    // Create the wrapping CartItem resource
    RepresentationFactory factory = new DefaultRepresentationFactory();

    return factory.newRepresentation("/cart/item/" + cartItem.getIndex())
View Full Code Here

Examples of com.theoryinpractise.halbuilder.api.Representation

    int pageNumber = Integer.valueOf(rawPageNumber.get());

    PaginatedList<Item> items = itemReadService.getPaginatedList(pageSize, pageNumber);

    // Provide a representation to the client
    Representation representation = new PublicItemCollectionRepresentation().get(items);

    return ok(representation);

  }
View Full Code Here

Examples of com.theoryinpractise.halbuilder.api.Representation

    Optional<Item> itemOptional = itemReadService.getBySKU(sku);
    ResourceAsserts.assertPresent(itemOptional, "item");

    // Provide a representation to the client
    Representation representation = new PublicItemRepresentation().get(itemOptional.get());

    return ok(representation);

  }
View Full Code Here

Examples of com.theoryinpractise.halbuilder.api.Representation

    Preconditions.checkNotNull(deliveryItem, "deliveryItem");
    Preconditions.checkNotNull(deliveryItem.getItem().getId(), "id");

    // Create the Customer Item resource
    Representation publicItemRepresentation = new PublicItemRepresentation().get(deliveryItem.getItem());

    // Create the wrapping DeliveryItem resource
    RepresentationFactory factory = new DefaultRepresentationFactory();

    return factory.newRepresentation("/delivery/item/" + deliveryItem.getItem().getSKU())
View Full Code Here

Examples of com.theoryinpractise.halbuilder.api.Representation

    // Persist the user
    User persistentUser = userReadService.saveOrUpdate(user);

    // Provide a representation to the client
    Representation representation = new AdminUserRepresentation().get(persistentUser, Optional.of(adminUser));
    URI location = uriInfo.getAbsolutePathBuilder().path(persistentUser.getId().toString()).build();

    return created(representation,location);

  }
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.