Package org.apache.abdera.model

Examples of org.apache.abdera.model.Person


    }

    public Person addContributor(String name) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newContributor(this);
        person.setName(name);
        return person;
    }
View Full Code Here


    @Test
    public void testEntryAuthorEmail() throws Exception {
        Document<Feed> doc = parse(baseURI.resolve("entry_author_email.xml"));
        Feed feed = doc.getRoot();
        Entry entry = feed.getEntries().get(0);
        Person person = entry.getAuthor();
        assertEquals("me@example.com", person.getEmail());
    }
View Full Code Here

    @Test
    public void testEntryAuthorName() throws Exception {
        Document<Feed> doc = parse(baseURI.resolve("entry_author_name.xml"));
        Feed feed = doc.getRoot();
        Entry entry = feed.getEntries().get(0);
        Person person = entry.getAuthor();
        assertEquals("Example author", person.getName());
    }
View Full Code Here

    }

    public Person addAuthor(String name) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newAuthor(this);
        person.setName(name);
        return person;
    }
View Full Code Here

    }

    public Person addAuthor(String name, String email, String uri) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newAuthor(this);
        person.setName(name);
        person.setEmail(email);
        person.setUri(uri);
        return person;
    }
View Full Code Here

    }

    public Person addContributor(String name) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newContributor(this);
        person.setName(name);
        return person;
    }
View Full Code Here

    }

    public Person addContributor(String name, String email, String uri) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newContributor(this);
        person.setName(name);
        person.setEmail(email);
        person.setUri(uri);
        return person;
    }
View Full Code Here

    }

    public Person addContributor(String name, String email, String uri) {
        complete();
        FOMFactory fomfactory = (FOMFactory)this.factory;
        Person person = fomfactory.newContributor(this);
        person.setName(name);
        person.setEmail(email);
        person.setUri(uri);
        return person;
    }
View Full Code Here

        AtomDate dt = dte.getValue();
        assertNotNull(dt);
        Calendar c = dt.getCalendar();
        AtomDate cdt = new AtomDate(c);
        assertEquals(dt.getTime(), cdt.getTime());
        Person person = feed.getAuthor();
        assertNotNull(person);
        assertEquals("John Doe", person.getName());
        assertNull(person.getEmail());
        assertNull(person.getUri());
        IRIElement id = feed.getIdElement();
        assertNotNull(id);
        assertEquals(new IRI("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6"), id.getValue());
        List<Entry> entries = feed.getEntries();
        assertEquals(1, entries.size());
View Full Code Here

            }
            assertNotNull(entry.getIdElement());
            assertEquals(new IRI("tag:example.org,2003:3.2397"), entry.getIdElement().getValue());
            assertNotNull(entry.getUpdatedElement());
            assertNotNull(entry.getPublishedElement());
            Person person = entry.getAuthor();
            assertNotNull(person);
            assertEquals("Mark Pilgrim", person.getName());
            assertEquals("f8dy@example.com", person.getEmail());
            assertNotNull(person.getUriElement());
            assertEquals(new IRI("http://example.org/"), person.getUriElement().getValue());
            List<Person> contributors = entry.getContributors();
            assertNotNull(contributors);
            assertEquals(2, contributors.size());
            assertNotNull(entry.getContentElement());
            assertEquals(Content.Type.XHTML, entry.getContentElement().getContentType());
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Person

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.