Package org.apache.abdera.model

Examples of org.apache.abdera.model.Person


        IRI uri = baseURI.resolve("3/ws-author-uri.xml");
        Document<Feed> doc = parse(uri);

        Feed feed = doc.getRoot();
        assertNotNull(feed);
        Person author = feed.getAuthor();
        try {
            author.getUriElement().getValue();
        } catch (Exception e) {
            assertTrue(e instanceof IRISyntaxException);
        }
    }
View Full Code Here


        protected String getOpenSearchFeedTitle(RequestContext request) {
            return OS_FEED_TITLE;
        }

        protected Person getOpenSearchFeedAuthor(RequestContext request) {
            Person p = request.getAbdera().getFactory().newAuthor();
            p.setName(OS_FEED_AUTHOR);
            return p;
        }
View Full Code Here

    public Date getUpdated(Employee entry) {
        return entry.getUpdated();
    }

    public List<Person> getAuthors(Employee entry, RequestContext request) throws ResponseContextException {
        Person author = request.getAbdera().getFactory().newAuthor();
        author.setName("Acme Industries");
        return Arrays.asList(author);
    }
View Full Code Here

        return setBy(name, null, null);
    }

    public Person setBy(String name, String email, String uri) {
        if (name != null) {
            Person person = getFactory().newPerson(TombstonesHelper.BY, this);
            person.setName(name);
            person.setEmail(email);
            person.setUri(uri);
            return person;
        } else {
            if (getBy() != null)
                getBy().discard();
            return null;
View Full Code Here

        // Create a new Feed
        Factory factory = Abdera.getNewFactory();
        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org/", "alternate");

        // Aggregate entries from atomFeed1, atomFeed2, rssFeed1 and rssFeed2
        List<Entry> entries = new ArrayList<Entry>();
View Full Code Here

    public Feed query(String queryString) {
        Factory factory = Abdera.getNewFactory();
        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org", "alternate");
       
        Feed allFeed = getFeed();
        if (queryString.startsWith("title=")) {
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

    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

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.