Examples of rel()


Examples of org.apache.wink.server.utils.SingleLinkBuilder.rel()

        @Produces("application/atom+xml")
        public String getAtom(@Context LinkBuilders builders) {
            SingleLinkBuilder builder = builders.createSingleLinkBuilder();

            List<SyndLink> links = new ArrayList<SyndLink>();
            builder.rel("stam").build(links);
            assertEquals(1, links.size());
            assertLink(links, "stam", null, "singleLinkWithRelAndType");

            links.clear();
            builder.rel(null).type(MediaType.APPLICATION_JSON_TYPE).build(links);
View Full Code Here

Examples of org.apache.wink.server.utils.SingleLinkBuilder.rel()

            builder.rel("stam").build(links);
            assertEquals(1, links.size());
            assertLink(links, "stam", null, "singleLinkWithRelAndType");

            links.clear();
            builder.rel(null).type(MediaType.APPLICATION_JSON_TYPE).build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       null,
                       "application/json",
                       "singleLinkWithRelAndType?alt=application%2Fjson");
View Full Code Here

Examples of org.apache.wink.server.utils.SingleLinkBuilder.rel()

                       null,
                       "application/json",
                       "singleLinkWithRelAndType?alt=application%2Fjson");

            links.clear();
            builder.rel("stam").type(MediaType.APPLICATION_JSON_TYPE).build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       "stam",
                       "application/json",
                       "singleLinkWithRelAndType?alt=application%2Fjson");
View Full Code Here

Examples of org.jboss.resteasy.specimpl.LinkBuilderImpl.rel()

   }

   public javax.ws.rs.core.Link toJaxrsLink()
   {
      javax.ws.rs.core.Link.Builder builder = new LinkBuilderImpl();
      builder.rel(getRelationship());
      builder.title(getTitle());
      builder.type(getType());
      builder.uri(getHref());
      for (Map.Entry<String, List<String>> entry : getExtensions().entrySet())
      {
View Full Code Here

Examples of org.qi4j.library.rest.common.link.Link.rel()

                ValueBuilder<Link> linkBuilder = module.newValueBuilder( Link.class );
                Link prototype = linkBuilder.prototype();
                prototype.classes().set( "query" );
                prototype.text().set( humanReadable( query.getName() ) );
                prototype.href().set( query.getName().toLowerCase() );
                prototype.rel().set( query.getName().toLowerCase() );
                prototype.id().set( query.getName().toLowerCase() );
                queriesProperty.add( linkBuilder.newInstance() );
            }
        }
View Full Code Here

Examples of org.qi4j.library.rest.common.link.Link.rel()

                ValueBuilder<Link> linkBuilder = module.newValueBuilder( Link.class );
                Link prototype = linkBuilder.prototype();
                prototype.classes().set( "command" );
                prototype.text().set( humanReadable( command.getName() ) );
                prototype.href().set( command.getName().toLowerCase() );
                prototype.rel().set( command.getName().toLowerCase() );
                prototype.id().set( command.getName().toLowerCase() );
                commandsProperty.add( linkBuilder.newInstance() );
            }
        }
View Full Code Here

Examples of org.qi4j.library.rest.common.link.Link.rel()

                ValueBuilder<Link> linkBuilder = module.newValueBuilder( Link.class );
                Link prototype = linkBuilder.prototype();
                prototype.classes().set( "resource" );
                prototype.text().set( humanReadable( subResource.getName() ) );
                prototype.href().set( subResource.getName().toLowerCase() + "/" );
                prototype.rel().set( subResource.getName().toLowerCase() );
                prototype.id().set( subResource.getName().toLowerCase() );
                resourcesProperty.add( linkBuilder.newInstance() );
            }
        }
View Full Code Here

Examples of org.springframework.data.rest.core.annotation.RestResource.rel()

    RestResource annotation = AnnotationUtils.findAnnotation(method, RestResource.class);
    String resourceRel = resourceMapping.getRel();

    this.isExported = annotation != null ? annotation.exported() : true;
    this.rel = annotation == null || !StringUtils.hasText(annotation.rel()) ? method.getName() : annotation.rel();
    this.path = annotation == null || !StringUtils.hasText(annotation.path()) ? new Path(method.getName()) : new Path(
        annotation.path());
    this.method = method;
    this.parameterMetadata = discoverParameterMetadata(method, resourceRel.concat(".").concat(rel));
View Full Code Here

Examples of org.springframework.data.rest.core.annotation.RestResource.rel()

    RestResource annotation = AnnotationUtils.findAnnotation(method, RestResource.class);
    String resourceRel = resourceMapping.getRel();

    this.isExported = annotation != null ? annotation.exported() : true;
    this.rel = annotation == null || !StringUtils.hasText(annotation.rel()) ? method.getName() : annotation.rel();
    this.path = annotation == null || !StringUtils.hasText(annotation.path()) ? new Path(method.getName()) : new Path(
        annotation.path());
    this.method = method;
    this.parameterMetadata = discoverParameterMetadata(method, resourceRel.concat(".").concat(rel));
View Full Code Here

Examples of org.springframework.data.rest.core.annotation.RestResource.rel()

  public static String findRel(Class<?> type) {

    RestResource anno = findAnnotation(type, RestResource.class);
    if (anno != null) {
      if (hasText(anno.rel())) {
        return anno.rel();
      }
    }

    return uncapitalize(type.getSimpleName().replaceAll("Repository", ""));
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.