Examples of newLink()


Examples of org.apache.abdera.factory.Factory.newLink()

    assertEquals(link.getRel(), "a");
    assertEquals(link.getMimeType().toString(), "text/foo");
    assertEquals(link.getTitle(), "b");
    assertEquals(link.getHrefLang(), "en");
    assertEquals(link.getLength(), 10);
    link = factory.newLink();
    link.setHref("http://example.org/foo");
    link.setRel("a");
    link.setMimeType("text/foo");
    link.setTitle("b");
    link.setHrefLang("en");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

    iri.setValue("http://example.org/foo");
    assertEquals(iri.getValue().toString(), "http://example.org/foo");
    iri = factory.newIRIElement(Constants.ID, null);
    iri.setValue("http://example.org/foo");
    assertEquals(iri.getValue().toString(), "http://example.org/foo");
    Link link = factory.newLink();
    assertNotNull(link);
    link = factory.newLink();
    link.setHref("http://example.org/foo");
    link.setRel("a");
    link.setMimeType("text/foo");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

    iri = factory.newIRIElement(Constants.ID, null);
    iri.setValue("http://example.org/foo");
    assertEquals(iri.getValue().toString(), "http://example.org/foo");
    Link link = factory.newLink();
    assertNotNull(link);
    link = factory.newLink();
    link.setHref("http://example.org/foo");
    link.setRel("a");
    link.setMimeType("text/foo");
    link.setTitle("b");
    link.setHrefLang("en");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

    assertEquals(link.getRel(), "a");
    assertEquals(link.getMimeType().toString(), "text/foo");
    assertEquals(link.getTitle(), "b");
    assertEquals(link.getHrefLang(), "en");
    assertEquals(link.getLength(), 10);
    link = factory.newLink();
    link.setHref("http://example.org/foo");
    link.setRel("a");
    link.setMimeType("text/foo");
    link.setTitle("b");
    link.setHrefLang("en");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

        iri.setValue("http://example.org/foo");
        assertEquals("http://example.org/foo", iri.getValue().toString());
        iri = factory.newIRIElement(Constants.ID, null);
        iri.setValue("http://example.org/foo");
        assertEquals("http://example.org/foo", iri.getValue().toString());
        Link link = factory.newLink();
        assertNotNull(link);
        link = factory.newLink();
        link.setHref("http://example.org/foo");
        link.setRel("a");
        link.setMimeType("text/foo");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

        iri = factory.newIRIElement(Constants.ID, null);
        iri.setValue("http://example.org/foo");
        assertEquals("http://example.org/foo", iri.getValue().toString());
        Link link = factory.newLink();
        assertNotNull(link);
        link = factory.newLink();
        link.setHref("http://example.org/foo");
        link.setRel("a");
        link.setMimeType("text/foo");
        link.setTitle("b");
        link.setHrefLang("en");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

        assertEquals("a", link.getRel());
        assertEquals("text/foo", link.getMimeType().toString());
        assertEquals("b", link.getTitle());
        assertEquals("en", link.getHrefLang());
        assertEquals(10, link.getLength());
        link = factory.newLink();
        link.setHref("http://example.org/foo");
        link.setRel("a");
        link.setMimeType("text/foo");
        link.setTitle("b");
        link.setHrefLang("en");
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

        feed.setId("http://example.com/feed");
        Parser parser = abdera.getParser();
        Document<Entry> doc = parser.parse(this.getClass().getResourceAsStream("/entry.xml"));
        Entry entry = doc.getRoot();

        Link link = factory.newLink();
        link.setHref(entry.getId().toString());
        link.setRel(Link.REL_EDIT);
        entry.addLink(link);
        assertNotNull("Link is null", entry.getLink(Link.REL_EDIT));
        feed.addEntry(entry);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

        PackageIterator iter = repository.listPackages();
        while (iter.hasNext()) {
            PackageItem item = iter.next();
            Entry e = factory.getAbdera().newEntry();
            e.setTitle(item.getName());
            Link l = factory.newLink();
            l.setHref(uriInfo.getBaseUriBuilder()
                    .path("packages/{itemName}")
                    .build(item.getName())
                    .toString());
            e.addLink(l);
View Full Code Here

Examples of org.apache.abdera.factory.Factory.newLink()

                if (historicalPackage.getVersionNumber() != 0) {
                    Entry e = factory.getAbdera().newEntry();
                    e.setTitle(Long.toString(historicalPackage
                            .getVersionNumber()));
                    e.setUpdated(historicalPackage.getLastModified().getTime());
                    Link l = factory.newLink();
                    l.setHref(uriInfo
                            .getBaseUriBuilder()
                            .path("packages/{packageName}/versions/{versionNumber}")
                            .build(p.getName(), Long.toString(historicalPackage.getVersionNumber()))
                            .toString());
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.