Package org.restlet.ext.atom

Examples of org.restlet.ext.atom.Text


     *
     * @param attrs
     *            The attributes attached to the element.
     */
    public void startTextElement(Attributes attrs) {
        this.currentText = new Text(getMediaType(attrs.getValue("", "type")));
    }
View Full Code Here


     *
     * @param attrs
     *            The attributes attached to the element.
     */
    public void startTextElement(Attributes attrs) {
        this.currentText = new Text(getMediaType(attrs.getValue("", "type")));
    }
View Full Code Here

        throws ResourceException
    {
        try
        {
            Feed feed = new Feed();
            feed.setTitle( new Text( MediaType.TEXT_PLAIN, "All entities" ) );
            List<Entry> entries = feed.getEntries();
            final Iterable<EntityReference> query = entityFinder.findEntities( EntityComposite.class, null, null, null, null, Collections.<String, Object>emptyMap() );
            for( EntityReference entityReference : query )
            {
                Entry entry = new Entry();
                entry.setTitle( new Text( MediaType.TEXT_PLAIN, entityReference.toString() ) );
                Link link = new Link();
                link.setHref( getRequest().getResourceRef().clone().addSegment( entityReference.identity() ) );
                entry.getLinks().add( link );
                entries.add( entry );
            }
View Full Code Here

  }

  private Feed getConfiguredFeed() {
    Feed feed = new Feed();
    feed.setGenerator(getGenerator());
    feed.setTitle(new Text(MediaType.TEXT_PLAIN, title));
    return feed;
  }
View Full Code Here

  private Entry toEntry(SearchResult result) {
    Entry entry = new Entry();
    entry.getCategories().add(newCategory(result.repository));
    entry.setContent(getContent(result.getDescription()));
    entry.setPublished(result.date);
    entry.setTitle(new Text(MediaType.TEXT_PLAIN, result.getCoordinates()));
    entry.setSummary(result.getName());
    entry.getLinks().add(newLink(result.getPath()));
    return entry;
  }
View Full Code Here

TOP

Related Classes of org.restlet.ext.atom.Text

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.