Package com.theoryinpractise.halbuilder.api

Examples of com.theoryinpractise.halbuilder.api.Link


    private List<Link> getNaturalLinks() {
        return FluentIterable.from(links).transform(new Function<Link, Link>() {
            @Nullable
            @Override
            public Link apply(@Nullable Link link) {
                return new Link(representationFactory, namespaceManager.currieHref(link.getRel()), link.getHref(), link.getName(), link.getTitle(), link.getHreflang(), link.getProfile());
            }
        }).toSortedImmutableList(RELATABLE_ORDERING);

    }
View Full Code Here


                public String apply(@Nullable Link link) {
                    return link.getProfile();
                }
            });

            collatedLinks.add(new Link(representationFactory, rels, href,
                    emptyToNull(names),
                    emptyToNull(titles),
                    emptyToNull(hreflangs),
                    emptyToNull(profile)
            ));
View Full Code Here

        return e;
    }

    @Override
    public String toString() {
        Link href = getLinkByRel("self");
        if (href != null) {
            return "<Representation: " + href.getHref() + ">";
        } else {
            return "<Representation: @" + Integer.toHexString(hashCode()) + ">";
        }
    }
View Full Code Here

        return this;
    }

    @Override
    public DefaultRepresentationFactory withLink(String rel, String href) {
        links.add(new Link(this, rel, href));
        return this;
    }
View Full Code Here

    private List<Link> getNaturalLinks() {
        return FluentIterable.from(links).transform(new Function<Link, Link>() {
            @Nullable
            @Override
            public Link apply(@Nullable Link link) {
                return new Link(representationFactory, namespaceManager.currieHref(link.getRel()), link.getHref(), link.getName(), link.getTitle(), link.getHreflang(), link.getProfile());
            }
        }).toSortedList(RELATABLE_ORDERING);

    }
View Full Code Here

                public String apply(@Nullable Link link) {
                    return link.getProfile();
                }
            });

            collatedLinks.add(new Link(representationFactory, rels, href,
                    emptyToNull(names),
                    emptyToNull(titles),
                    emptyToNull(hreflangs),
                    emptyToNull(profile)
            ));
View Full Code Here

        return e;
    }

    @Override
    public String toString() {
        Link href = getLinkByRel("self");
        if (href != null) {
            return "<Representation: " + href.getHref() + ">";
        } else {
            return "<Representation: @" + Integer.toHexString(hashCode()) + ">";
        }
    }
View Full Code Here

    private List<Link> getNaturalLinks() {
        return FluentIterable.from(links).transform(new Function<Link, Link>() {
            @Nullable
            @Override
            public Link apply(@Nullable Link link) {
                return new Link(representationFactory, namespaceManager.currieHref(link.getRel()), link.getHref(), link.getName(), link.getTitle(), link.getHreflang(), link.getProfile());
            }
        }).toSortedList(RELATABLE_ORDERING);

    }
View Full Code Here

                public String apply(@Nullable Link link) {
                    return link.getProfile();
                }
            });

            collatedLinks.add(new Link(representationFactory, rels, href,
                    emptyToNull(names),
                    emptyToNull(titles),
                    emptyToNull(hreflangs),
                    emptyToNull(profile)
            ));
View Full Code Here

        return e;
    }

    @Override
    public String toString() {
        Link href = getLinkByRel("self");
        if (href != null) {
            return "<Representation: " + href.getHref() + ">";
        } else {
            return "<Representation: @" + Integer.toHexString(hashCode()) + ">";
        }
    }
View Full Code Here

TOP

Related Classes of com.theoryinpractise.halbuilder.api.Link

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.